Duga reads video frames from pipe as raw RGB24 bitmaps (i.e., each pixel is represented by 3 uint8_t) and audio as int16_t (a.k.a. PCM S16_LE) samples. It combines them and outputs RGB24 and PCM stream.
The intended usage is to have several ffmpeg (and maybe arecord for audio) processes that eat from various sources (V4L2, files, network streams, wireless microphones…) and one ffmpeg process that reads the output, encodes it to something sane and feeds it to your favorite streaming server (VLC, ffserver…).
Configuration is solely by commands. Commands can be read from a rc file (which is the only command line argument) during startup or from stdin afterwards.
For duga, only C++11 compiler is required. However, you will probably need ffmpeg and vlc binaries to do something useful.
Just run “make”.
Some example usage is in the default rc file. It opens your camera, a video file and an image and starts streaming in FLV format.
Sets variable in global configuration.
Variables are:
Starts the processing (duga will start outputting black video and silent audio).
Add a stream.
If you have only audio or only video, put “none” as the name.
Import an image, e.g. a logo. The file in RGBA format (alpha ~ 0xFF - full opacity, 0x00 - full transparency) can be obtained for example with
convert image.png image.rgba
Manipulate existing stream. Parameters are:
Enable a source.
Disable a source (it will just stop showing it, but all the processing still runs).
Destroy a source (it will close the pipe - which will probably mean that your program will receive SIGPIPE and gracefully end).
Show which sources are currently configured.
Show peak audio level since the time this command was last run. The number is in range [0, 2^15] as we are using signed 16-bit PCM.