Voctomix

Voctomix ist ein Softwaremischer der es uns erlaubt auf Konferenzen HD-Recording und -Streaming anbieten zu können. Voctomix wird aktuell von mazdermind fürs VOC entwicklet und ist gst-switch's kleine Schwester. Sie lebt im Git unter git@c3voc.de:voctomix und Read-Only auf Github.

The Installation on VOC Machines (Encoder-Cubes and Mixer-Notebooks) is managed through Ansible. The Ansible Deployment creates the following Things on the Encoder-Cubes:

  • Source of last Release in /opt/voctomix/release
  • Config-File for Voctocore in /opt/voctomix/voctocore-config.ini
  • Scripts to source/sink/playout Video-Content into/out of the Voctocore in /opt/voctomix/scripts
  • Systemd-Units in /etc/systemd/system/voctomix-*.service
  • A System-Status-Script in /usr/bin/voctomix-status

Ansible always resetd the Setup to a default configuration, where all SDI-Ports are used as Campera-INs, no Playout is active and all Supporting-Scripts are enabled. Ansible generated the following Systemd-Units for Voctomix:

Systemd-Unit Description
voctomix-bgloop-source.service Source the Background-Loop from /opt/voc/share/bgloop.ts
voctomix-decklink-source-[NAME].service Such a Unit is generated for each Decklink-Input-Device present at the time of the ansible-run. Source Video- and Audio from this Decklink-Input
voctomix-grabber-source.service Source Video-Input from the Epiphan Framegrabber via Ethernet
voctomix-grabber-to-[NAME]-playout.service Such a Unit is generated for each Decklink-Output-Device present at the time of the ansible-run. Playout Video- and Silence from the Framegrabber-Input to the Decklink-Output
voctomix-grabber-to-framebuffer-playout.service Playout Video from the Framegrabber-Input to the HDMI/DVI/VGA Output on the Mainboard
voctomix-music-source.service Source Music from /opt/voc/share/pause-music/ into the Pause-Loop
voctomix-pause-source.service Souece Pause-Loop from /opt/voc/share/pause.ts
voctomix-program-to-[NAME]-playout.service Such a Unit is generated for each Decklink-Output-Device present at the time of the ansible-run. Playout Video- and Audio from the Program-Output (=what is being recorded; before the Stream-Blanker) to the Decklink-Output
voctomix-program-to-framebuffer-playout.service Playout Video from the Program-Output (=what is being recorded; before the Stream-Blanker) to the HDMI/DVI/VGA Output on the Mainboard
voctomix-recording-sink.service Record the Program-Output to Segmented .ts-Files in /video
voctomix-streaming-hd-sink.service Encode and Stream the Streamblanker-Output to rtmp://127.0.0.1:1935/stream/sroom_numbernativehd
voctomix-streaming-sd-sink.service Encode and Stream the Streamblanker-Output to rtmp://127.0.0.1:1935/stream/sroom_numbernativesd
voctomix-stream-to-[NAME]-playout.service Such a Unit is generated for each Decklink-Output-Device present at the time of the ansible-run. Playout Video- and Audio from the Stream-Output (=what is being streamed; after the Stream-Blanker) to the Decklink-Output
voctomix-stream-to-framebuffer-playout.service Playout Video from the Stream-Output (=what is being streamed; after the Stream-Blanker) to the HDMI/DVI/VGA Output on the Mainboard
voctomix-voctocore.service The Voctocore

All Supporting Units are WantedBy=voctomix-voctocore.service as well as the request Requires=voctomix-voctocore.service and After=voctomix-voctocore.service. This means:

  • The Supporting Units only start up when the Core has successfully started up first
  • When enabled, the Supporting Units automatically start up when the Core is up
  • The Supporting Units go down when the Core goes down

In practice this means, that to restart the whole chain, you can do:

sudo systemctl restart voctomix-voctocore.service

Similar to stop or start everything you can use

sudo systemctl stop voctomix-voctocore.service

and

sudo systemctl start voctomix-voctocore.service

To see which units are actually started, you can call

voctomix-status

To Reconfigure a Decklink-Duo Port as Playout, in order for it to survive a restart/reboot, you can do:

sudo systemctl disable voctomix-decklink-source-decklink-sdi-2.service                                                                                                     sudo systemctl stop voctomix-decklink-source-decklink-sdi-2.service                                                                                                        

sudo systemctl enable voctomix-stream-to-decklink-sdi-2-playout.service                                                                                                   
sudo systemctl start voctomix-stream-to-decklink-sdi-2-playout.service  

If you leave out the enable/disable the change will be temporary and restarting the voctocore-Unit or the encoder-Cube will reset the change.

Similar to enable Playout to the Framebuffer, you can do:

sudo systemctl start voctomix-stream-to-framebuffer-playout.service                                                                                                        sudo systemctl enable voctomix-stream-to-framebuffer-playout.service

Leaving out the enable/disable the change will also here be temporary.

Playout to the Framebuffer can always be interrupted by funny tty0 printouts at any time :) Also think about whether you want to playout the Program-Output (before the Streamblanker) or the Streaming-Output (after the Streamblanker).

Creating a background for the supersource from an image file

ffmpeg -loop 1 -i background.png -f s16le -i /dev/zero -ar 48000 -ac 1 -r 25 -t 00:01:00 -s 1920x1080 -c:v mpeg2video -q:v 0 -aspect 16:9 -f mpegts bgloop.ts

Creating a background for the supersource from a MP4 file in correct resolution

ffmpeg -i bgloop.mp4 -filter:v fps=25 -c:v mpeg2video -q:v 0 -aspect 16:9 -f mpegts bgloop.ts

To see the Output of the various Units, you can use a command like this:

journalctl -au voctomix-decklink-source-decklink-sdi-2.service  

Alternative version:

journalctl -a -f -u  voctomix-grabber-source.service

Some Useful Control-Commands when you only have a Shell (see also example-scripts/control-server:

echo set_audio cam1 | nc -q0 localhost 9999
echo set_audio cam2 | nc -q0 localhost 9999

echo set_composite_mode fullscreen | nc -q0 localhost 9999
echo set_composite_mode picture_in_picture | nc -q0 localhost 9999
echo set_composite_mode side_by_side_equal | nc -q0 localhost 9999
echo set_composite_mode side_by_side_preview | nc -q0 localhost 9999

echo set_stream_blank pause | nc -q0 localhost 9999
echo set_stream_live | nc -q0 localhost 9999

echo set_video_a cam1 | nc -q0 localhost 9999
echo set_video_a cam2 | nc -q0 localhost 9999
echo set_video_a grabber | nc -q0 localhost 9999

echo set_video_b cam1 | nc -q0 localhost 9999
echo set_video_b cam2 | nc -q0 localhost 9999
echo set_video_b grabber | nc -q0 localhost 9999
  • voctomix.1476396964.txt.gz
  • Last modified: 2016/10/14 00:16
  • by andi