Stream Video File into DataTurbine

The Goal

Stream a video using rbnbCapture. We will trans code the file breaking it into individual JPEG images.

Procedure

You will need to get the following tools:

  1. Start a DataTurbine server
  2. Start FFMPEG to trans code a video file into a stream of jpeg images.
    ffmpeg -i /path/to/video.avi -f mjpeg udp://127.0.0.1:1234 ?pkt_size=64000

    Note: Make sure that the packets are not split across multiple UDP instances by specifying thepkt_size=64000argument.

  3. Start a rbnbCapture source to capture the UDP image stream.
    java -jar capture.jar -r localhost:3333 -p 127.0.0.1:1234 -a -c image.jpg

    Note: In order for RDV to automatically interpret your image correctly you should specify a channel name that ends in .jpg

Compressed Video vs. MJPEG

Although it is possible (and easy) to dump binary video data into a DataTurbine server this is, often not the desired endeavor. Compressed video is comprised of a series of key frames and annotation of changes between the frames. When accessing an arbitrary point in the video, programs need to seek to the last key frame in the video stream and rebuild the video up to the desired point. This is typically beyond the scope of analysis routines and is not supported by viewer applications such as RDV.

Instead the preferred method is to convert the compressed video into as series of individual JPEG files. When played in a client like RDV it still behave like a video, but analysis routines and other programs can seek to an arbitrary point in the file without the need to reconstruct it.

Open Source DataTurbine Initiative © 2017 Frontier Theme