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.

AM572x EVM fails to decode MP4 files

Other Parts Discussed in Thread: AM5728

Hello, all.

We are running the EVM with both SDK versions (see below) and trying to play the file of MP4 container with one h.264 encoded stream (from DM8148 board).
All known to us video players (VLC, WMP, ffplay, mplayer,...) play this file without a problem.
But our attempts to play it in te EVM fails (while some other originated files are played OK).

Here is the explanation:

*** PC with FC23 runs this command perfect:
gst-launch-0.10 filesrc location=/home/out.mp4 ! decodebin ! queue ! ffmpegcolorspace ! autovideosink


*** AM572x EVM - ERROR! (PSDK 2.0.2.11):
gst-launch-1.0 filesrc location=/home/out.mp4 ! decodebin ! queue ! videoconvert ! autovideosink --gst-debug=*:1
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.179756101 1241 0x7c260 ERROR ducati gstducatividdec.c:242:codec_create:<decoder> failed XDM_GETVERSION
0:00:00.189203293 1241 0x7c260 ERROR ducati gstducatividdec.c:242:codec_create:<decoder> failed XDM_GETVERSION
0:00:00.201666487 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
0:00:00.201745055 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.201798898 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
0:00:00.206593986 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.210852599 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
0:00:00.219663765 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
0:00:00.219727855 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.219777957 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
0:00:00.224601837 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.227728941 1241 0x7c260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
.....
.....


*** AM572x EVM - ERROR! (PSDK 3.0.0.4):
gst-launch-1.0 filesrc location=/home/out.mp4 ! decodebin ! queue ! videoconvert ! autovideosink --gst-debug=*:1
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.381561118 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
0:00:00.381758757 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.381850663 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
0:00:00.387275077 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.393608468 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
0:00:00.404300975 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
0:00:00.404430131 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.404517483 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
0:00:00.410274548 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
0:00:00.464585873 1192 0x9f460 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
.....
.....

-------------------------------------------------------------------------------------------------------------------------

Thanks a lot ahead for any help!

  • Hello,

    In the pipeline which you are using I do not see demuxer, parser elements.
    Please check this guide:
    processors.wiki.ti.com/.../Processor_Training:_Multimedia

    BR
    Margarita

  • Thank you, Margarita.

    I am afraid this is not the source of the problem, because there are files played by my pipe, but some files are not.

    Nevertheless, I built the pipe as recommended by your link - still, this(!) file is not played by EVM, although it is played by all popular players including QT 7.6 for Windows.

    Here is the pipe and logs:
    gst-launch-1.0 filesrc location=/home/out.mp4 ! qtdemux ! h264parse ! ducatih264dec ! vpe ! 'video/x-raw, format=(string)NV12, width=(int)720, height=(int)480' ! kmssink --gst-debug=*sink*:5

    0:00:00.088353399 1451 0x126760 DEBUG kmssink ../../../git/sys/kms/gstkmssink.c:420:gst_kms_sink_reset:<GstKMSSink@0x137df8> reset
    Setting pipeline to PAUSED ...
    0:00:00.109073541 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4845:gst_base_sink_change_state:<kmssink0> READY to PAUSED
    0:00:00.109230512 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4866:gst_base_sink_change_state:<kmssink0> doing async state change
    0:00:00.109349419 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4021:gst_base_sink_pad_activate:<kmssink0> Trying pull mode first
    0:00:00.109496305 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4027:gst_base_sink_pad_activate:<kmssink0> pull mode disabled
    0:00:00.109592765 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4077:gst_base_sink_pad_activate:<kmssink0> Falling back to push mode
    0:00:00.109688574 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4079:gst_base_sink_pad_activate:<kmssink0> Success activating push mode
    Pipeline is PREROLLING ...
    0:00:00.114727254 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0x13a288 stream-start event: 0x13a288, time 99:99:99.999999999, seq-num 37, GstEventStreamStart, stream-id=(string)8178bec5ea82dc50db4bc18ff65762d41f1de7839ec5e0ad2b77be6e50ec1170/001, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;
    0:00:00.114867959 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3015:gst_base_sink_default_event:<kmssink0> Now posting STREAM_START (seqnum:37)
    0:00:00.116374878 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0xb5305520 caps event: 0xb5305520, time 99:99:99.999999999, seq-num 50, GstEventCaps, caps=(GstCaps)video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1;
    0:00:00.116472639 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3032:gst_base_sink_default_event:<kmssink0> caps 0xb5305520
    0:00:00.116996580 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0x13a348 segment event: 0x13a348, time 99:99:99.999999999, seq-num 42, GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)865400000000, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";
    0:00:00.117222032 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3055:gst_base_sink_default_event:<kmssink0> configured segment time segment start=0:00:00.000000000, stop=0:14:25.400000000, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
    0:00:00.117321095 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0x13a388 tag event: 0x13a388, time 99:99:99.999999999, seq-num 45, GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)\"H.264\\\ /\\\ AVC\"\,\ bitrate\=\(uint\)1666673\;";
    0:00:00.117464239 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0xb5305420 tag event: 0xb5305420, time 99:99:99.999999999, seq-num 46, GstTagList-global, taglist=(taglist)"taglist\,\ datetime\=\(datetime\)2016-08-03T09:44:24Z\,\ private-qt-tag\=\(sample\)0000006a7573657230332f30382f323031362031313a34343a32342e383930203030302026313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030302020202000:None:R3N0U2VnbWVudCwgZmxhZ3M9KEdzdFNlZ21lbnRGbGFncylHU1RfU0VHTUVOVF9GTEFHX05PTkUsIHJhdGU9KGRvdWJsZSkxLCBhcHBsaWVkLXJhdGU9KGRvdWJsZSkxLCBmb3JtYXQ9KEdzdEZvcm1hdClHU1RfRk9STUFUX1RJTUUsIGJhc2U9KGd1aW50NjQpMCwgb2Zmc2V0PShndWludDY0KTAsIHN0YXJ0PShndWludDY0KTAsIHN0b3A9KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTUsIHRpbWU9KGd1aW50NjQpMCwgcG9zaXRpb249KGd1aW50NjQpMCwgZHVyYXRpb249KGd1aW50NjQpMTg0NDY3NDQwNzM3MDk1NTE2MTU7AA__:YXBwbGljYXRpb24veC1nc3QtcXQtdXNlci10YWcsIHN0eWxlPShzdHJpbmcpaXNvOwA_\,\ container-format\=\(string\)\"ISO\\\ MP4/M4A\"\;";
    0:00:00.138649763 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0xb5305660 tag event: 0xb5305660, time 99:99:99.999999999, seq-num 56, GstTagList-stream, taglist=(taglist)"taglist\,\ minimum-bitrate\=\(uint\)1530400\,\ maximum-bitrate\=\(uint\)1530400\;";
    0:00:00.138962566 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3119:gst_base_sink_event:<kmssink0> received event 0xb53056a0 tag event: 0xb53056a0, time 99:99:99.999999999, seq-num 58, GstTagList-stream, taglist=(taglist)"taglist\,\ maximum-bitrate\=\(uint\)1730600\;";
    .....
    .....
    .....
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    0:00:13.226555554 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:1073:gst_base_sink_query_latency:<kmssink0> we are ready for LATENCY query
    0:00:13.226748962 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:1116:gst_base_sink_query_latency:<kmssink0> latency query: live: 1, have_latency 1, upstream: 0, min 0:00:00.000000000, max 99:99:99.999999999
    0:00:13.226906908 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4746:default_element_query:<kmssink0> query latency returns 1
    0:00:13.227056397 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4284:gst_base_sink_send_event:<kmssink0> handling event 0x138600 latency event: 0x138600, time 99:99:99.999999999, seq-num 116, GstEventLatency, latency=(guint64)0;
    0:00:13.227217271 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4301:gst_base_sink_send_event:<kmssink0> latency set to 0:00:00.000000000
    0:00:13.227382213 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4331:gst_base_sink_send_event:<kmssink0> handled event 0x138600 latency event: 0x138600, time 99:99:99.999999999, seq-num 116, GstEventLatency, latency=(guint64)0;: 1
    0:00:13.227599369 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:2151:gst_base_sink_wait_preroll:<kmssink0> waiting in preroll for flush or PLAYING
    0:00:13.227741212 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3208:gst_base_sink_needs_preroll:<kmssink0> have_preroll: 1, EOS: 1 => needs preroll: 0
    0:00:13.227836533 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4881:gst_base_sink_change_state:<kmssink0> PAUSED to PLAYING, don_t need preroll
    0:00:13.227961622 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4894:gst_base_sink_change_state:<kmssink0> signal preroll
    New clock: GstSystemClock
    0:00:13.229005437 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:2159:gst_base_sink_wait_preroll:<kmssink0> continue after preroll
    0:00:13.229113608 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:2997:gst_base_sink_default_event:<kmssink0> Now posting EOS
    0:00:13.229193151 1451 0x1309b0 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3000:gst_base_sink_default_event:<kmssink0> Got seqnum #110
    Got EOS from element "pipeline0".
    Execution ended after 0:00:00.001146619
    Setting pipeline to PAUSED ...
    0:00:13.229796309 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4933:gst_base_sink_change_state:<kmssink0> PLAYING to PAUSED
    0:00:13.229948563 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4942:gst_base_sink_change_state:<kmssink0> got preroll lock
    0:00:13.230029407 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3208:gst_base_sink_needs_preroll:<kmssink0> have_preroll: 0, EOS: 1 => needs preroll: 0
    0:00:13.230153682 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4960:gst_base_sink_change_state:<kmssink0> PLAYING to PAUSED, we are prerolled
    0:00:13.230235339 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:4981:gst_base_sink_change_state:<kmssink0> rendered: 0, dropped: 0
    Setting pipeline to READY ...
    0:00:13.230831991 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:3973:gst_base_sink_set_flushing:<kmssink0> flushing out data thread, need preroll to TRUE
    0:00:13.230968791 1451 0x126760 DEBUG basesink ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesink.c:5020:gst_base_sink_change_state:<kmssink0> PAUSED to READY, don_t need_preroll
    Setting pipeline to NULL ...
    0:00:13.246676442 1451 0x126760 DEBUG kmssink ../../../git/sys/kms/gstkmssink.c:420:gst_kms_sink_reset:<kmssink0> reset
    Freeing pipeline ...
    0:00:13.258756359 1451 0x126760 DEBUG kmssink ../../../git/sys/kms/gstkmssink.c:420:gst_kms_sink_reset:<kmssink0> reset
  • Hello,

    I see that the pipeline is moving to playing state (GstSystemClock) but execution is ended after 0:00:00.001146619.
    Could you add gst-debug=3.
    Could you replace kmssink with with " fakesink silent==false"?

    BR
    Margarita
  • Hello, Margarita.
    It looks like we are moving, but still not clear the direction...:-)

    Just to remind - the file is played perfect by all known players....
    The last group of 9 log lines is repeated till the end of the mp4 file...

    gst-launch-1.0 filesrc location=/home/out.mp4 ! qtdemux ! h264parse ! ducatih264dec ! vpe ! 'video/x-raw, format=(string)NV12, width=(int)720, height=(int)480' ! fakesink silent=false --gst-debug=3
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    0:00:00.140137069  1261   0x130980 WARN                 qtdemux ../../../gst-plugins-good-1.2.3/gst/isomp4/qtdemux_types.c:196:qtdemux_type_get: unknown QuickTime node type user
    0:00:00.143212392  1261   0x130980 WARN                  ducati gstducatih264dec.c:402:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> num-reorder-frames not found on caps, calculation from stream parameters
    gives 12
    0:00:00.143269325  1261   0x130980 WARN                  ducati gstducatih264dec.c:410:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> Using 12 frames for reordering
    0:00:00.144494509  1261   0x130980 WARN                     vpe gstvpebufferpool.c:545:gst_vpe_buffer_pool_get: Allocating a new input buffer index: 0/128, 0
    0:00:00.152243004  1261   0x130980 WARN                  ducati gstducatividdec.c:562:codec_process:<ducatih264dec0> changing max-ref-frames in caps to 19
    0:00:00.158006837  1261   0x130980 WARN                  ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=80000201
    0:00:00.158091260  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.158134040  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.158173893  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    0:00:00.163962613  1261   0x130980 WARN                  ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00000200
    0:00:00.164002141  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.167701118  1261   0x130980 WARN                  ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00040000
    0:00:00.167749429  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end

    0:00:00.168240186  1261   0x130980 WARN                     vpe gstvpebufferpool.c:545:gst_vpe_buffer_pool_get: Allocating a new input buffer index: 1/128, 0
    0:00:00.177998231  1261   0x130980 WARN                  ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=80000201
    0:00:00.178044916  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.178085419  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.178123482  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    0:00:00.183961164  1261   0x130980 WARN                  ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00000200
    0:00:00.184001830  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.187675757  1261   0x130980 WARN                  ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00040000
    0:00:00.187725370  1261   0x130980 ERROR                 ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
    .....
    .....
    .....

    BR

    Leon

  • Hello,

    I see there are codec errors.
    Are you able to play this video stream when ffdec_h264 element?
    Do you observe this problem only with this video stream?

    BR
    Margarita

  • Thank you, Margarita.

    First, there is a strange thing: if we brake the pipe into two pipes inserting the filesink - the thing works!
    See below:
    - the (1) is the original pipe and log file.
    - the (2) is the splitted pipe.
    - the (3) is the PC Linux pipe working as you said. The problem is that we do not find ffdec_h264 in none of SDK we use. We are trying to find it still...

    Finally, to your last question - all the files produced by the MP4V2 library (which generates the MP4 container from the h264 stream coming from DM8148) produce this kind of error. But only gstreamer in AM572x EVM has this problem. All other players and gstreamer in PC play these files without any issue.

    =======================================================================================================================

    1. Don't work on ARM (mp4 ---> display) '

    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! ducatih264dec ! kmssink --gst-debug=3

    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    0:00:00.184957713 1409 0x130d50 WARN qtdemux ../../../gst-plugins-good-1.2.3/gst/isomp4/qtdemux_types.c:196:qtdemux_type_get: unknown QuickTime node type user
    0:00:00.227138357 1409 0x130d50 WARN ducati gstducatih264dec.c:402:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> num-reorder-frames not found on caps, calculation from stream parameters gives 14
    0:00:00.227205699 1409 0x130d50 WARN ducati gstducatih264dec.c:410:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> Using 14 frames for reordering
    0:00:00.235088707 1409 0x130d50 WARN ducati gstducatividdec.c:562:codec_process:<ducatih264dec0> changing max-ref-frames in caps to 19
    0:00:00.240856110 1409 0x130d50 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=80000201
    0:00:00.240904421 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.240948828 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.240989169 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    0:00:00.245809382 1409 0x130d50 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00000200
    0:00:00.245850861 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.669625044 1409 0x130d50 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00040000
    0:00:00.669687832 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:00:00.000673915
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    0:00:00.677780838 1409 0x137760 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00040200
    0:00:00.677923494 1409 0x137760 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.678028087 1409 0x137760 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
    Setting pipeline to NULL ...
    Freeing pipeline ...


    2a. Work on ARM! (mp4 ---> file_h264 ---> display)
    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! filesink location=out.h264
    2b.
    gst-launch-1.0 filesrc location=out.h264 ! h264parse ! ducatih264dec ! kmssink

    3. Work on PC (ffdec_h264)! (mp4 ---> display)
    gst-launch-0.10 filesrc location=./out.mp4 ! qtdemux ! ffdec_h264 ! ffmpegcolorspace ! autovideosink

    Thank you very much for your help.

  • Hello,

    Leon Pollak said:
    - the (3) is the PC Linux pipe working as you said. The problem is that we do not find ffdec_h264 in none of SDK we use. We are trying to find it still...

    I am sorry this element is for gstreamer version 0.10.

    You could try gst-inspect-1.0 | grep "dec" or gst-inspect-1.0 "avdec_h264"

    Leon Pollak said:
    3. Work on PC (ffdec_h264)! (mp4 ---> display)
    gst-launch-0.10 filesrc location=./out.mp4 ! qtdemux ! ffdec_h264 ! ffmpegcolorspace ! autovideosink

    I see you are playing this on version 0.10 on PC, what about if you play it with gstreamer version 1.0 on PC?

    There are differences between both versions.

    BR
    Margarita

    BR

    Margarita

  • Thank you, Margarita!

    Yes, the avdec_h264 exists in the 1.0 version. We tried it and it does not work too on the EVM.
    Using the 1.0 gstreamer in PC works also - all PC variants of all versions work fine.

    Note: We noticed that all files that are playable in the EVM are of progressive type, while files which fail to play are of interlaced type. May this be some cause of the issue? We do not understand how can it be, because splitting the pipe solves the problem, while splitting the pipe can't convert interlaced video to progressive type.

    Thank you again.

  • Hello,

    When you splitting the pipeline you have this "'video/x-h264, stream-format=byte-stream'".
    Could you share the stream?
    Could you try :

    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux !  'video/x-h264, stream-format=byte-stream' ! h264parse  ! ducatih264dec ! fakesink

    BR
    Margarita

  • Thank you, Margarita!

    The pipe you suggested:

    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! 'video/x-h264, stream-format=byte-stream' ! h264parse ! ducatih264dec ! fakesink --gst-debug=3

    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    0:00:00.189620351 1193 0x130db0 WARN qtdemux ../../../gst-plugins-good-1.2.3/gst/isomp4/qtdemux_types.c:196:qtdemux_type_get: unknown QuickTime node type user
    0:00:00.192093661 1193 0x130db0 WARN qtdemux ../../../gst-plugins-good-1.2.3/gst/isomp4/qtdemux.c:4402:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason not-linked
    ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
    Additional debug info:
    ../../../gst-plugins-good-1.2.3/gst/isomp4/qtdemux.c(4402): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0:
    streaming stopped, reason not-linked
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    Freeing pipeline ...

    ----------------------------------

    As for the stream: please, download the file out.mp4 from the address www.plris.com/.../out.mp4

    Many thanks ahead.

  • As I see the address in my message in some strange manner and am not sure it was passed correctly, I repeat the file address with spaces - please, remove:
    ftp: // www.plris.com /pub/ out.mp4

  • Hello,


    I remove the spaces from the link but I see error "video can't be played because the file is corrupt. "
    Could you recheck the uploaded video file?

    One more could you try this pipeline:
    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! ducatih264dec ! fakesink --gst-debug=3

    It is like union between the both pipelines which was working for you
    (2a. Work on ARM! (mp4 ---> file_h264 ---> display)
    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! filesink location=out.h264
    2b.
    gst-launch-1.0 filesrc location=out.h264 ! h264parse ! ducatih264dec ! kmssink).

    When you trying with avdec_h264 what you observe on EVM? When you say that on PC is working with version 1.0 you tried with avdec_h264 element right?

    BR
    Margarita

  • Hello, Margarita and many thanks to you.

    The file is OK - we downloaded it from different places and played it back with the VLC player.
    I uploaded it again to the dropbox site:
    https://www.dropbox.com/s/x7mupzmpdxyj19z/out.mp4?dl=0


    >One more could you try this pipeline:
    >gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! ducatih264dec ! fakesink --gst-debug=3
    We tried this earlier - if you will see the beginning of this thread. For your convenience, the output was:
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    0:00:00.184957713 1409 0x130d50 WARN qtdemux ../../../gst-plugins-good-1.2.3/gst/isomp4/qtdemux_types.c:196:qtdemux_type_get: unknown QuickTime node type user
    0:00:00.227138357 1409 0x130d50 WARN ducati gstducatih264dec.c:402:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> num-reorder-frames not found on caps, calculation from stream parameters gives 14
    0:00:00.227205699 1409 0x130d50 WARN ducati gstducatih264dec.c:410:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> Using 14 frames for reordering
    0:00:00.235088707 1409 0x130d50 WARN ducati gstducatividdec.c:562:codec_process:<ducatih264dec0> changing max-ref-frames in caps to 19
    0:00:00.240856110 1409 0x130d50 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=80000201
    0:00:00.240904421 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.240948828 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.240989169 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    0:00:00.245809382 1409 0x130d50 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00000200
    0:00:00.245850861 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.669625044 1409 0x130d50 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00040000
    0:00:00.669687832 1409 0x130d50 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:00:00.000673915
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    0:00:00.677780838 1409 0x137760 WARN ducati gstducatividdec.c:542:codec_process:<ducatih264dec0> err=-1, extendedError=00040200
    0:00:00.677923494 1409 0x137760 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.678028087 1409 0x137760 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
    Setting pipeline to NULL ...
    Freeing pipeline ...

    >When you trying with avdec_h264 what you observe on EVM?
    If you mean the EVM screen - it is empty/black. If you mean the console - it contains these error messages above.

    >When you say that on PC is working with version 1.0 you tried with avdec_h264 element right?
    Yes, sure. Works fine.

    Thank you for your help.

    BR

  • Hello,

    I will check it.
    When I have something I will let you know.

    BR
    Margarita
  • Hi Leon,

    I think I could help you with this issue. I was able to play a file of MP4 container with one h.264 encoded video. This was the pipeline I used:

    $ gst-launch-1.0 filesrc location=Wreck-It_Ralph_H264.mp4 ! qtdemux name=demux demux.video_0 ! 'video/x-h264, stream format=avc' ! queue ! h264parse ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! ducatih264dec ! kmssink scale=true connector=30

    Console Output:
    / # gst-launch-1.0 filesrc location=Wreck-It_Ralph_H264.mp4 ! qtdemux name=demux
    demux.video_0 ! 'video/x-h264, stream-format=avc' ! queue ! h264parse ! h264par
    se ! 'video/x-h264, stream-format=byte-stream' ! ducatih264dec ! kmssink scale=t
    rue connector=30
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:02:30.691156328
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...


    The characteristics of the source video file are (taken out from VLC):
    -) Stream 0
    Type: Video
    Codec: H264 - MPEG-4 AVC (part 10) (avc1)
    Resolution: 1920x800
    Frame rate: 23.976024
    Decoded format: Planar 4:2:0 YUV
    Stream 1
    Type: Audio
    Codec: MPEG AAC Audio (mp4a)
    Channels: Stereo
    Sample rate: 44100 Hz

    I am using gstreamer 1.8.1 on AM5728 EVM Ridge-Run SDK image. You can follow this link ( https://developer.ridgerun.com/wiki/index.php?title=Gstreamer_pipelines_for_AM572x ), here you will find a set of gstreamer (1.8.1 version) tested pipelines for AM5728 EVM with RidgeRun SDK images.

    I display the video on the on-board LCD and also trough HDMI port (by changing the connector on kmssink caps)

    I hope I was able to help you.

    Best Regards,
    Daniel

    Eng. Daniel Garbanzo Hidalgo
    Embedded Software Developer Engineer
    RidgeRun Engineering Limitada
    www.ridgerun.com

  • Hello,

    We checked the file out.mp4 with gstreamer and we observed the same behavior.
    We observed the same error 0x80000201 with viddec3test also.

    We are still investigating. I will let you know.

    BR
    Margarita
  • Hi Leon,

    I tried to reproduce your sample video out.mp4 with the following pipeline (The one that works for me with anoter h264 encodec video in a mp4 container) and I got a Segmentation Fault error. This is the log:

    ======================================================================================================

    # GST_DEBUG=2 gst-launch-1.0 filesrc location=out.mp4 ! qtdemux name=demux dem
    ux.video_0 ! 'video/x-h264, stream-format=avc' ! queue ! h264parse ! h264parse !
    'video/x-h264, stream-format=byte-stream' ! ducatih264dec ! kmssink scale=true
    connector=30 -v


    Setting pipeline to PAUSED ...
    0:00:00.182512813 359 0xb5c01320 WARN basesrc gstbasesrc.c:3486:gst_base_src_start_complete:<filesrc0> pad not activated yet
    Pipeline is PREROLLING ...
    0:00:00.184002677 359 0x16d230 WARN qtdemux qtdemux_types.c:222:qtdemux_type_get: unknown QuickTime node type user
    0:00:00.184183400 359 0x16d230 WARN qtdemux qtdemux.c:2642:qtdemux_parse_trex:<demux> failed to find fragment defaults for stream 1
    0:00:00.185762731 359 0x16d230 WARN basesrc gstbasesrc.c:2396:gst_base_src_update_length:<filesrc0> processing at or past EOS
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter2: caps = "video/x-h264\,\ stream-format\=\(string\)avc"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstDucatiH264Dec:ducatih264dec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)768\,\ height\=\(int\)672\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)768\,\ height\=\(int\)672\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    0:00:00.536984951 359 0x16d260 WARN ducati gstducatih264dec.c:402:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> num-reorder-frames not found on caps, calculation from stream parameters gives 12
    0:00:00.537057826 359 0x16d260 WARN ducati gstducatih264dec.c:410:gst_ducati_h264dec_set_sink_caps:<ducatih264dec0> Using 12 frames for reordering
    /GstPipeline:pipeline0/GstDucatiH264Dec:ducatih264dec0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    0:00:00.545443455 359 0x16d260 WARN ducati gstducatividdec.c:555:codec_process:<ducatih264dec0> changing max-ref-frames in caps to 19
    /GstPipeline:pipeline0/GstDucatiH264Dec:ducatih264dec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)768\,\ height\=\(int\)672\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ max-ref-frames\=\(int\)19"
    /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)768\,\ height\=\(int\)672\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ max-ref-frames\=\(int\)19"
    0:00:00.551214868 359 0x16d260 WARN ducati gstducatividdec.c:535:codec_process:<ducatih264dec0> err=-1, extendedError=80000201
    0:00:00.551268711 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.551316860 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.551361431 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    0:00:00.556152615 359 0x16d260 WARN ducati gstducatividdec.c:535:codec_process:<ducatih264dec0> err=-1, extendedError=00000200
    0:00:00.556199788 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.564012668 359 0x16d260 WARN ducati gstducatividdec.c:535:codec_process:<ducatih264dec0> err=-1, extendedError=00040000
    0:00:00.911371230 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
    0:00:00.920220459 359 0x16d260 WARN ducati gstducatividdec.c:535:codec_process:<ducatih264dec0> err=-1, extendedError=80000201
    0:00:00.920274464 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.920320499 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.920365070 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    0:00:00.925158043 359 0x16d260 WARN ducati gstducatividdec.c:535:codec_process:<ducatih264dec0> err=-1, extendedError=00000200
    0:00:00.925204078 359 0x16d260 ERROR ducati gstducati.c:60:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    Caught SIGSEGV
    exec gdb failed: No such file or directory

    ================================================================================================================

    After a quick review and debugging with GDB I could determine that the error is related with some wrong or missing metadata in the video buffers. There is something in the video that the ducatih264dec doesn't like, but this is what I take out only from a quick and superficial debug with gdb.

    I tested the AM5728 EVM and ducatih264 decoder with a generated video with the same resolution of your sample video, and with progressive and interlaced mode; in all cases the pipeline executes well and the video was displayed.

    Also, I tested on the AM5728 EVM the following pipelines with your out.mp4 sample video. This pipelines works perfectly and give no errors.

    1)  Decode the video with avdec_h264 software decoder and send it to a fakesink. From the out log, you can see a successful execution and buffers being processed and sent to the filesink

    gst-launch-1.0 -e filesrc location=out.mp4 ! qtdemux ! h264parse ! avdec_h26
    4 ! queue ! fakesink sync=true silent=false -v

    OUT:

    =====================================================================================================================

    # gst-launch-1.0 -e filesrc location=out.mp4 ! qtdemux ! h264parse ! avdec_h26
    4 ! queue ! fakesink sync=true silent=false -v
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)90bd3335c3a8c4d2dc3bdf9257d8211a1553033bb9e39d5086b087aa5c9b18a1/001, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;) 0x16d998
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    Redistribute latency...
    /GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe100662764001fad880e439820e10c290a440721cc1070861485220390e60838430a4290c04218c21c663210860210c610e33190843010863087198c8422021198ce23c29f11f88fe23f11f11e3388c4444281088c4711e23e4fc47f27e4f88f11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1";) 0xb4305500
    /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)865400000000, time=(guint64)0, position=(guint64)0, duration=(guint64)-1;";) 0x16da70
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: tag (20510), GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)\"H.264\\\ /\\\ AVC\"\,\ bitrate\=\(uint\)1666673\;";) 0xb4305428
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: tag (20510), GstTagList-global, taglist=(taglist)"taglist\,\ private-qt-tag\=\(sample\)0000006a7573657230332f30382f323031362031313a34343a32342e383930203030302026313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030302020202000:None:R3N0U2VnbWVudCwgZmxhZ3M9KEdzdFNlZ21lbnRGbGFncylHU1RfU0VHTUVOVF9GTEFHX05PTkUsIHJhdGU9KGRvdWJsZSkxLCBhcHBsaWVkLXJhdGU9KGRvdWJsZSkxLCBmb3JtYXQ9KEdzdEZvcm1hdClHU1RfRk9STUFUX1RJTUUsIGJhc2U9KGd1aW50NjQpMCwgb2Zmc2V0PShndWludDY0KTAsIHN0YXJ0PShndWludDY0KTAsIHN0b3A9KGd1aW50NjQpLTEsIHRpbWU9KGd1aW50NjQpMCwgcG9zaXRpb249KGd1aW50NjQpMCwgZHVyYXRpb249KGd1aW50NjQpLTE7AA__:YXBwbGljYXRpb24veC1nc3QtcXQtdXNlci10YWcsIHN0eWxlPShzdHJpbmcpaXNvOwA_\,\ container-format\=\(string\)\"ISO\\\ MP4/M4A\"\;";) 0x16db90
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: tag (20510), GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)\"H.264\\\ \\\(High\\\ Profile\\\)\"\,\ bitrate\=\(uint\)1666673\;";) 0xb43054b8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = preroll *******
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:00.000000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300040 discont ) 0xb4385288
    WJsZSkxLCBmb3JtYXQ9KEdzdEZvcm1hdClHU1RfRk9STUFUX1RJTUUsIGJhc2U9KGd1aW50NjQpMCwgb2Zmc2V0PShndWludDY0KTAsIHN0YXJ0PShndWludDY0KTAsIHN0b3A9KGd1aW50NjQpLTEsIHRpbWU9KGd1aW50NjQpMCwgcG9zaXRpb249KGd1aW50NjQpMCwgZHVyYXRpb249KGd1aW50NjQpLTE7AA__:YXBwbGljYXRpb24veC1nc3QtcXQtdXNlci10YWcsIHN0eWxlPShzdHJpbmcpaXNvOwA_\,\ container-format\=\(string\)\"ISO\\\ MP4/M4A\"\;";) 0x16db90
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: tag (20510), GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)\"H.264\\\ \\\(High\\\ Profile\\\)\"\,\ bitrate\=\(uint\)1666673\;";) 0xb43054b8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = preroll *******
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:00.000000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300040 discont ) 0xb4385288
    11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1";) 0xb4305500
    /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt60000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300040 discont ) 0xb4385288
    11c46488b60581224001000528e9083cb0\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
    /GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1"
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)25/1";) 0xb4305500
    /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)704\,\ height\=\(int\)576\,\ interlace-mode\=\(string\)mixed\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt6^Chandling interrupt.

    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.360000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb437d240
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.400000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb43850a8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.440000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb43b70f8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.480000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb43b75f8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.520000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb43b7698
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.560000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb43b72d8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.600000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb437d100
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.640000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb4302bc8
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (608256 bytes, dts: none, pts: 0:00:01.680000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 00300000 ) 0xb4385288

    Interrupt: Stopping pipeline ...
    Interrupt while waiting for EOS - stopping pipeline...
    Execution ended after 0:00:00.211622176
    Setting pipeline to PAUSED ...
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = preroll *******
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    ==========================================================================================================================

    2) Transcode the video. I run a pipeline on the EVM that decodes the video with avdec_h264 decoder and encoded again with openh264enc and send it to a filesink. Then I run another pipeline that decodes the video with ducatih264dec and displays it on the EVM LCD with kmssink.  The pipeline work perfectly and the trasncoded video could be displayed without problems. This are the pipelines I used:

    Transcode the video:

    gst-launch-1.0 -e filesrc location=out.mp4 ! qtdemux ! avdec_h264 ! queue !
    openh264enc ! qtmux ! filesink location=transcoded.mp4

    Decode and play the video:

    gst-launch-1.0 filesrc location= transcoded.mp4 ! qtdemux name=demux demux.v
    ideo_0 ! 'video/x-h264, stream-format=avc' ! queue ! h264parse ! h264parse ! 'vi
    deo/x-h264, stream-format=byte-stream' ! ducatih264dec ! kmssink scale=true conn
    ector=30

    Both videos (out.mp4 and transcode.mp4) are encoded in h264 and has an mp4 container. From mediainfo the principal difference I can see between the videos are:

    File           out.mp4:                                             

                  -) Format : MPEG-4

                  -) Format profile : Base Media / Version 2

                  -) Codec ID : mp42                                            

                  -) Format profile : High@L3.1

                  -) Format : AVC

                  -) Format/Info : Advanced Video Codec

    File           transcode.mp4:                                             

                  -) Format : MPEG-4

                  -) Format profile : QuicTime

                  -) Codec ID : qt                                            

                  -) Format profile : Baseline@L3.0

                  -) Format : AVC

                  -) Format/Info : Advanced Video Codec

    I hope this info could help you.

    Best regards,

    Daniel

    Eng. Daniel Garbanzo Hidalgo
    Embedded Software Developer Engineer
    RidgeRun Engineering
    www.ridgerun.com

  • Thank you, Daniel for spending time on our case.

    From your extensive study I understand that you came to the same conclusion that we did: the Ducati element has some problem decoding our out.mp4. 
    This problem does not exist with any other element substituted instead of the Ducati decoder.
    As far as I was able to understand, Margarita also agrees with this conclusion and TI are looking at the issue trying to evaluate and hopefully fix it.

    So, your study also proved my understanding and i thank you very much for this.

    We are waiting patiently...:-)

  • Hi Pollak,
    We reproduced the issue. The issue is for this mp4 stream, parser fills two fields(Top and bottom) in the input buffer but decoder is consuming only first field and ignores second. This leads to decoder getting only TOP fileds and throws error 0x800000201 error.

    We extracted h264 elementary stream from mp4 and then tried to decode. For this scenario parser fills only one field and proper decoding happens.
  • If I understand you correctly, the decoder does not know to treat correctly the interlaced video -am I correct?
    If I understand correctly, it is not clear from your mail what should be the next step to solve the issue.
    Thank you very much, but please, advice, what shall we do next...:-)
  • Hi Leon,

    The ducatih264dec effectively supports interlaced video. I tested it with a sample video with the following characteristics taken out from mediainfo:

    $ mediainfo mm6-30-16FINAL.mp4
    General
    Complete name : mm6-30-16FINAL.mp4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 1.66 GiB
    Duration : 29mn 1s
    Overall bit rate mode : Variable
    Overall bit rate : 8 190 Kbps
    Encoded date : UTC 2016-07-12 19:31:32
    Tagged date : UTC 2016-07-12 19:31:32

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 29mn 1s
    Bit rate mode : Variable
    Bit rate : 8 045 Kbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 59.940 fps
    Original frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.065
    Stream size : 1.62 GiB (98%)
    Language : English
    Encoded date : UTC 2016-07-12 19:31:32
    Tagged date : UTC 2016-07-12 19:31:32

    I used the following pipeline to decode and display the video:

    # gst-launch-1.0 filesrc location= mm6-30-16FINAL.mp4 ! qtdemux name=demux de
    mux.video_0 ! queue ! h264parse ! ducatih264dec ! kmssink scale=false connector=
    30
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:05.357435273
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    After a analyze a little bit more the case with different sample videos I have (H264 enc, mp4 container, Scan type: progressive/interlaced/MBAFF), I conclude that the error is caused by incomplete or wrong metadata of the out.mp4 video. After analyzing different sample videos with mediainfo, all the videos that works fine with the ducatih264dec indicates the SCAN TYPE. In the case of the out.mp4 video it doesn´t indicates the SCAN TYPE, so I think maybe the cause of the error is around this.

    I ran a pipeline that transcode the out.mp4 video on the AM5728 EVM. That pipeline decodes the video with avdec_h264, then encodes again with openh264enc and send it to a mp4 container. The I ran a pipeline to decode and display that trasncoded video, and it displays on the on-board LCD with no problems. 

    Transcode Pipeline:

    # gst-launch-1.0 filesrc location= out.mp4 ! qtdemux ! h264parse ! avdec_h264
    ! queue ! openh264enc ! qtmux ! filesink location= transcode.mp4

    Decode and play pipeline:

    # gst-launch-1.0 filesrc location= transcode.mp4 ! qtdemux name=demux demux.vi
    deo_0 ! queue ! h264parse ! ducatih264dec ! kmssink scale=false connector=30

    One of the principal differences between the out.mp4 and transcode.mp4 is that out.mp4 doesn´t indicates the SCAN TYPE with media info. I will put below the mediainfo log for each video:

    1) out.mp4:

    $ mediainfo out.mp4 General
    Complete name : out.mp4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 172 MiB
    Duration : 14mn 25s
    Overall bit rate : 1 668 Kbps
    Encoded date : UTC 2016-08-03 09:44:24
    Tagged date : UTC 2016-08-03 09:45:53

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 14mn 25s
    Bit rate : 1 667 Kbps
    Width : 704 pixels
    Height : 576 pixels
    Display aspect ratio : 1.222
    Frame rate mode : Constant
    Frame rate : 25.000 fps
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Bits/(Pixel*Frame) : 0.164
    Stream size : 172 MiB (100%)
    Encoded date : UTC 2016-08-03 09:44:24
    Tagged date : UTC 2016-08-03 09:45:47

    2) Transcode.mp4:

    $ mediainfo transcode.mp4
    General
    Complete name : transcode.mp4
    Format : MPEG-4
    Format profile : QuickTime
    Codec ID : qt
    File size : 22.1 MiB
    Duration : 14mn 25s
    Overall bit rate : 214 Kbps
    Encoded date : UTC 1970-01-01 00:16:13
    Tagged date : UTC 1970-01-01 00:16:13

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L3.0
    Format settings, CABAC : No
    Format settings, ReFrames : 1 frame
    Format settings, GOP : M=1, N=90
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 14mn 25s
    Bit rate : 213 Kbps
    Width : 704 pixels
    Height : 576 pixels
    Display aspect ratio : 1.222
    Frame rate mode : Constant
    Frame rate : 25.000 fps
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.021
    Stream size : 21.9 MiB (99%)
    Language : English
    Encoded date : UTC 1970-01-01 00:16:13
    Tagged date : UTC 1970-01-01 00:16:13

    Best Regards,
    Daniel

    Eng. Daniel Garbanzo Hidalgo
    Embedded Software Developer Engineer
    RidgeRun Engineering Limitada
    www.ridgerun.com

  • Hello,


    I am able to play out.mp4 on EVM.

    Could you try this pipeline:

    root@am57xx-evm:/usr/share/ti/video# gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' !  h264parse ! ducatih264dec ! kmssink                 
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:14:25.399635112
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...


    Let me know the result on your side.

    BR
    Margarita

  • Hello Margarita,

    I test your pipeline with the out.mp4 sample video an effectively it works perfect and with no errors.

    Best Regards,
    Daniel

    Eng. Daniel Garbanzo Hidalgo
    Embedded Software Developer Engineer
    RidgeRun Engineering Limitada
    www.ridgerun.com
  • Hello,

    I am glad that this is working.
    Please, if this resolve the issue close this thread.

    BR
    Margarita
  • Hello, Margarita.
    Yes, the pipe with doubled h264parse works fine.
    Please, can you be so kind to briefly explain what is the purpose of this duplication?
    Thousands of thanks !!!
  • Hello, Daniel.
    We carefully studied your recommendation about the "fiel" atom, which provides the information about the interlaced mode. It seems to be logic what you say. The only problem we have is that we were not able to find this atom in any one mp4 file we played successfully on the EVM. We still were trying to insert this atom into our mp4 file, when the post from Margarita came.
    As I asked her, I do not understand what is the reason behind doubling the parser - which problem does it solve?
    Is this somehow connected to the 'fiel' atom?
    Thanks.
  • Hello Leon,

    I am sorry for the delay.

    We reproduced the issue with this pipeline gst-launch-1.0 filesrc location=out.h264 ! h264parse ! ducatih264dec ! kmssink.

    I extracted the elementary stream from out.mp4 by using this:

    gst-launch-1.0 filesrc location=out.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! filesink location=test.h264

    I played the elementary stream with :

    gst-launch-1.0 filesrc location=test.h264 ! h264parse ! ducatih264dec ! kmssink

    The issue was not observed when the elementary stream was played on the board.

    So we assumed that the issue was with demuxer or parser, not the decoder.

    In this case: gst-launch-1.0 filesrc location=out.h264 ! h264parse ! ducatih264dec ! kmssink

    Demuxer/Parser is filling two fields in  the input buffer but decoder consumes only one field and second is ignored(refer Ram Prasad's answer) .

    Since I know in  h264 streams there are a few different modes of encoding so sometimes you need to do a small conversion.

    You could check h264parser element:

    Capabilities:

         video/x-h264

                    parsed: true

             stream-format: { avc, avc3, byte-stream }

                 alignment: { au, nal }

    After the h264parser's permutation (... h264parse ! 'video/x-h264, stream-format=byte-stream' !  h264parse ...) the second parser seems to sending only one field.

    BR

    Margarita