This thread has been locked.

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

Linux/DRA74: Waylandsink: Video playback is not happening for .mov video file.

Part Number: DRA74

Tool/software: Linux

Hello Team, 

We are using custom h/w and software based on DRA746 and SDK 3.03. 

Playback for .mov file is not proper:

root@mmt2020-a880:~# gst-launch-1.0 playbin uri=file:///tmp/USB1-1.4-sda1/MPEG-4_AVC_720x576_25fps_5to4_1500kbps_VBR_highprofile.mov video-sink=waylandsink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Sharing the file through Portal.

Complete debug logs with "export GST_DEBUG="2,wayland*:5" are attached.gst_debuglogs.txt

Regards,

Ikshwaku

  • Hi Ikshwaku,
    I have downloaded the stream. Ducati decoder seems getting no valid frames . I will analyze this and update you
  • Hi Ikshwaku,
    I analyzed this issue further. H264parse plugin is not providng Header data to ducatidecoder and decoder is not able to start decoding.
    Are you able to see this video getting played on other platforms?
  • Hello Ram,

    I have tried with other Platforms, but its is not playable there as well.

    Regards,
    Ikshwaku
  • Further Analysis Update:

    1. We are observing a hang issue during pipeline pre-rolling state.
    2. We analyzed the issue and found that Ducati video decoder is returning err = -1 for call to VIDDEC3_process() and no buffers are being pushed from the Ducati decoder to next element.
    3. But audio buffers are being pushed and this is making the queue for audio getting full, causing the pipeline hang.
    4. We checked the file using playbin with software video decoder plugin (avdec_h264). Software video decoder plugin is not getting any error and hence the pipeline is going to playing state. We dumped the software video decoder plugin output to a file and found that the video is proper in the dump file.
    5. This issue is observed with default mp4 plugin as well.

  • Hi Ikshwaku,
    There are two types of packetized h264 stream formats. a)byte-format and b)avc . TI's ducatidecoder supports only byte-format while software decoder supports both the formats. H264parse plugin is supposed to convert avc packetization to byte-stream if the downstream decoder supports only byte-stream but some how h264parse plugin is not sending SPS/PPS header information to decoder in this case and resulting
    decoder fails to start.

    This is the reason for playback failure on other platforms also as the decoder supports only byte-format and not getting the header.

    Thanks
    Ram
  • Hello Ram,

    As per your feedback, this video file is not having proper header information..??

    Regards,
    ikshwaku
  • Hi Ikshwaku,
    h264parse plugin is not sending proper header information to decoder plugin for this stream. I will check if there is any bugfix available for this issue from latest gstreamer-bad
  • Hello Ram,

    Please find some information regarding the issue below:

    - For the H264 hardware decoder on MMT2020, the stream is required in format: video/x-h264, alignment\=\(string\)au, stream-format\=\(string\)byte-stream. We compared the h264parse output dumps generated on MMT2020 and other platforms (x86 platform). We see that outputs are same.

    - Also, we see that for other streams, the same h264parse element is used and it is working correctly

    - When we run the gstreamer pipeline for the stream with GST_DEBUG=3, we see that the error is occurring in hardware video decoder. The error info is as below:
    0:00:00.228662033 30513 0xb4907b20 ERROR ducati gstducati.c:61:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.228771325 30513 0xb4907b20 ERROR ducati gstducati.c:61:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.228833511 30513 0xb4907b20 ERROR ducati gstducati.c:61:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num

    - When we run the gstreamer pipeline, the error observed is :
    CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    - We tried to decode the same file using TI sample application “viddec3test”. We are getting error with that binary (logs captured below). The error is that there is a failure in getting video buffers. But decoder has not released the buffers that are provided to it. There is an E2E forum link where a similar issue was reported with H264 high profile streams with hardware decoder: e2e.ti.com/.../490877
    root@mmt2020-a880:~# ./viddec3test MPEG-4_AVC_720x576_25fps_5to4_1500kbps_VBR_highprofile.mov
    0x2b008: Opening Demuxer..
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MPEG-4_AVC_720x576_25fps_5to4_1500kbps_VBR_highprofile.mov':
    Metadata:
    major_brand : qt
    minor_version : 512
    compatible_brands: qt
    creation_time : 1970-01-01 00:00:00
    encoder : Lavf52.83.0
    Duration: 00:03:00.03, start: 0.000000, bitrate: 1491 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt470bg), 720x576 [SAR 1:1 DAR 5:4], 1357 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
    creation_time : 1970-01-01 00:00:00
    handler_name : DataHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
    creation_time : 1970-01-01 00:00:00
    handler_name : DataHandler
    initializing bitstream filter
    0x2b008: infile=MPEG-4_AVC_720x576_25fps_5to4_1500kbps_VBR_highprofile.mov, width=720, height=576
    0x2b008: padded_width=896, padded_height=672, num_buffers=19
    0x2b008: Opening Engine..
    displayBufsMode: 1
    0x2b008: decoded Frame 1
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 2
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000201
    0x2b008: decoded Frame 3
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000000
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 4
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 00000201
    0x2b008: decoded Frame 5
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 6
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000201
    0x2b008: decoded Frame 7
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 8
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 00000201
    0x2b008: decoded Frame 9
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000000
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 10
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 00000201
    0x2b008: decoded Frame 11
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 12
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000201
    0x2b008: decoded Frame 13
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 14
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 00000201
    0x2b008: decoded Frame 15
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000000
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 16
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 00000201
    0x2b008: decoded Frame 17
    0x2b008: TODO... outBufsInUseFlag
    0x2b008: decoded Frame 18
    ERROR:decoder_process:408: 0x2b008: process returned error: -1
    ERROR:decoder_process:409: 0x2b008: extendedError: 80000201
    0x2b008: decoded Frame 19
    0x2b008: TODO... outBufsInUseFlag
    ERROR:decoder_process:336: 0x2b008: fail: out of buffers

    Please provide your Feedback for above observations.

    Regards,
    Ikshwaku
  • Hi Ikshwaku,
    Negotiation between h264parse and ducatih264parse will always happen but when actual playback starts, header is not sent to decoder.

    0:00:00.228662033 30513 0xb4907b20 ERROR ducati gstducati.c:61:gst_ducati_log_extended_error_info: Bit 0 (00000001): no error-free slice
    0:00:00.228771325 30513 0xb4907b20 ERROR ducati gstducati.c:61:gst_ducati_log_extended_error_info: Bit 9 (00000200): applied concealment
    0:00:00.228833511 30513 0xb4907b20 ERROR ducati gstducati.c:61:gst_ducati_log_extended_error_info: Bit 31 (80000000): gap in frame num
    The above error means, decoder is not able to start decoding as h264parse is not sending valid header info.

    This is the issue with other platforms also where playback is not happening.

    Demuxer/parser in viddec3test is different from gst- h264parse, so it seems to be sending valid data for the first time and decoder is able to start.

    0x2b008: TODO... outBufsInUseFlag
    ERROR:decoder_process:336: 0x2b008: fail: out of buffers
    For the above issue, you can try with viddec3test from PSDKLA3.04, it should work.-
  • Hi Ikshwaku,
    I have started analyzing this issue. From the analysis, this is an interlace stream and parser is sending data for both the fields but decoder is consuming only first field and expecting parser to feed remaining data in the next call. This seems to cause the issue.

    I will analyse further and update you

    Ram
  • Hi Ikshwaku,

    h264parse here is always sending data for both the fields and but decoder is consuming only one field. There is a configuration for h264decoder to process both the fields in one process call.

    Please apply this patch on gst-ducati, the stream will be playable.

    --- a/src/gstducatih264dec.c

    +++ b/src/gstducatih264dec.c

    @@ -152,6 +152,7 @@ gst_ducati_h264dec_allocate_params (GstDucatiVidDec * self, gint params_sz,

        params->presetLevelIdc = IH264VDEC_LEVEL41;

        params->errConcealmentMode = IH264VDEC_APPLY_CONCEALMENT;

        params->temporalDirModePred = TRUE;

    +  params->processCallLevel = IH264VDEC_FRAMELEVELPROCESSCALL;

    Please check if your testcases have few more interlaced streams. and check the behavior.

    Thanks

    Ram

  • Hello Ram,

    After updating the changes we are not able to see the issue.
    Thanks for the patch. Issue is resolved.

    Thanks & Regards,
    Ikshwaku
  • Hi Ikshwaku,
    Thanks for confirming this. Please test all possible interlaced h264 streams available with you with this patch applied.
    TI will merge this patch after testing.

    Ram