GStreamer: commandline encoding from raw to h264


We assume that the Jetsons have already been setup with basic Gstreamer 1.0 installation. If not, or if you are trying this on a separate computer, you have to install GStreamer1.0 executable files. (Development files are not mandatory at this point.)

To test GStreamer capabilities on commandline, without developing applications and including libgstreamermm, it may be necessary to complete gstreamer's bad-plugins installation.

You can run gst-inspect-1.0 h264parse to check whether you need to install the bad plugins or not. If the inspect h264parse instruction says it cannot find the h264parse element, you need to install the missing gst plugins on the device. The instruction is:

sudo apt-get install gstreamer1.0-plugins-bad

Encoding tests

Assuming there is a raw videofile called ContinuousGrab in your working directory, recorded with Basler's pixel format (YCbCr422_8). See note on pixelformats below.

Begin Note on pixelformats YCbCr filetype documentations:

YCbCr422_8 == YUYV format aka YUY2


Encoding tests cont.

This works, when saving raw Basler data (see ContinuousGrab, just basler's produced image buffer without any converter), on jetson: gst-launch-1.0 filesrc location=ContinuousGrab ! videoparse width=1600 height=1200 framerate=24/1 format=4 ! videoconvert ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=test.mp4 -e

(videoparse format 4 = YUY2, 15 = RGB, 25=gray8, ).

Example with encoder parameters

Update test