Hi again,
I achieved to play mp4 video without vpu. I had to add ffmpeg decoders. They are located in libav gstreamer plugins (BR2_PACKAGE_GST1_LIBAV). The commands to play mp4 via frame buffer / KMS are:
Framebuffer
------------------
gst-launch-1.0 -v filesrc location=video2.mp4 ! qtdemux name=d d.video_0 ! queue ! h264parse ! avdec_h264 ! videoconvert ! fbdevsink
kms
------------
gst-launch-1.0 -v filesrc location=video2.mp4 ! qtdemux name=d d.video_0 ! queue ! h264parse ! avdec_h264 ! videoconvert ! kmssink
They both play horizontal videos. However, i need to play vertical format video. It is possible to play it with fbdevsink, but no with kmssink (and im interested in the last one). These are the logs that appears when kmssink is used with vertical mp4 video.
# gst-launch-1.0 -v filesrc location=/stuff/video/vertical.m
p4 ! qtdemux name=d d.video_0 ! queue ! h264parse ! avdec_h264 ! videoconvert !
kmssink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1920
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1080
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8bfdf8f800, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8bfdf8f800, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8b, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, 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)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8b, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8bfdf8f800, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8b, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe1001d6764002aacd9804403c7979a808080a0000003002000000641e306334001000568e97b2c8b, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1080, height=(int)1920, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, format=(string)BGRx, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)BGRx, width=(int)1080, height=(int)1920, framerate=(fraction)25/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)1080, height=(int)1920, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: GStreamer encountered a general resource error.
Additional debug info:
../sys/kms/gstkmssink.c(1711): gst_kms_sink_show_frame (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
drmModeSetPlane failed: Invalid argument (22)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:d: Internal data stream error.
Additional debug info:
../gst/isomp4/qtdemux.c(6545): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:d:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(990): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...
All mp4 videos are lagging. I expect to fix that enabling vpudec...
¿Any idea of why is kmssink crashing when plays vertical mp4 video?
¿Any idea of how to enable vpu in imx8m-plus?
Greetings