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/DRA746: waylandsink; Not able to play video

Part Number: DRA746

Tool/software: Linux

Hi Team,

I am trying to play video using below command, however it is not playing and gives following error. Attached here the complete log. This error comes with specific video while I am able to play other videos correctly. Could you please suggest us on what might be going wron?

I tried with below commands. You can download the video from www.dropbox.com/.../Exquisite.mp4

 

gst-launch-1.0 playbin uri=file:///usb/MMT2020/mmt_videos/Exquisite.mp4 video-sink="waylandsink sync=false window-resolution=800x480"

gst-launch-1.0 filesrc location=/usb/MMT2020/mmt_videos/Exquisite.mp4 ! qtdemux ! h264parse ! ducatih264dec ! waylandsink window-resolution=800x480

0:00:04.192914682  1578   0x191c30 DEBUG            waylandsink gstwaylandsink.c:477:gst_wayland_sink_get_caps:<waylandsink0> display caps: video/x-raw, format=(string){ BGRA, BGRx, RGB16, YUV9, Y41B, I420, Y42B, v308, NV12, NV16, YUY2 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:04.217039502  1578 0xb5bb9e00 DEBUG            waylandsink gstwaylandsink.c:634:gst_wayland_sink_preroll:<waylandsink0> preroll buffer 0x190f00
0:00:04.217416346  1578 0xb5bb9e00 DEBUG            waylandsink wlshmallocator.c:170:gst_wl_shm_memory_construct_wl_buffer:<wlshmallocator0> Creating wl_buffer of size 4 (1 x 1, stride 4), format BGRx
0:00:04.217564779  1578 0xb5bb9e00 DEBUG            waylandsink wlshmallocator.c:170:gst_wl_shm_memory_construct_wl_buffer:<wlshmallocator0> Creating wl_buffer of size 5529600 (2560 x 1440, stride 2560), format I420
[destroyed object]: error 0: invalid format 0x32315559
surface                : 90 created
wl_display@1: error 0: invalid object 3
Error communicating with wayland: Invalid argument
Error communicating with wayland: Invalid argument
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...

Regards,

Vikash

  • HI Vikash,

    Waylandsink is trying to allocate buffer from shared memory .

    Add this property in waylandsink and try. use-drm=true

    Ram

  • Hi Ram,

    After playing video with "use-drm=true", it is playing but I see following warning and video is playing jerky and very slow.

    How other videos are playing ok without "use-drm=true"? When do we need to use "use-drm=true"?

    WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0: A lot of buffers are being dropped.
    Additional debug info:
    /data/work/fcardoz/elina-mmt2020-gclient/elina-distro/build-mmt/tmp/work/cortexa15hf-vfp-neon-elina-linux-gnueabi/gstreamer1.0/1.6.3-r0/gstreamer-1.6.3/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_late (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0:
    There may be a timestamping problem, or this computer is too slow.
    WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0: A lot of buffers are being dropped.
    Additional debug info:
    /data/work/fcardoz/elina-mmt2020-gclient/elina-distro/build-mmt/tmp/work/cortexa15hf-vfp-neon-elina-linux-gnueabi/gstreamer1.0/1.6.3-r0/gstreamer-1.6.3/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_late (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0:
    There may be a timestamping problem, or this computer is too slow.
    WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0: A lot of buffers are being dropped.
    Additional debug info:
    /data/work/fcardoz/elina-mmt2020-gclient/elina-distro/build-mmt/tmp/work/cortexa15hf-vfp-neon-elina-linux-gnueabi/gstreamer1.0/1.6.3-r0/gstreamer-1.6.3/libs/gst/base/gstbasesink.c(2846): gst_base_sink_is_too_late (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0:
    There may be a timestamping problem, or this computer is too slow.
    WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:waylandsink0: A lot of buffers are being dropped.
    Additional debug info:

    Regards,
    Vikash
  • Hi Vikash,

    The stream is not accessible here.

    I see some issue here  in the log.

    Creating wl_buffer of size 4 (1 x 1, stride 4), format BGRx. width and height of the stream detected is 1x1

    If the upstream element is ducati , waylandsink should have used drm memory but why it is selecting shm is not clear.

    What is the resolution of the stream?

  • Hi Ram,

    You can download the video from transfer.harman.com/.../6AnqFLbaxgxurxicXF1pva

    From VLC player codec information:

    Resolution is 2560 x 1442
    Display Resolution: 2560 x 1440


    Regards,
    Vikash
  • Hi Vikash,
    I am downloading the stream. 2560x1440 seems high resolution(> 1920x1080) .
    use-drm property tells waylandsink that the buffers coming from upstream element are allocated from drm allocator. If upstream element is ducati , it will always send this info in its CAPs and no need for explicit mentioning of use-drm=true.

    If waylandsink acts as a buffer-allocator for upstream element then use-drum=true is required.
  • Hi Vikash,
    For this stream, playbin is choosing software decoder avdec_h264 over ducatih264dec hence use-drm was not set.
    By setting use-drm now you will be able to playback but since it is software decoder, timestamping issue is seen.
    Need to find out why ducatih264dec was not choosen by playbin. I guess resolution of the stream could be the reason.

    I could use explicit pipeline. qtdemux element is throwing error and exiting.

    Ram
  • Hi Ram,

    Thank you for your quick information. Could you please check this issue as it seems to be urgent for our release? Let me know if you need any further information.

    Regards,
    Vikash
  • Hi Vikash,

    TI has not tested streams > 1920x1080. gst-inspect-1.0 ducatih264dec also shows maximum supported resolution is 2048x2048.

    In IPUMM firmware we reserve memory for 2 1920x1080 decode + 1 1920x1080 encode.

    Please refer the datasheets of codecs on memory requirements.

    For your requirement, please make below change, it will work with playbin.

    --- a/src/gstducatih264dec.c

    +++ b/src/gstducatih264dec.c

    @@ -84,12 +84,12 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",

        GST_STATIC_CAPS ("video/x-h264, "

            "stream-format = byte-stream, "   /* only byte-stream */

            "alignment = au, "          /* only entire frames */

    -        "width = (int)[ 16, 2048 ], "

    +        "width = (int)[ 16, 2560 ], "

            "height = (int)[ 16, 2048 ]; "

            "video/x-h264, "

            "stream-format = byte-stream, "   /* only byte-stream */

            "alignment = au, "          /* only entire frames */

    -        "width = (int)[ 16, 2048 ], "

    +        "width = (int)[ 16, 2560 ], "

            "height = (int)[ 16, 2048 ], "

            "profile = (string) {high, high-10-intra, high-10, high-4:2:2-intra, "

            "high-4:2:2, high-4:4:4-intra, high-4:4:4, cavlc-4:4:4-intra}, "

    Please note that TI will not push this patch. With this patch applied, you may not be able to playback dual decode usecases since

    memory requirement may exceed the reserved for IPUMM.

    Make similar changes for MPEG4dec etc if required.

    Mark this thread as "Answered" only you verify the changes.

    Thanks

    Ram

  • Hi Ram,

    Thank you. It worked.

    Regards,
    Vikash