shmsink/shmsrc adds colored band to output

Nicolas Dufresne nicolas at ndufresne.ca
Wed Apr 26 13:19:13 UTC 2017


Le mercredi 26 avril 2017 à 10:59 +0530, Mandar Joshi a écrit :
> gst-launch-1.0 rtspsrc location=url ! rtph264depay ! vaapidecodebin !
> shmsink socket-path=/tmp/x wait-for-connection=false
> 
> gst-launch-1.0 -v shmsrc  socket-path=/tmp/x is-live=true
> do-timestamp=true !
> video/x-raw,width=1920,height=1080,format=NV12,framerate=25/1  !
> videoconvert !  xvimagesink

There is a problem here, since hardware decoder generally requires some
padding. For 1080p, I would expect the decoder to produce buffer of the
size 1920x1088 at the very minimum (H264 with 16x16 macroblock). I'm
surprise it's not more broken then that here, probably vaapidecodebin
makes a copy without padding. In any case, it's likely the problem is
not there for you. But read this as a warning, you are doing something
undefined.

> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
> video/x-raw, width=(int)1920, height=(int)1080, format=(string)NV12,
> framerate=(fraction)25/1
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps
> = video/x-raw, width=(int)1920, height=(int)1080,
> framerate=(fraction)25/1, format=(string)YV12
> /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps
> =
> video/x-raw, width=(int)1920, height=(int)1080,
> framerate=(fraction)25/1, format=(string)YV12
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink:
> caps
> = video/x-raw, width=(int)1920, height=(int)1080,
> format=(string)NV12,
> framerate=(fraction)25/1
> ^Chandling interrupt.
> Interrupt: Stopping pipeline ...
> Execution ended after 0:00:02.345800624
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
> 
> They work but there is a colored band in the out at the top of the
> image. I've attached the image.
> I am doing this on an Intel Haswell processor.
> Doing video conversion to RGBA  before sending video to shmsink
> solves
> the problem but that adds a lot to the CPU usage.
> Can someone suggest a solution?


You can narrow down a bit. Replaced xvimagesink to ximagesink, that
would indicate a bug in your XV driver. Solution would be to update
your X11 drivers, or file a bug if there is no newer version that fixes
it.

You could also test replacing vaapidecodebin with avdec_h264, that
would indicate an issue with usage of vaapidecodebin.

regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170426/6672c985/attachment.sig>


More information about the gstreamer-devel mailing list