Implicancies Caretakers Issue 12: Difference between revisions

From XPUB & Lens-Based wiki
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Implicants]]
= What do the "caretakers" do ... =
= What do the "caretakers" do ... =


Line 225: Line 227:


1] Copy archiving script from last week broadcast to current directory
1] Copy archiving script from last week broadcast to current directory
ex: scp /var/www/html/radio/12.2/archive_12.2.liq


cp /var/www/html/radio/LAST/archive_LAST.liq .


2] Copy ogginfo to srt script to current directory
2] Copy ogginfo to srt script to current directory
  ex: scp /var/www/html/radio/12.2/ogginfo-to-srt.py
   
cp /var/www/html/radio/12.2/ogginfo-to-srt.py




3] Rename archive script
3] Rename archive script
  ex: mv archive_12.2.liq archive_12.3.liq
 
  mv archive_12.2.liq archive_12.3.liq




4] Edit script to current week playlist
4] Edit script to current week playlist
  ex: nano archive_12.3.liq
 
  nano archive_12.3.liq


Adjust the output .ogg file to the name of the script to keep consistency
Adjust the output .ogg file to the name of the script to keep consistency
  ex: archive_12.3.ogg
 
  archive_12.3.ogg
 
Add an output.file command instead of output.icecast...
 
output.file(%vorbis, "archive_12.2.ogg", myradio, fallible=true) 




Line 292: Line 302:
<span style="background:yellow;">'''Result: in the website you can play the archives broadcast (this is not a live stream anymore) and the current track that is playing is marked in the table of contant.'''</span>
<span style="background:yellow;">'''Result: in the website you can play the archives broadcast (this is not a live stream anymore) and the current track that is playing is marked in the table of contant.'''</span>


[[Category: Implicancies]]
== Alternative place for materials ==
 
scp -r folder radioimplicancies@pzwart1.wdka.hro.nl:public_html/
 
scp FILE.mp3 radioimplicancies@pzwart1.wdka.hro.nl:public_html/
 
[[category:Implicancy_12]]

Latest revision as of 11:04, 15 March 2021

Implicants

What do the "caretakers" do ...

  • Making message for the mailinglist
  • Update the website
  • Decide elements on the page / player like iframe with etherpad/xmpp chat ....
  • Ensuring the collection of materials on sandbox is complete
  • Making the playlist
  • Testing the liquidsoap script ahead of time?
  • Taking care of the archive
  • Update this page

Prepare materials on hub

Move the recorded files to the radio folder: sandbox:/var/www/html/radio

scp file.mp3 hub.sandbox:/var/www/html/radio

If necessary, convert mp4 to mp3

fmpeg -i "name.mp4" "name.mp3"

Rename files

ssh sandbox
cd /var/www/html/radio
mv ORIGINALNAME.mp3 0_title.mp3

Make a playlist (liquid soap)

See also: https://pzwiki.wdka.nl/mediadesign/Prototyping/2019-2020/T3#Playlist

cd /srv/radio
ls /var/www/html/*.mp3 >> playlist.m3u
nano playlist.m3u # did some editing, reordered, removed ones we don't want...

Playlist is here ---> /srv/radio/playlist.m3u

The bash script = playlist.sh

Starting/stopping the stream

Caretaker starts a "tmux session", makes it shareable... (ssh to the sandbox)

tmux -S /tmp/radio attach -t radio

Go into the directory where the *.liq is and then

liquidsoap -v *.liq

Starting the playlist

bash playlist.sh

caretaker can eventually press:

ctrl-b d 

... to detach from tmux, leaving liquidsoap (and the stream) running.

Watching tmux

others can watch what is happening with

tmux -S /tmp/radio attach -t radio -r

-r (read only) is to prevent you make accidental changes.

Icecast Dashboard

http://echo.lurk.org:999/


#12.2 21.05 Anna & Avital

Our contribution / decisions

  • Full documentation of the entire process of broadcasting the playlist.
  • Decisions regarding the webpage structure:

Radio Implicancies broadcasts are placed inside different sections, one for each episode. Every section is curated by the caretakers of the week who can provide a diversified style/navigation/technical implementation. Webstruct.png

  • 12.2 episode collects reactions through Your world of text, a whiteboard where the user can type inside an infinite space. The idea was to use this "pad" to collect reactions and comments regarding the broadcast during the stream as a sort of living chat moving through space and temporality (in a way). It has some relevant limitations (is not possible to copy and paste for example) that made for us impossibile to use this system to link resources so we decided to keep it only as a sort of live chat.

Ywot12.2.png


This is the whole process, step by step

Making the playlist

1] Open a new directory on sandbox in the radio directory for this week's broadcast

cd /var/www/html/radio
mkdir 12.number of broadcast
ex: mkdir 12.2


2] All the files should be uploaded to the new directory and converted to ogg. format

scp file.mp3 hub.sandbox:/var/www/html/radio/current broadcast directory
ffmpeg -i filename.typeoffile filename.ogg


3] Metadata should be added to the files : title, file name, authors, episode. The title will be used later in the websites javascript.

vorbiscomment -t "title=track_broadcast number_track number" -t "file=file name.ogg" -t "authors=name" -t "episode=12.broadcast number" -w file name.ogg
ex: vorbiscomment -t "title=track_2_1" -t "file=Signals_and_messages_1.0.ogg" -t "authors=mark, damla" -t "episode=12.2" -w 
Signals_and_messages_1.0.ogg

Check if you add the correct information:

ogginfo filename.ogg

to add a tag without affecting the others, use -a (append)...

vorbiscomment -a -t "title=the_div_id" audio.ogg

to check the tags

vorbiscomment -l audio.ogg


4] Make the playlist

ls *.ogg>>name of playlist.m3u

The playlist is saved as a m3u format.

The name should be unified with name of directory (12.number of broadcast)

ex: ls *.ogg>>12.2.m3u


4] Edit the playlist- you can arrange the order of the playlist

nano name of playlist.m3u

In the editor use ctrl+k to cut a line and ctrl+u to paste.


Playlist is ready for broadcast

Broadcasting

1] Copy the broadcasting liquidsoap script from last broadcast to current broadcast directory.

scp /var/www/html/radio/last broadcast directory/last broadcast script.liq .

The dot in the end means it will be copied to your current location (should be this weeks broadcast directory)

ex: scp /var/www/html/radio/12.1/12.1.liq .


2] Rename the script to have the name of this week's broadcast

ex: mv 12.1.liq 12.2.liq


3] In the script, update the playlist name to the current playlist

ex: nano 12.2.liq


4] Set fallback track - the fallback script should run in a tmux group for the case that the broadcast is not running.

The script live_interrupt.liq is in this directory

cd /var/www/html/radio


We are currently running the script in a tmux group called radio


Attach to group:

tmux -S /tmp/radio attach -t radio

Run the script in the group

liquidsoap -v live_interrupt.liq


Right now the we are using brownnoise.mp3 for the fallback, you can see it in the script

#!/usr/bin/liquidsoap -v
set("log.file",false)
# set("log.file.path","/tmp/<script>.log")
set("log.stdout",true)
%include "/srv/radio/passwords.liq"
# Add the ability to relay live shows
radio =
 fallback(track_sensitive=false,
          [input.http("http://echo.lurk.org:999/radioimplicancies_live.ogg"),
           single("brownnoise.mp3")])
radio = mksafe(radio)
output.icecast(%vorbis,
    host = ICECAST_SERVER_HOST, port = ICECAST_SERVER_PORT,
    password = ICECAST_SERVER_PASSWORD, mount = "radioimplicancies.ogg",
    radio)
# out(liveorstatic)


5] Create a tmux group that you will run the script where we will run the script.

 tmux -S /tmp/group name new -s group name

Running the script in the tmux group allows it to run in the back, not directly from a personal terminal.


Make group public

chgrp publicweb /tmp/group name


6] Run the script in the current broadcast directory (if you are not there, cd to it)

liquidsoap -v 12.2.liq


The broadcast is now running and can be heard in the website


Tips

  • You can become the radio user
su radio

You will need to enter the password


  • To view all the processes that are currently running on sandbox use:
ps aux


To view only liquidsoap processes:

ps aux | grep liquidsoap


  • Stop a process by using:
kill number of process


  • Detach from tmux session using ctrl+B, let go and then D.


Archiving

This process will make a file of the broadcast and use the metadata to track indicate while playing the file on the website.

1] Copy archiving script from last week broadcast to current directory

cp /var/www/html/radio/LAST/archive_LAST.liq .

2] Copy ogginfo to srt script to current directory

cp /var/www/html/radio/12.2/ogginfo-to-srt.py


3] Rename archive script

mv archive_12.2.liq archive_12.3.liq


4] Edit script to current week playlist

nano archive_12.3.liq

Adjust the output .ogg file to the name of the script to keep consistency

archive_12.3.ogg

Add an output.file command instead of output.icecast...

output.file(%vorbis, "archive_12.2.ogg", myradio, fallible=true)  


5] Run archive script (this process will play the broadcast again so it will take the length of the broadcast to finish)

liquidsoap -v archive_12.3.liq

When it's done you will see the .ogg file of the archived playlist in your directory (in our example archive_12.3.ogg).

You can use ogginfo to see if all the tracks have the metadata. This metadata is important.

ex: ogginfo archive_12.3.ogg


6] This chain of commands will make a .vtt file from our .ogg file. This file will contain our metadata that can later be used.

ogginfo archive_12.3.ogg | python3 ogginfo-to-srt.py --json
ogginfo archive_12.3.ogg | python3 ogginfo-to-srt.py
ogginfo archive_12.3.ogg | python3 ogginfo-to-srt.py  --vtt
ogginfo archive_12.3.ogg | python3 ogginfo-to-srt.py  --vtt > archive_12.3.vtt


Now the .vtt file is generated.


7] Convert playlist .ogg file to .mp3 (it will be used in the website and will be more stable)

 ex: ffmpeg -i archive_12.2.ogg archive_12.2.mp3


8] Copy .mp3 and .vtt files from sandbox to the /12 website directory on the git (you can use scp if you have the repository cloned or your machine or use the online interface of gitea).


9] In index.html, alter the <audio> tag to contain the archived .mp3 file and the .vtt file

   <audio controls>
   <source src="archive_12.2.mp3" type="audio/mp3">
         <track default kind="captions"
          srclang="en"
          src="archive_12.2.vtt"/>
   </audio>


10] Give the "li" (list) components an id that correlates with the "title" in the metadata (you can use ogginfo on the .ogg archived playlist file to check again). You can see how it was done in the previous broadcasts.


The Javascript is already there and should work. You can checkout player2.js to see what the script is doing.


Right you can see that the current track that is playing is marked in the broadcast content table. It uses the class "now_playing" but a new script can be written that uses a different one if you like. If you want to make a different script, that will use a different class, you should copy the current one and them alter.


Result: in the website you can play the archives broadcast (this is not a live stream anymore) and the current track that is playing is marked in the table of contant.

Alternative place for materials

scp -r folder radioimplicancies@pzwart1.wdka.hro.nl:public_html/
scp FILE.mp3 radioimplicancies@pzwart1.wdka.hro.nl:public_html/