I'm trying to play an mp4 video back using gstreamer on the wayland backend
but I'm having trouble with playing mp4 video clip.
My environment is like this.
board : i.mx6q sabreauto
branch : imx-3.14.38-6QP_ga
image : bitbake fsl-image-gui
graphic backend : wayland backend
command
$export GSTL=gst-launch-1.0
$export PLAYBIN=playbin
$export GPLAY=gplay-1.0
$export GSTINSPECT=gst-inspect-1.0
$GSTL -v filesrc location=clip.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! waylandsink
The error message is like this.
[INFO] Product Info: i.MX6Q/D/S ====== VPUDEC: 4.0.7 build on Mar 4 2016 19:06:40. ====== wrapper: 1.0.61 (VPUWRAPPER_ARM_LINUX Build on Feb 18 2016 11:53:25) vpulib: 5.4.31 firmware: 3.1.1.46070 Pipeline is PREROLLING ... Got context from element 'waylandsink0': GstWaylandDisplayHandleContextType=context, handle=(gpointer)NULL; ====== AIUR: 4.0.7 build on Mar 4 2016 19:06:32. ====== Core: MPEG4PARSER_06.09.16 build on Jun 29 2015 05:17:33 file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm11_elinux.so.3.2 ------------------------ Track 00 [video_0] Enabled Duration: 0:00:30.000000000 Language: und Mime: video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)avc, width=(int)1920, height=(int)720, framerate=(fraction)30/1, codec_data=(buffer)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20 ------------------------ /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-h264\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)avc\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ codec_data\=\(buffer\)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20" /GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:sink: caps = "video/x-h264\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)avc\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ codec_data\=\(buffer\)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-h264\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)avc\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ codec_data\=\(buffer\)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20" [INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0 /GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1" ERROR: from element /GstPipeline:pipeline0/GstAiurDemux:aiurdemux0: GStreamer encountered a general stream error. Additional debug info: /home/lbox/idc/bsp/build/tmp/work/imx6qsabreauto-poky-linux-gnueabi/gst1.0-fsl-plugin/4.0.7-r0/gst1.0-fsl-plugins-4.0.7/plugins/aiurdemux/aiurdemux.c(1007): aiurdemux_pull_task (): /GstPipeline:pipeline0/GstAiurDemux:aiurdemux0: streaming stopped, reason not-negotiated, state 3 ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... /GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:src: caps = "NULL" /GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:sink: caps = "NULL" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "NULL" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "NULL" /GstPipeline:pipeline0/GstAiurDemux:aiurdemux0.GstPad:video_0: caps = "NULL" Freeing pipeline ... |
but if i run next command
$GSTL -v filesrc location=clip.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! overlaysink
There's no problem. It's working. But the video clip is playing on the fbdev backend not the wayland.
Can someone please tell me what I might be doing wrong?
Thanks!
Hello,
Have you tried imxv4l2sink?
Luis
I tryed imxv4l2sink.
But It's also playing on the fb backend(full screen) not wayland backend.
The difference of imxv4l2sink and overlaysink is the scaling of video clip.
The video is playing with same size of the video clip(1920x720) by overlaysink.
Using imxv4l2sink, the video is stretched to the full screen(1920x1080).
$GSTL -v filesrc location=clip.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxv4l2sink
====== IMXV4L2SINK: 4.0.7 build on Mar 4 2016 19:06:36. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (1920x1080).
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.7 build on Mar 4 2016 19:06:40. ======
wrapper: 1.0.61 (VPUWRAPPER_ARM_LINUX Build on Feb 18 2016 11:53:25)
vpulib: 5.4.31
firmware: 3.1.1.46070
Pipeline is PREROLLING ...
====== AIUR: 4.0.7 build on Mar 4 2016 19:06:32. ======
Core: MPEG4PARSER_06.09.16 build on Jun 29 2015 05:17:33
file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm11_elinux.so.3.2
------------------------
Track 00 [video_0] Enabled
Duration: 0:00:30.000000000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)avc, width=(int)1920, height=(int)720, framerate=(fraction)30/1, codec_data=(buffer)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20
------------------------
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-h264\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)avc\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ codec_data\=\(buffer\)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20"
/GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:sink: caps = "video/x-h264\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)avc\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ codec_data\=\(buffer\)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-h264\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)avc\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ codec_data\=\(buffer\)0142c00dffe100176742c00df403c02dd80880000003008000001e078a155001000568ce010f20"
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
/GstPipeline:pipeline0/GstVpuDec:vpudec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstImxV4l2Sink:imxv4l2sink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1"
v4l2sink need allocate 9 buffers.
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:30.002519671
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Total showed frames (816), playing for (0:00:30.004343004), fps (27.196).
Freeing pipeline ...
when you use the command "gst-inspect waylandsink", what do you find? have you installed this sink already?
Yes. I installed waylandsink and the result is as below
root@imx6qsabreauto:~# gst-inspect-1.0 waylandsink
Factory Details:
Rank marginal (64)
Long-name wayland video sink
Klass Sink/Video
Description Output to wayland surface
Author Sreerenj Balachandran <sreerenj.balachandran@intel.com>, George Kiagiadakis <george.kiagiadakis@collabora.com>
Plugin Details:
Name waylandsink
Description Wayland Video Sink
Filename /usr/lib/gstreamer-1.0/libgstwaylandsink.so
Version 1.4.5
License LGPL
Source module gst-plugins-bad
Source release date 2014-12-18
Binary package GStreamer Bad Plug-ins source release
Origin URL Unknown package origin
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBaseSink
+----GstVideoSink
+----GstWaylandSink
Implemented Interfaces:
GstVideoOverlay
GstWaylandVideo
Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
video/x-raw
format: { BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
Element Flags:
no flags set
Element Implementation:
Has change_state() function: gst_wayland_sink_change_state
Element has no clocking capabilities.
Element has no URI handling capabilities.
Pads:
SINK: 'sink'
Implementation:
Has chainfunc(): gst_base_sink_chain
Has custom eventfunc(): gst_base_sink_event
Has custom queryfunc(): gst_base_sink_sink_query
Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
Pad Template: 'sink'
Element Properties:
name : The name of the object
flags: readable, writable
String. Default: "waylandsink0"
parent : The parent of the object
flags: readable, writable
Object of type "GstObject"
sync : Sync on the clock
flags: readable, writable
Boolean. Default: true
max-lateness : Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited)
flags: readable, writable
Integer64. Range: -1 - 9223372036854775807 Default: 20000000
qos : Generate Quality-of-Service events upstream
flags: readable, writable
Boolean. Default: true
async : Go asynchronously to PAUSED
flags: readable, writable
Boolean. Default: true
ts-offset : Timestamp offset in nanoseconds
flags: readable, writable
Integer64. Range: -9223372036854775808 - 9223372036854775807 Default: 0
enable-last-sample : Enable the last-sample property
flags: readable, writable
Boolean. Default: true
last-sample : The last sample received in the sink
flags: readable
Boxed pointer of type "GstSample"
blocksize : Size in bytes to pull per buffer (0 = default)
flags: readable, writable
Unsigned Integer. Range: 0 - 4294967295 Default: 4096
render-delay : Additional render delay of the sink in nanoseconds
flags: readable, writable
Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0
throttle-time : The time to keep between rendered buffers (0 = disabled)
flags: readable, writable
Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0
max-bitrate : The maximum bits per second to render (0 = disabled)
flags: readable, writable
Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0
show-preroll-frame : Whether to render video frames during preroll
flags: readable, writable
Boolean. Default: true
display : Wayland display name to connect to, if not supplied via the GstContext
flags: readable, writable
String. Default: null