if(($ACT == 'edit' || $ACT == 'preview') && $INFO['editable']){ ?> } else { ?> } ?>
DVswitch is an application that allows interactive live-mixing of DV-sources with emphasis on streaming and archiving conference presentations.
This article describes a method that was outlined on the dvswitch mailing-list to allow interacting with dvswitch using external control mechanisms, such as physical buttons, sliders or apps running on a tablet or phone. To that end dvswitch has been extended to send and react on OSC messages.
Before delving into the details here's a quick demo-video:
(If Flash is installed JavaScript is activated, you can watch a video inside this web page.)
The concept is to create a generic interface that allows to remote-control dvswitch and specific applications for various setups and use-cases that use this control-interface. The general idea is that one can use an interface appropriate for the job at hand. OSC is easily accessible: Commandline-tools, OSC controller-apps for touch-screen phones and OSC-sequencing software are available.
A first specific application used for prototyping is a MIDI → OSC translator called 'dvmctrl'.
In its current development state dvmctrl binds MIDI control-commands (from a BCF2000 MIDI-Desk) to dvswitch actions. It is intended to be used with three DV-source (two camera, one projector input), as demoed in the video above.
The patched dvswitch interprets the following OSC messages:
osc-msg | type | |
---|---|---|
/dvswitch/src/pri | i | select primary video-input [0..] |
/dvswitch/src/sec | i | select secondary video-input [0..] |
/dvswitch/src/snd | i | select audio-input [0..] |
/dvswitch/rec/start | send record-start command. | |
/dvswitch/rec/stop | send record-stop command. | |
/dvswitch/rec/cut | send record-cut command. | |
/dvswitch/fx/overlay | i | set A/B overlay [0..255]; 0: source A, 255: source B |
/dvswitch/fx/fade | i | switch to A→A' fade-effect [50..15000]ms; 0:cancel-effect |
/dvswitch/fx/pip | i | experimental picture-in-picture [0..4]; 0: cancel-effect, 1-4 pip-position presets |
/dvswitch/fx/pip | fff | experimental picture-in-picture effect - params: x-pos, y-pos, size; all [0..1]. any value <0 will cancel the effect. |
There are a couple of build-prerequisites to compile this beast: in particular development packages for ffmpeg (libavformat-dev, libavcodec-dev,..), cairo and cairomm, freetype, pango, jack, cmake, etc. for dvswitch; liblo-dev, alsa-dev and gnu-make for dvmctrl.
The source code of the patched dvswitch1) and dvmctrl is kept in git repositories
git clone git://rg42.org/dvswitch ## this checks out the "0.9-osc" branch by default cd dvswitch mkdir build; cd build cmake .. make ./src/dvswitch -o 5675 ## works IFF dvswitch is avail on the system (/usr/share/dvswitch/*png) ## otherwise you will need to install the built
git clone git://rg42.org/dvmctrl cd dvmctrl make ./dvmctrl # -m BCF2000 -o 5675 (these are defaults)
Now add three sources in order: cam-1, cam-2, slides/projector using dvsource-*.
The setup has been tested successfully for >24 hours of continuous operation - although the settings were rather static for most of the time.
A potential problem is that the the input sources must to be in fixed order for the duration of a session (particularly the video-projector - here #3 which is mapped to the fader). When a source is disconnected or dropped from dvswitch and re-connected the ordering is not necessarily identical.
This can be worked-around in 'dvmctrl' (re-map the sources) but should rather be fixed in dvsource and dvswitch itself.