JetsonTK1 MPEG-2 and MJPEG video decoding using gst-launch

Hello all,

Need help in playback of MPEG-2 and MJPEG video using gstreamer’s gst-launch

For playing H.264 and VP8, we used the following pipeline , got help from

gst-launch-0.10 filesrc location=test.webm ! qtdemux name=demux demux.video_00 ! queue ! nv_omx_vp8dec ! nv_omx_hdmi_videosink -e
gst-launch-0.10 filesrc location=test.mp4 ! qtdemux name=demux demux.video_00 ! queue ! nv_omx_h264dec ! nv_omx_hdmi_videosink -e

Looks like below are the hardware accelerated decoder elements available

omx:  nv_omx_vorbisdec: OpenMAX IL Vorbis audio decoder
omx:  nv_omx_mpeg2dec: OpenMAX IL MPEG2 video decoder
omx:  nv_omx_mpeg4dec: OpenMAX IL MPEG-4 video decoder
omx:  nv_omx_h264dec: OpenMAX IL H.264/AVC video decoder
omx:  nv_omx_vp8dec: OpenMAX IL VP8 video decoder
omx:  nv_omx_h263dec: OpenMAX IL H.263 video decoder
omx:  nv_omx_wmvdec: OpenMAX IL WMV video decoder
omx:  nv_omx_jpegdec: OpenMAX IL JPEG decoder
omx:  nv_omx_wmadec: OpenMAX IL WMA audio decoder
omx:  nv_omx_wmaprodec: OpenMAX IL WMA audio decoder
omx:  nv_omx_wmalosslessdec: OpenMAX IL WMA audio decoder
omx:  nv_omx_mp3dec: OpenMAX IL MP3 audio decoder
omx:  nv_omx_mp2dec: OpenMAX IL MP2 audio decoder
omx:  nv_omx_aacdec: OpenMAX IL AAC audio decoder

Any information on the pipeline elements to be used for the demuxer and hardware accelerated decoder for MPEG-2 and MJPEG would be greatly helpful.

For mpeg2 you need to use “nv_omx_mpeg2dec” and for mjpeg I think it’s “nv_omx_jpegdec”. The demux doesn’t need to be from nvidia as it really isn’t HW accelerated. Maybe “mpegtsparse” or “tsdemux” or “tsparse” could work?

If you don’t need to explicitly say the pipeline, try with playbin:

gst-launch-0.10 playbin2 uri=file:///path/to/file

Or with newer GStreamer:

gst-launch-1.0 playbin uri=file:///path/to/file