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.

TMS320DM8168: Gstreamer pipeline for 8168 with EZ SDK 5_5_02_00

Part Number: TMS320DM8168

Hello All,

I am trying to use gstreamer for playback of H264 content and display over LCD.

I did follow the steps outlined on http://processors.wiki.ti.com/index.php/DM81xx_Gstreamer_Plugin#Download to compile gstreamer and install on the device. I have used tag TAG_DM81XX_RELEASE_0_03 from svn.

When I try to playback a h264 elementary stream I get the below error:

#gst-launch-0.10 -vv filesrc location=sample.h264  ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-device=LCD ! omx_videosink display-device=LCD sync=false

** (gst-launch-0.10:1327): CRITICAL **: g_omx_core_init: assertion `core->omx_handle' failed

** (gst-launch-0.10:1327): CRITICAL **: g_omx_core_init: assertion `core->omx_handle' failed
WARNING: erroneous pipeline: could not link omxbasectrl0 to omxvideosink0

I tried playing the same file using decode display sample and it worked fine.

#./decode_display_a8host_debug.xv5T -i sample.h264 -w 1920 -h 1080 -f 30 -g 0 -d 1 -c h264

Am I missing something? Am I using the correct gstreamer tag? I also tried replacing the libgstomx.so from ezsdk and still same error.

Would appreciate any help in this regard.

Thanks,

Amit

  • Hello,

    The gstreamer is included in EZSDK.

    You could try:
    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD ! gstperf ! 'video/x-raw-yuv,width=(int)800,height=(int)480' ! omx_videosink sync=false display-device=LCD

    You also could use v4l2sink element instead of omx_videosink.

    Here is example pipeline:


    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)800,height=(int)480' ! gstperf ! v4l2sink userpointer=false device=/dev/video2 min-queued-bufs=2

    But in this case you must load v4l2 firmware(load-hd-v4l2-firmware.sh).


    BR
    Margarita
  • Thanks Margarita for your reply.

    I am now using the gstreamer binaries/libraries provided with EZSDK (ti-ezsdk_dm816x-evm_5_05_02_00_demo_binaries.tar.gz). I am able to play the video on HDMI, but no output on LCD using gstreamer. The load-hd-v4l2-firmware.sh script that I am using is attached herewith.

    I am suspicious that I am configuring the display in wrong way.

    Here are the steps that I followed:

    1) Boot DM8168 after login try to play video using gstreamer on HDMI

    # gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! 'video/x-raw-yuv,width=(int)800,height=(int)480' ! omx_videosink sync=false

    This succeeds. Even playing using decode display sample works:

    ./decode_display_a8host_debug.xv5T -i sample.h264 -w 1920 -h 1080 -f 30 -g 0 -d 0 -c h264

    Now I run setup_480x272_display.sh (The HDMI display isn't supported once I run this ) and try to execute gstreamer pipeline as suggested by you:

    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD ! gstperf ! 'video/x-raw-yuv,width=(int)800,height=(int)480' ! omx_videosink sync=false display-device=LCD

    This doesn't show any display on LCD, however no error on gstreamer

    If I play using decode_display The video is displayed on LCD:

    ./decode_display_a8host_debug.xv5T -i sample.h264 -w 1920 -h 1080 -f 30 -g 0 -d 1 -c h264   #Displays proper video on LCD

    I have also attached the boot logs for your reference. Do let me know if I am missing anything crucial. Also note this is a custom designed board for our client and not a reference unit. But I guess that shouldn't make any difference since decode display sample is working fine.

    6136.logs.tar.gz

  • Hello,

    I can not try this use case since the DM8168 EVM does not have LCD. 

    Could you try this pipeline in this case:

    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD ! gstperf ! 'video/x-raw-yuv,width=(int)480,height=(int)272' ! omx_videosink sync=false display-device=LCD

    Could you link me the output of when the pipeline is executed.

    You could check this guide also:

    Could you try these steps:

    /etc/init.d/matrix-gui-e stop

    /etc/init.d/pvr-init stop

    cd /usr/share/ti/ti-media-controller-utils

    load-hd-firmware.sh stop

    load-hd-v4l2-firmware.sh start

    echo 1:dvo2 > /sys/devices/platform/vpss/graphics0/nodes

    echo 0 > /sys/devices/platform/vpss/display1/enabled

    echo 9500,480/2/40/71,272/2/2/10,1 > /sys/devices/platform/vpss/display1/timings

    echo triplediscrete,rgb888 > /sys/devices/platform/vpss/display1/output

    echo 1 > /sys/devices/platform/vpss/display1/enabled

    fbset -xres 480 -yres 272 -vxres 480 -vyres 272

    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)480,height=(int)272' ! gstperf ! v4l2sink userpointer=false device=/dev/videoX min-queued-bufs=2

    Where /dev/videoX is the LCD.

    Could you link me this output also?

    BR

    Margarita

  • Hi Margarita,

    No luck with this as well. Kindly find attached the required logs.

    I am not running the matrix-gui and have load-hd-v4l2-firmware.sh loaded initially (We don't use load-hd-firmware.sh)

    Thanks,

    Amit

    0714.logs.txt
    ============================ Output after first pipeline No display ==============================
    
    root@dm816x-evm:~# gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MO
    DE_1080P_60 display-device=LCD ! gstperf ! 'video/x-raw-yuv,width=(int)480,height=(int)272' ! omx_videosink sync=false display-device=LCD
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, framed=(boolean)false
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, framed=(boolean)false
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080
    /GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080
    /GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080
    /GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, interlaced=(boolean)false, framerate=(fraction)0/1
    
    (gst-launch-0.10:1259): 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)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, interlaced=(boolean)false, framerate=(fraction)0/1
    /GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, interlaced=(boolean)false, framerate=(fraction)0/1
    /GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstOmxBaseCtrl:omxbasectrl0.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstOmxVideoSink:omxvideosink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    perf0: frames: 19       current: 18.11   average: 18.11 arm-load: 11
    perf0: frames: 33       current: 13.54   average: 15.84 arm-load: 6
    perf0: frames: 47       current: 13.53   average: 15.07 arm-load: 5
    perf0: frames: 61       current: 13.54   average: 14.69 arm-load: 8
    perf0: frames: 75       current: 13.54   average: 14.46 arm-load: 8
    perf0: frames: 89       current: 13.53   average: 14.31 arm-load: 8
    perf0: frames: 103      current: 13.53   average: 14.20 arm-load: 7
    
    
    
    
    ============================ Output after following the steps and executing gstreamer again ===========================================
    root@dm816x-evm:~# gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)480
    ,height=(int)272' ! gstperf ! v4l2sink userpointer=false device=/dev/video1 min-queued-bufs=2
    Setting pipeline to PAUSED ...
    
    ** (gst-launch-0.10:1291): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed
    
    ** (gst-launch-0.10:1291): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed
    
    ** (gst-launch-0.10:1291): CRITICAL **: gst_v4l2sink_sync_flip: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &control) >= 0' failed
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, framed=(boolean)false
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, framed=(boolean)false
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080
    /GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080
    /GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080
    /GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, interlaced=(boolean)false, framerate=(fraction)0/1
    
    (gst-launch-0.10:1291): 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)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, interlaced=(boolean)false, framerate=(fraction)0/1
    /GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, interlaced=(boolean)false, framerate=(fraction)0/1
    /GstPipeline:pipeline0/GstOmxScaler:omxscaler0.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)480, height=(int)272, format=(fourcc)YUY2, framerate=(fraction)0/1, interlaced=(boolean)false
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    perf0: frames: 2        current: 1.87    average: 1.87  arm-load: 7
    perf0: frames: 105      current: 101.93  average: 50.51 arm-load: 45
    perf0: frames: 197      current: 91.58   average: 63.89 arm-load: 49
    perf0: frames: 290      current: 92.38   average: 70.91 arm-load: 45
    perf0: frames: 382      current: 91.86   average: 75.03 arm-load: 49
    OMX_EventError: 0x8000100b
    Stream is corrupt error, ignorable ... 
    perf0: frames: 473      current: 90.10   average: 77.52 arm-load: 43
    perf0: frames: 564      current: 90.72   average: 79.39 arm-load: 53
    perf0: frames: 652      current: 87.33   average: 80.37 arm-load: 66
    OMX_EventError: 0x8000100b
    Stream is corrupt error, ignorable ... 
    perf0: frames: 739      current: 86.25   average: 81.02 arm-load: 64
    perf0: frames: 826      current: 86.54   average: 81.57 arm-load: 57
    perf0: frames: 915      current: 88.53   average: 82.20 arm-load: 49
    perf0: frames: 1004     current: 88.95   average: 82.76 arm-load: 47
    perf0: frames: 1094     current: 89.12   average: 83.25 arm-load: 54
    perf0: frames: 1184     current: 89.00   average: 83.66 arm-load: 56
    ^CCaught interrupt -- perf0: frames: 1274       current: 89.44   average: 84.04 arm-load: 52
    handling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 15249284445 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.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
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@dm816x-evm:~#
    
    =================================================================== Logs for decode_display : Video displayed on LCD =============================================================================
    root@dm816x-evm:/usr/share/ti/ti-omx# ./decode_display_a8host_debug.xv5T -i /home/root/sample.h264 -w 1920 -h 1080 -f 30 -g 0 -d 1 -c h264
    input file: /home/root/sample.h264
    width: 1920
    height: 1080
    frame_rate: 30
    gfx: fbdev disable
    codec: h264
    display_id: 1
     Decoder-Display example 
    ===============================
     OMX_Init completed 
     UIAClient is ready to send a UIA configuration command
    UIAClient received UIA_CONFIGURE_ACK
    UIAClient is done sending requests
    UIAClient is ready to send a UIA configuration command
    UIAClient received UIA_CONFIGURE_ACK
    UIAClient is done sending requests
     opening file 
     decoder compoenent is created 
    PADX: 32 PADY: 24
     level set is 12 
     scalar compoenent is created 
    set input port params (width = 1920, height = 1080) 
    set output port params (width = 480, height = 272) 
    set number of channels 
    set input resolution 
    set output resolution 
    enable scalar input port 
    got eventEnable/Disable Event 
    enable scalar output port 
    got eventEnable/Disable Event 
    found handle 0x13c2e0 for component OMX.TI.VPSSM3.VFDC 
     got display handle 
    found handle 0x1402e8 for component OMX.TI.VPSSM3.CTRL.DC
    Buffer Size computed: 261120
    set input port params (width = 1920, height = 1080) 
    setting input and output memory type to default
    enable input port 
    got eventEnable/Disable Event 
     connect call for decoder-scalar 
      connect call for scalar-display 
      decoder inport buffers allocated 
      decoder outport buffers allocated 
     got eventState changed to: OMX_StateIdle 
     decoder state IDLE 
      Scalar input port use buffer done 
      scalar outport buffers allocated 
     got eventState changed to: OMX_StateIdle 
     scalar state IDLE 
     got eventState changed to: OMX_StateIdle 
     ctrl-dc state IDLE 
     got eventState changed to: OMX_StateIdle 
     display state IDLE 
     got eventState changed to: OMX_StateExecuting 
     display control state execute 
     got eventState changed to: OMX_StateExecuting 
     display state execute 
     got eventState changed to: OMX_StateExecuting 
     scalar state execute 
     got eventState changed to: OMX_StateExecuting 
     decoder state execute 
      file read thread created 
      decoder connect thread created 
      scalar connect thread created 
      display connect thread created 
      executing the appliaction now!!!
    

  • Hello,

    Are you sure that /dev/video1 is right?
    On the evm /dev/video1 is the HDMI.

    BR
    Margarita
  • Tried with /dev/video2 as well but same result. No video displayed.
  • Hello,

    Since the decode_display demo the gstreamer should works also.

    Are you using the default decode_display demo or you made some changes in it?
    Are you using the default gstreamer in the EZSDK or the compiled version?

    BR
    Margarita
  • Sorry for delayed response.

    It should be the default one. Yet I will confirm with you soon.

    Thanks,

    Amit

  • Hello,

    Let me know.

    BR
    Margarita
  • Hello

    what happen about your discussion ? :)
    is the problem solve by
  • Yes. There were some display related changes that we did for decode_display application. Changing those in gstreamer made things work.
  • Hello , Thanks for your Reply.
    Can I ask What changes was? Could you Please Explain
    Thank You :)