This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TMS320DM8168: Playing Interlaced Video on 1080P display using gstreamer

Part Number: TMS320DM8168

Tool/software: Linux

Hi,

I wanted to play an interlaced video on a 1080P display using gstreamer. The video plays fine however the video is splited on the display. The pipeline used as below with the logs:

root@dm816x-evm:~# gst-launch -v filesrc location=/usr/share/ti/data/videos/Viet_HTV-mpts_h264_mp3.ts  typefind=true ! mpegtsdemux name=demux demux.video_0254 ! queue ! h264parse access-unit=true ! omx_h2
64dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)1920,height=(int)1080' ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink sync=true
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstFileSrc:filesrc0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstMpegTSDemux:demux.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstMpegTSDemux:demux: pat-info = ((GValueArray*) 0x196110)
/GstPipeline:pipeline0/GstMpegTSDemux:demux: pmt-info = ((MpegTsPmtInfo*) 0x1c0200)
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, height=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, height=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)720, height=(int)576
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896, interlaced=(boolean)false, framerate=(fraction)0/1
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
OMX_EventError: 0x8000100b
Stream is corrupt error, ignorable ...
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896, interlaced=(boolean)true, framerate=(fraction)0/1

(gst-launch-0.10:1436): GStreamer-CRITICAL **: _gst_util_uint64_scale_int: assertion `denom > 0' failed
/GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896, interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)720, height=(int)576, format=(fourcc)NV12, rowstride=(int)896, interlaced=(boolean)true, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:src: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:src: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:sink: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
/GstPipeline:pipeline0/GstOmxVideoSink:omxvideosink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)1920, height=(int)1080, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)true
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
perf0: frames: 7        current: 6.95    average: 6.95  arm-load: 2
perf0: frames: 32       current: 24.98   average: 15.93 arm-load: 17
perf0: frames: 58       current: 25.01   average: 19.03 arm-load: 16
perf0: frames: 83       current: 24.99   average: 20.50 arm-load: 22
perf0: frames: 109      current: 25.00   average: 21.42 arm-load: 19
perf0: frames: 135      current: 25.01   average: 22.03 arm-load: 14
perf0: frames: 160      current: 24.99   average: 22.45 arm-load: 19
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 7738023408 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstOmxVideoSink:omxvideosink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = NULL

(gst-launch-0.10:1436): GStreamer-CRITICAL **: gst_mini_object_unref: assertion `GST_IS_MINI_OBJECT (mini_object)' failed
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstMpegTSDemux:demux.GstPad:video_0254: caps = NULL
/GstPipeline:pipeline0/GstMpegTSDemux:demux.GstPad:audio_0048: caps = NULL
/GstPipeline:pipeline0/GstMpegTSDemux:demux.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstFileSrc:filesrc0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
root@dm816x-evm:~#

Kindly let me know if I am missing anything.

Thanks,

Amit

  • Hello,

    You see it split because you are playing video with interlaced content and using omx_scaler. In this case you should use omx_mdeiscaler or omx_hdeiscaler instead of omx_scaler.

    Here is some examples:
    gst-launch -v filesrc location=x.h264 ! 'video/x-h264' ! queue ! h264parse ! omx_h264dec ! omx_mdeiscaler name=d d.src_00 ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! 'video/x-raw-yuv,width=(int)1920,height=(int)1080' ! gstperf ! omx_videosink d.src_01 ! fakesink silent=true sync=true


    gst-launch -v filesrc location=jstr.ts typefind=true ! mpegtsdemux ! queue ! mpegvideoparse ! omx_mpeg2dec ! omx_mdeiscaler name=d d.src_00 ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink d.src_01 ! fakesink silent=true sync=true

    Hope this helps.

    Do you have the overlay package ?

    BR
    Margarita
  • Hello,

    You also could try:
    gst-launch -v filesrc location=xx.ts ! mpegtsdemux name=demux demux. ! queue ! mpegvideoparse ! omx_mpeg2dec ! omx_mdeiscaler framerate-divisor=2 gen-timestamps=false name=d d.src_00 ! omx_ctrl display-mode=OMX_DC_MODE_1080P_30 ! omx_videosink display-mode=OMX_DC_MODE_1080P_30 render-delay=500000000000

    BR
    Margarita