Schroedinger and GStreamer
From Diracvideo
The schroedinger library includes an optional gstreamer plugin which is compiled when '--enable-gst' is included on the configure line.
The installation of the gstreamer plugin can be checked with 'gst-inspect schrodec'. This will dump information about the schroedinger decoder plugin.
Contents |
[edit] Encoding video with gstreamer
Here are a few examples of using gstreamer at the command line to encode various different input formats into raw and wrapped dirac formats. You can mix and match parts of the examples to suit your application.
[edit] Encoding to a dirac bytestream from a multiframe YUV file
The following command will encode a multi frame raw YUV input file in I420 format into a dirac bytestream.
gst-launch filesrc location=input_video.i420 \
videoparse format=0 width=1920 height=1080 ! \
ffmpegcolorspace ! \
schroenc ! \
filesink location=output_bytestream.drc
The 'videoparse' element accepts parameters which describe the raw video data, and should be changed to suit your source material. Other parameters can be set on the videoparse element which can be listed with 'gst-inspect videoparse'.
There are many parameters on the 'schroenc' element. See ....fixme.... for details.
[edit] Encoding to a dirac bytestream from individual frames
The following command will convert a sequence of PNG images to I420 video, then encode them as a dirac bytestream. The first file name is input_video_00001.png.
gst-launch multifilesrc location=input_video_%05d.png index=1 \
caps="image/png, framerate=25/1" ! \
pngdec ! \
ffmpegcolorspace ! \
video/x-raw-yuv,format=\(fourcc\)I420 ! \
schroenc ! \
filesink location=output_bytestream.drc
[edit] Encoding dirac video in an ogg wrapper
gst-launch filesrc location=input_video.i420 ! \
videoparse format=0 width=1920 height=1080 framerate=25/1 ! \
ffmpegcolorspace ! \
schroenc ! \
oggmux ! \
filesink location=out.ogg
