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.

gst-launch - decode - omx_h264dec - runs indefinitely producing larger output file

EZSDK version - 5_03_01_15


Compiled the gst-openmax that comes with the EZSDK and installed the files to the target fiesystem.


I was trying to run the gst-launch to decode the sample file (dm816x_1080p_demo.264) that comes with the EZSDK.

The process was running indefinitely and producing a large output file. Could you please help to know about this issue.

export GST_REGISTRY=/tmp/gst_registry.bin
export LD_LIBRARY_PATH=/opt/gstreamer/lib:/usr/lib
export GST_PLUGIN_PATH=/opt/gstreamer/lib/gstreamer-0.10
export PATH=/opt/gstreamer/bin:$PATH
root@dm814x-evm:~# ls -lh /usr/share/ti/data/videos/dm816x_1080p_demo.264

-rwxr-xr-x    1 root     root       155.3M Apr  8  2011 /usr/share/ti/data/videos/dm816x_1080p_demo.264
root@dm814x-evm:~# gst-launch-0.10 -v filesrc location=/usr/share/ti/data/videos
/dm816x_1080p_demo.264 ! video/x-h264, widhth=1920, height=1080,framerate=30/1 !
 h264parse access_unit=true ! omx_h264dec component-name=OMX.TI.DUCATI.VIDDEC li
brary-name=libtiomx.so ! gstperf ! filesink location=/home/root/output2
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, widhth=(int)1920, height=(int)1080, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, widhth=(int)1920, height=(int)1080, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, widhth=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(strin0
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, widhth=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(st0
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:sink: caps = video/x-h264, widhth=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(st0
/GstPipeline:pipeline0/GstOmxH264Dec:omxh264dec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(ine
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, frame
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2048, frae
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1920, height=(int)1080, format=(fourcc)NV12, rowstride=(int)2e
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
frames: 5       current: 4.78    average: 4.78  arm-load: 23
frames: 7       current: 0.72    average: 1.84  arm-load: 100
frames: 11      current: 0.70    average: 1.16  arm-load: 100
frames: 15      current: 3.06    average: 1.39  arm-load: 100
frames: 18      current: 2.02    average: 1.46  arm-load: 100
frames: 22      current: 3.61    average: 1.64  arm-load: 100
frames: 25      current: 2.99    average: 1.74  arm-load: 100
frames: 26      current: 0.23    average: 1.38  arm-load: 100
frames: 31      current: 0.23    average: 0.77  arm-load: 99
frames: 35      current: 0.32    average: 0.66  arm-load: 100
frames: 40      current: 4.48    average: 0.74  arm-load: 100
frames: 41      current: 0.13    average: 0.66  arm-load: 100
frames: 45      current: 0.27    average: 0.59  arm-load: 100
frames: 50      current: 0.41    average: 0.56  arm-load: 100
frames: 55      current: 2.51    average: 0.61  arm-load: 100
frames: 56      current: 0.14    average: 0.57  arm-load: 100
frames: 60      current: 2.79    average: 0.60  arm-load: 100
frames: 62      current: 0.11    average: 0.53  arm-load: 100
frames: 65      current: 0.59    average: 0.53  arm-load: 100
frames: 70      current: 1.13    average: 0.55  arm-load: 100
frames: 73      current: 2.26    average: 0.57  arm-load: 100
frames: 76      current: 0.51    average: 0.57  arm-load: 100
frames: 80      current: 3.32    average: 0.59  arm-load: 100
frames: 81      current: 0.29    average: 0.58  arm-load: 100
frames: 83      current: 0.38    average: 0.58  arm-load: 99
frames: 86      current: 2.15    average: 0.59  arm-load: 100
frames: 88      current: 0.23    average: 0.57  arm-load: 100
frames: 93      current: 1.25    average: 0.59  arm-load: 100
frames: 96      current: 0.48    average: 0.58  arm-load: 100
frames: 101     current: 0.67    average: 0.59  arm-load: 100
frames: 106     current: 3.33    average: 0.61  arm-load: 100
frames: 107     current: 0.18    average: 0.60  arm-load: 94
frames: 110     current: 2.86    average: 0.61  arm-load: 100
frames: 111     current: 0.20    average: 0.60  arm-load: 100
frames: 116     current: 4.29    average: 0.62  arm-load: 100
frames: 117     current: 0.15    average: 0.61  arm-load: 100
frames: 122     current: 1.53    average: 0.62  arm-load: 100
frames: 126     current: 0.54    average: 0.62  arm-load: 99
frames: 130     current: 3.99    average: 0.64  arm-load: 100
frames: 134     current: 2.25    average: 0.65  arm-load: 100
frames: 136     current: 0.50    average: 0.65  arm-load: 100
frames: 141     current: 1.06    average: 0.66  arm-load: 100
frames: 146     current: 4.08    average: 0.67  arm-load: 100
frames: 147     current: 0.22    average: 0.67  arm-load: 100
frames: 152     current: 2.87    average: 0.68  arm-load: 100
frames: 153     current: 0.18    average: 0.67  arm-load: 100
frames: 158     current: 4.33    average: 0.69  arm-load: 100
frames: 160     current: 0.31    average: 0.68  arm-load: 100
frames: 165     current: 0.86    average: 0.68  arm-load: 93
frames: 168     current: 2.78    average: 0.69  arm-load: 100
frames: 171     current: 0.63    average: 0.69  arm-load: 100
frames: 175     current: 3.86    average: 0.70  arm-load: 100
frames: 177     current: 0.75    average: 0.71  arm-load: 100
frames: 181     current: 3.60    average: 0.72  arm-load: 100
frames: 185     current: 3.40    average: 0.73  arm-load: 100
frames: 186     current: 0.45    average: 0.73  arm-load: 99
frames: 190     current: 3.85    average: 0.74  arm-load: 100
frames: 192     current: 0.61    average: 0.74  arm-load: 100
frames: 196     current: 4.00    average: 0.75  arm-load: 100
frames: 198     current: 0.29    average: 0.74  arm-load: 100
frames: 202     current: 3.29    average: 0.75  arm-load: 100
frames: 205     current: 0.77    average: 0.75  arm-load: 100
frames: 209     current: 2.15    average: 0.76  arm-load: 100
frames: 214     current: 1.80    average: 0.77  arm-load: 100
frames: 218     current: 3.33    average: 0.78  arm-load: 100
frames: 222     current: 3.00    average: 0.79  arm-load: 100
frames: 223     current: 0.82    average: 0.79  arm-load: 100
frames: 227     current: 3.98    average: 0.80  arm-load: 100
frames: 229     current: 1.18    average: 0.81  arm-load: 100
frames: 233     current: 3.54    average: 0.82  arm-load: 100
frames: 235     current: 1.12    average: 0.82  arm-load: 100
frames: 239     current: 3.31    average: 0.83  arm-load: 100
frames: 243     current: 3.48    average: 0.84  arm-load: 100
frames: 244     current: 0.57    average: 0.84  arm-load: 100
frames: 248     current: 3.74    average: 0.85  arm-load: 100
frames: 249     current: 0.45    average: 0.85  arm-load: 100
frames: 253     current: 3.38    average: 0.86  arm-load: 100
frames: 257     current: 1.31    average: 0.86  arm-load: 100
frames: 260     current: 2.78    average: 0.87  arm-load: 100
Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 300553870449 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = NULL

(gst-launch-0.10:1112): GStreamer-CRITICAL **: gst_caps_is_fixed: assertion `GST_IS_CAPS (caps)' failed

** (gst-launch-0.10:1112): CRITICAL **: gst_base_transform_find_transform: assertion `gst_caps_is_fixed (caps)' failed
frames: 261     current: 0.48    average: 0.87  arm-load: 100
/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@dm814x-evm:~#

  • Since your pipeline is trying to dump the output frames to a file, it is running pretty slow. Also the each frame output would be around 3MB, so the output file size naturally will be big. 

    Thanks

    Satish

    Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

  • Thanks Sathish! That answered part of the question.

    Why is it running indefinitely, until I interrupt ( by pressing CTRL + C ).

  • Karthikeyan ,

    I don't think the pipeline was going to run indefinitely, from your log it shows it just finished decoding around 260 frames. If you wouldn't have interrupted it, it would have decoded all the frames and stopped. BTW why are you trying to dump the output frames, you can watch them on a display instead using a decode+display pipeline.

    Thanks,

    Satish

    Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

  • Hi Sathish,

    Thanks!

    I wanted the decoded output to be stored in the file for reference, rather than displaying it.

    I interrupted the process, since the file size grew bigger. I shall test this without interrupting the decode process.

    I have an another question. The memory map is 512MB. The media controller utils/src/memsegdef_dm81xxbm_512M.c file, though named as 512M, it does not have the 512M configurations. I suppose, I need to edit it to suit the 512MB, generate the mm_dm81xxbm_512M.bin and load it through firmware_loader program. Is this right?

  • Hey ,

    I'm running this gStreamer line to make capture :

    gst-launch v4l2src device="/dev/video0" always-copy=false queue-size=12 num-buffers=2000 ! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1280,height=720,framerate=(fraction)25/1' ! omxbufferalloc numBuffers=12 ! omx_h264enc bitrate=5000000 ! gstperf ! h264parse output-format=0 ! rtph264pay ! udpsink host=192.168.16.106 port=5000

    The following line is for the receiving :

    gst-launch-0.10 udpsrc port=5000 ! 'application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96' ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false

    IT WORKS GREAT ON LINUX ! I check it ! .. but when i change the sync to sync=true it doesn't

    MY PROBLEM IS THAT I NEED TO RUN THE RECEIVING LINE ON WINDOWS WHICH DOESN'T WORK.

    i can see in wireshark that i got the packages with no fregmantation ..

    what should i do ? someone have any idea ? 

  •  Hello Satish:

        Now I use ezsdk_5_04_00_11(or the older version) on DM8148,and When I use the gst-omx(and gstreamer)  command to play a Mpeg2  or H264 video ,I found the rate of playing the video was faster than the actual rate:

    example one:
    use gst-launch to play a uniticast:
    gst-launch udpsrc port=12345 ! mpegtsdemux ! video/mpeg ! mpegvideoparse ! omx_mpeg2dec ! omx_mdeiscaler name=d d.src_00 ! 'video/x-raw-yuv,width=800,height=480' ! omx_ctrl display-device=LCD ! gstperf ! omx_videosink sync=false display-device=LCD sync=false d.src_01 ! fakesink silent=true
     
    result:
           The rate of playing is not sync than the actual video rate,and is faster than the fact video.
     
    example two:
     Test the example on DM8148(H264 video file):
    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=800,height=480' ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD \
    ! omx_videosink sync=false  top=0 left=0 display-device=LCD
     
    result:
      The rate of playing is still faster than the actual video rate(need carefully to watch ,or by comparing  with  using the omx method to play the demo or using the PC to play it)
     
    SO:
    1.Any other parameters of the plugins(parse/decoder/videosink and so on) I need to configure?
      But I have change all of them but still all the same.
    2.If I need to play the audio at the same time? or setting the sync=false?
      But I have done this,Still failed.
    3.Why will result this problem? Why the demos of the packages(dm816x_1080p_demo.264 ) still has the problem?
                     
     
     
     
    The followings was some waring infor when use the omx_h264dec plugin:
    Stream is corrupt error, ignorable ...
    Stream is corrupt error, ignorable ...
    Stream is corrupt error, ignorable ...
    Stream is corrupt error, ignorable ...
     
                   zhichao.
     
     
  • Hello Zhichao,

    You could check here for examples:

    http://processors.wiki.ti.com/index.php/DM81xx_Gstreamer_Pipelines

    result:
      The rate of playing is still faster than the actual video rate:
      >> You should change omx_videosink sync=false to omx_videosink sync=true
    Best Regards
    Margarita