0

I'm quite new to gstreamer. I'm trying to play a mpg video file with the gstreamer1.0 playbin element.

When I use the following pipeline everything works fine and the video is shown:

gst-launch-1.0 -vm --gst-debug=3 filesrc location=/opt/aac-files/MPEG2-av-ps-short.mpg ! mpegpsdemux ! multiqueue ! mpegvideoparse ! mpeg2dec ! videoconvert ! videoscale ! video/x-raw,format=BGR16 ! waylandsink surface-id=1000

But when I use the playbin element I get an invalid format error message:

:/# GST_DEBUG=waylandsink:DEBUG,wayland:DEBUG gst-launch-1.0 playbin uri=file:///opt/aac-files/MPEG2-av-ps-short.mpg video-sink=waylandsink surface-id=1000
Setting pipeline to PAUSED ...

** (gst-launch-1.0:2373): WARNING **: Wayland compositor is missing the ability to scale, video display may not work properly.
Pipeline is PREROLLING ...
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Got context from element 'mfxdec0': gst.mfx.Aggregator=context, gst.mfx.Aggregator=(GstMfxTaskAggregator)NULL;
Redistribute latency...
0:00:00.151055451  2373 0x7f48b00ac000 DEBUG            waylandsink ../../../git/ext/wayland/gstwaylandsink.c:533:gst_wayland_sink_set_caps:<waylandsink0> set caps video/x-raw, format=(string)NV12, width=(int)720, height=(int)576, interlace-mode=(string)progressive, pixel-aspect-rat1

(gst-launch-1.0:2373): GStreamer-CRITICAL **: gst_debug_log_valist: assertion 'category != NULL' failed

(gst-launch-1.0:2373): GStreamer-CRITICAL **: gst_debug_log_valist: assertion 'category != NULL' failed
0:00:00.180116315  2373 0x7f48b00ac000 DEBUG            waylandsink ../../../git/ext/wayland/wlshmallocator.c:150:gst_wl_shm_memory_construct_wl_buffer:<wlshmallocator0> Creating wl_buffer of size 1769472 (768 x 576, stride 3072), format BGRx
0:00:00.180401520  2373 0x7f48b00ac000 DEBUG            waylandsink ../../../git/ext/wayland/wlshmallocator.c:150:gst_wl_shm_memory_construct_wl_buffer:<wlshmallocator0> Creating wl_buffer of size 622080 (720 x 576, stride 720), format NV12
[destroyed object]: error 0: invalid format 0x3231564e
surface                : 40 created
wl_display@1: error 0: invalid object 3
Error communicating with wayland: Invalid argument
SetDestinationRectangle: surface ID (40), Width (67111600), Height (32750)
Error communicating with wayland: Invalid argument
SetSourceRectangle     : surface ID (40), Width (67111600), Height (32750)
Error communicating with wayland: Invalid argument
SetVisibility          : surface ID (40), ILM_TRUE
Error communicating with wayland: Invalid argument
layerAddSurface        : surface ID (40) is added to layer ID (1000)
Error communicating with wayland: Invalid argument
Error communicating with wayland: Invalid argument
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstPulseSinkClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:05.264870866
Setting pipeline to PAUSED ...

Is there a possibility to set the correct video format with playbin?

facze
  • 1
  • 2
  • @RolfofSaxony if I'm using autovideosink I'll get a coredump. I'm using weston as compositor, so I think waylandsink should be the correct videosink – facze Jul 11 '17 at 08:49
  • `gst-launch-1.0 playbin uri=file:///home/rolf/some.mpg` does the job on my Linux box. `playbin` makes all of the decisions for you. – Rolf of Saxony Jul 11 '17 at 15:13

0 Answers0