NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

DM81xx Gstreamer Pipelines

From Texas Instruments Wiki
Jump to: navigation, search


Introduction[edit]

The below GStreamer example pipelines are verified on EZSDK 5.05.01.04 for both DM816x and DM814x platforms

Environment Settings[edit]

export GST_REGISTRY=/tmp/gst_registry.bin
export LD_LIBRARY_PATH=/opt/gstreamer/lib
export GST_PLUGIN_PATH=/opt/gstreamer/lib/gstreamer-0.10
export PATH=/opt/gstreamer/bin:$PATH
export GST_PLUGIN_SCANNER=/opt/gstreamer/libexec/gstreamer-0.10/gst-plugin-scanner =



Decode Pipelines[edit]

# pipeline decode elemenatry H.264 stream
gst-launch -v filesrc location=sample.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! omx_videosink sync=false


# pipeline to decode MP4 container (H.264 + AAC)
gst-launch filesrc location="sample.mp4" ! qtdemux name=demux demux.audio_00 ! queue ! faad ! alsasink demux.video_00 ! queue ! h264parse ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! omx_videosink


# pipeline to decode H.264 video streamed over RTSP/RTP
gst-launch rtspsrc location=rtsp://172.24.136.242:5544/test ! rtph264depay ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! omx_videosink sync=false


# play mpeg2 ts file with MPEG-2 HD video and AC3 audio (progressive content)
gst-launch -v filesrc location=sample.ts typefind=true ! ffdemux_mpegts name=demux demux.video_00 ! queue ! mpegvideoparse ! omx_mpeg2dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink demux.audio_00 ! queue ! ffdec_ac3 ! alsasink


# play mpeg2 ts file with MPEG-2 HD video and AC3 audio (interlaced content)
gst-launch -v filesrc location=sample.ts typefind=true ! ffdemux_mpegts name=demux demux.audio_00 ! queue ! ffdec_ac3 ! alsasink demux.video_00 ! queue ! mpegvideoparse ! omx_mpeg2dec ! omx_mdeiscaler name=d d.src_00 ! v4l2sink sync=false


# play mpeg2 ts file with H264 video
gst-launch -v filesrc location=tekken6.ts ! mpegtsdemux ! h264parse output-format=1 access-unit=true ! omx_h264dec ! omx_scaler ! v4l2sink min-queued-bufs=3


# play DVD video (VOB) ts file with MPEG-2 video and MPEG1-L2 audio (interlaced content)
gst-launch -v filesrc location=sample.VOB typefind=true ! ffdemux_mpeg name=demux demux.video_00 ! mpegvideoparse ! omx_mpeg2dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080I_60 ! gstperf ! omx_videosink display-mode=OMX_DC_MODE_1080I_60 demux.audio_00 ! ffdec_mp3 ! alsasink


# play MPEG-2 elementary stream using V4L2 sink
gst-launch -v filesrc location=sample.m2v typefind=true ! mpegvideoparse ! omx_mpeg2dec ! omx_scaler ! v4l2sink


# play WMV stream using V4L2 sink
gst-launch -v filesrc location=sample.wmv ! asfdemux name=demux demux.video_00 ! queue ! omx_vc1dec ! omx_scaler ! v4l2sink demux.audio_00 ! queue ! ffdec_wmav2 ! audioconvert ! audioresample ! audiorate ! 'audio/x-raw-int,rate=48000,channels=2' ! alsasink


# pipeline to scale the decoded video to 720P using omx_scaler element
gst-launch filesrc location=sample.264 ! typefind ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! 'video/x-raw-yuv,width=1280,height=720' ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink sync=false -v


# play mp4 using playbin2
gst-launch -v playbin2 uri=file:///home/root/sample.mp4


# Mosaic 4 decoded H.264 elementary streams from file input, each of 1280x720 size, into one video output stream of 1270x720 size
gst-launch omx_videomixer framerate=30 port-index=0 name=mix !gstperf! v4l2sink userpointer=true filesrc location=sample_1.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_2.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_3.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix. filesrc location=sample_4.h264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! mix.


# Mosaic 4 decoded H.264 elementary streams from a RTP streaming source, each of 1280x720 size, into one video output stream of 1270x720 size
gst-launch omx_videomixer framerate=30 port-index=0 name=mix ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink sync=false rtspsrc location=rtsp://172.24.136.242:5544/test ! rtph264depay ! h264parse access-unit=true ! omx_h264dec ! mix. rtspsrc location=rtsp://172.24.136.242:5544/test1 ! rtph264depay ! h264parse access-unit=true ! omx_h264dec ! mix. rtspsrc location=rtsp://172.24.136.242:5544/test2 ! rtph264depay ! h264parse access-unit=true ! omx_h264dec ! mix. rtspsrc location=rtsp://172.24.136.242:5544/test3 ! rtph264depay ! h264parse access-unit=true ! omx_h264dec ! mix.



Pipelines using De-interlacer[edit]

There are 2 instances of de-interlacer hardware and their corresponding gstreamer elements.

  1. omx_mdeiscaler - The medium quality deinterlacer and scaler - available on DM816x and DM814x processors
  2. omx_hdeiscaler - The high quality deinterlacer and scaler - available on DM816x processors only. Not available in DM814x

Deiscaler element(s) has 2 ouputs

  1. src_00 - Outputs YUV 422 suitable for display
  2. src_01 - Outputs YUV 420 suitable for input to an encoder - for transcode use-cases.

Framerate: The dei-scaler element(s), by default outputs at twice the framerate for interlaced content. For progressive content the default output framerate is the same as input framerate. For example, if the input is 1920x1080i 30 frames per second (or 60 fields per second) - the deiscaler element outputs 60 frames per second. To control the output framerate coarsely, the deiscaler element(s) provides the framerate-divisor property. By setting this value to 'n', the output framerate will be "input framerate / n".


# pipeline to decode and display (de-interlaced video)

gst-launch -v filesrc location=BALLOONS.TRP ! mpegtsdemux ! mpegvideoparse ! omx_mpeg2dec ! omx_hdeiscaler name=d d.src_00 ! v4l2sink sync=false


# pipeline to decode and display (scaled up to 1920x1080)
gst-launch -v filesrc location=NTSC720_8_0Mbs.ts ! mpegtsdemux ! mpegvideoparse ! omx_mpeg2dec ! omx_hdeiscaler name=d d.src_00 ! 'video/x-raw-yuv, width=(int)1920, height=(int)1080' ! v4l2sink min-queued-bufs=2


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DM81xx Gstreamer Pipelines here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DM81xx Gstreamer Pipelines here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article DM81xx Gstreamer Pipelines here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article DM81xx Gstreamer Pipelines here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article DM81xx Gstreamer Pipelines here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DM81xx Gstreamer Pipelines here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DM81xx Gstreamer Pipelines here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article DM81xx Gstreamer Pipelines here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DM81xx Gstreamer Pipelines here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity