Recording audio and/or video from RSB into a video container file


The following diagram contains a simplified illustration of a minimal GStreamer pipeline that can be used to generate video files from RSB events containing audio and video data. The vorbisenc, theoraenc and oggmux elements can be replaced with different encoders and container multiplexers as required.



The RSB GStreamer Integration project includes the scripts source:trunk/scripts/ and source:trunk/scripts/ in the source:trunk/scripts subdirectory. These scripts allow encoding audio data and video data into a video container file. Both scripts are used as follows:

record_{ogv,mp4}.sh OUTPUTFILE VIDEOSCOPE ( AUDIOSCOPE | _ )

_ can be used to indicate that a particular component should not be recorded.


Assuming audio data and video data have been recorded into a log file named video.tide, this example demonstrates converting the log file into a video container file with encoded audio and video streams.

  1. Start the recording pipeline:
    $ ./ video.ogv /video/camera1 /audio/mic1

    This part of the example assumes an RSB configuration that enables the Spread transport for a Spread daemon listening on port 4803 of localhost.
  1. Replay audio and video data from the log file:
    $ bag-play -r as-fast-as-possible video.tide 'spread://localhost:4803'