-
Notifications
You must be signed in to change notification settings - Fork 131
Notes for Puffer staff
-
Log into the machine
tv-nuc
, and runcd ~/puffer/src/scripts screen -S puffer2 ./run_udp_to_tcp.py kron nbc fox <detach from session> screen -S puffer3 ./run_udp_to_tcp.py kpyx abc <detach from session> screen -S puffer4 ./run_udp_to_tcp.py cbs pbs <detach from session>
Channels can be distributed across encoding machines differently as needed.
-
Log into the machine
puffer
, runrm -rf /dev/shm/media # must remove old files first if there are any cd ~/puffer/src/forwarder screen -S file-receiver2 ./file_receiver 61002 /dev/shm/media/tmp/ <detach from session> screen -S file-receiver3 ./file_receiver 61003 /dev/shm/media/tmp/ <detach from session> screen -S file-receiver4 ./file_receiver 61004 /dev/shm/media/tmp/ <detach from session>
-
Log into each of the machines
puffer2
,puffer3
, andpuffer4
, and runcd ~/puffer/src/wrappers screen -S pipeline rm -rf /dev/shm/media # must clean up old media files if there are ./run_pipeline ../settings.yml <detach from session>
Each machine must have the correct
settings.yml
. E.g., to encodeabc
,nbc
, andfox
onpuffer2
:channels: - abc - nbc - fox media_dir: /dev/shm/media remote_media_server: host: 171.64.65.88 port: 61002 media_dir: /dev/shm/media enable_logging: true influxdb_connection: host: 171.64.65.88 port: 8086 dbname: puffer user: puffer password: INFLUXDB_PASSWORD channel_configs: nbc: live: true video: 1920x1080: [22, 24] 1280x720: [20, 22, 24, 26] 854x480: [24, 26] 640x360: [24] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 1080i30 60 900 10248 --tcp 171.64.90.125:60002 fox: live: true video: 1280x720: [20, 22, 24, 26] 854x480: [22, 24, 26] 640x360: [24, 26] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 720p60 120 900 10248 --tcp 171.64.90.125:60003 ion: live: true video: 1280x720: [20, 22, 24, 26] 854x480: [22, 24, 26] 640x360: [24, 26] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 720p60 120 900 10248 --tcp 171.64.90.125:60004 abc: live: true video: 1280x720: [20, 22, 24, 26] 854x480: [22, 24, 26] 640x360: [24, 26] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 720p60 120 900 10248 --tcp 171.64.90.125:60008 cbs: live: true video: 1920x1080: [22, 24] 1280x720: [20, 22, 24, 26] 854x480: [24, 26] 640x360: [24] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 1080i30 60 900 10248 --tcp 171.64.90.125:60006 pbs: live: true video: 1920x1080: [22, 24] 1280x720: [20, 22, 24, 26] 854x480: [24, 26] 640x360: [24] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 1080i30 60 900 10248 --tcp 171.64.90.125:60007 cw: live: true video: 1920x1080: [22, 24] 1280x720: [20, 22, 24, 26] 854x480: [24, 26] 640x360: [24] 426x240: [26] audio: - 128k - 64k - 32k present_delay_chunk: 300 decoder_args: 0x31 0x34 1080i30 60 900 10248 --tcp 171.64.90.125:60005
Only the
channels
section needs to be adapted forpuffer3
andpuffer4
. Note that theremote_media_server
must match thefile_receiver
to be run onpuffer
. -
Log into the machine
puffer
, and runscreen -S media-server cd ~/puffer/src/media-server ./run_servers.py ../settings.yml <detach from session>
- Log into machine
tv-nuc
, stop and restart allrun_udp_to_tcp.py
. - Log into machine
puffer
- Remove the folder
/dev/shm/media
- Restart
file_receiver2
,file_receiver3
, andfile_receiver4
- Remove the folder
- Log into each of the machines
puffer2
,puffer3
, andpuffer4
, and run- Remove the folder
/dev/shm/media
- Restart
run_pipeline
- Remove the folder
- Log into machine
puffer
again- Verify that all channels have their own folders in
/dev/shm/media
- Restart
run_servers_and_cl.py
- Wait and check if channels are resumed on the website
- Verify that all channels have their own folders in
-
Log into machine
tv-nuc
and run each of the command below for sufficiently longnc -u -l 10.0.0.1 50001 > kgo-abc.ts nc -u -l 10.0.0.1 50002 > kntv-nbc.ts nc -u -l 10.0.0.1 50003 > ktvu-fox.ts nc -u -l 10.0.0.1 50004 > kron-cw.ts nc -u -l 10.0.0.1 50005 > kpyx-cw.ts nc -u -l 10.0.0.1 50006 > kpix-cbs.ts nc -u -l 10.0.0.1 50007 > kqed-pbs.ts nc -u -l 10.0.0.1 50008 > kdtv-univision.ts
-
Use FFmpeg to trim the video to a desired length, e.g.,
ffmpeg -i nbc.ts -ss 00:00:10 -t 600 -c copy -streamid 0:0x31 -streamid 1:0x34 nbc-10m.ts
-
Run
nc -l -p 60002 < ~/Videos/ts-clips/nbc-10m.ts
in one terminal, and replace--tcp 171.64.90.125:60002
in thesettings.yml
with--tcp 127.0.0.1:60002
. -
In another terminal,
cd ~/puffer/src/wrappers ./run_pipeline ../settings.yml
which encodes the .ts file into Puffer-compatible files in
media_dir
(as specified in thesettings.yml
).
- If system performance metrics such as CPU load are missing on Grafana for a server, then log into that machine and run
sudo systemctl restart collectd
.