Hello,
According to data sheets, I should be able to decode 4K video on i.mx8m+.
Using the “Toradex Embedded Linux Reference Multimedia Image”, version “6.6.0+build.12” I tried playing video streams using gstreamer with following resolutions:
- 1280x960 → h.264 and h.265 decoding work
- 1600x1200 → h.264 decoding works, h.265 decoding fails
- 2048x1535 → h.264 and h.265 decoding fail
- I also tried playing video files with 4K resolution, that also fails.
I tried decodebin
/ uridecodebin
which uses v4l2h264dec0
/ v4l2h265dec0
and also tried vpudec
.
How can i play video with higher resolution?
Example log
root@verdin-imx8mp-15336033:~# GST_DEBUG=2 gst-launch-1.0 uridecodebin uri=rtsp://192.168.2.62/Streaming/channels/001/ ! videoconvert ! fpsdisplaysink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Pipeline is PREROLLED ...
Prerolled, waiting for progress to finish...
Progress: (connect) Connecting to rtsp://192.168.2.62/Streaming/channels/001/
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sending PLAY request
Redistribute latency...
Progress: (request) Sent PLAY request
Redistribute latency...
====== V4L2DEC: 1.20.3 build on Sep 15 2022 02:27:06. ======
0:00:00.232983619 1085 0xffff9c01c060 WARN decodebin gstdecodebin2.c:2447:connect_pad:<decodebin0> Element v4l2h264dec0 does not accept caps
====== VPUDEC: 4.7.2 build on Sep 1 2022 09:49:28. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Aug 31 2022 01:28:14)
vpulib: 1.1.1
firmware: 1.1.1.65535
0:00:00.247580000 1085 0xffff9c01c060 ERROR vpu_dec_object gstvpudecobject.c:1415:gst_vpu_dec_object_decode:<vpudecobject0> failed to decode frame: failure
0:00:00.275309050 1085 0xaaaaeed78360 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<udpsrc1> error: Internal data stream error.
0:00:00.275370924 1085 0xaaaaeed78360 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<udpsrc1> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source/GstUDPSrc:udpsrc1: Internal data stream error.
Additional debug info:
../git/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source/GstUDPSrc:udpsrc1:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.158149382
Setting pipeline to NULL ...
0:00:00.281243775 1085 0xaaaaeed77aa0 WARN rtspsrc gstrtspsrc.c:6526:gst_rtsp_src_receive_response:<source> receive interrupted
0:00:00.281316524 1085 0xaaaaeed77aa0 WARN rtspsrc gstrtspsrc.c:6624:gst_rtspsrc_try_send:<source> receive interrupted
0:00:00.281348148 1085 0xaaaaeed77aa0 WARN rtspsrc gstrtspsrc.c:9037:gst_rtspsrc_pause:<source> PAUSE interrupted
0:00:00.285059304 1085 0xaaaaeed77aa0 WARN rtspsrc gstrtspsrc.c:6789:gst_rtspsrc_send:<source> got NOT IMPLEMENTED, disable method TEARDOWN
Freeing pipeline ...
System info
root@verdin-imx8mp-15336033:~# tdx-info
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 5.15.148-6.6.0-6.6.0+git.23a8e831749d #1 SMP PREEMPT Thu Feb 29 20:25:21 UTC 2024
Kernel command line: root=PARTUUID=c21eb82c-02 ro rootwait console=tty1 console=ttymxc2,115200 consoleblank=0 earlycon
Distro name: NAME="TDX Wayland with XWayland"
Distro version: VERSION_ID=6.6.0-build.12
Distro variant: -
Hostname: verdin-imx8mp-15336033
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus on Verdin Development Board
Toradex version: 0063 V1.1B
Serial number: 15336033
Processor arch: aarch64
------------------------------------------------------------