Is 'rawvideoparse' element reading the wrong amount of bytes?

Antonio Ospite ao2 at ao2.it
Tue Dec 31 15:43:14 UTC 2019


On Tue, 31 Dec 2019 06:13:14 -0600 (CST)
Aschwin23452345 <aschwin.brandt at gmail.com> wrote:

> Thanks for the help guys! I also tested it with different resolutions as
> follows: 
> 
> ffmpeg -f lavfi -i testsrc=duration=30:size=972x720:rate=30 -vf
> drawtext="fontfile=/path/to/font.ttf: \
> text='Stream A': fontcolor=white: fontsize=24: box=1: boxcolor=black at 0.5: \
> boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -pix_fmt yuv420p stream_a.yuv
> -y
> 
> gst-launch-1.0 filesrc location=stream_a.yuv ! rawvideoparse width=972
> height=720 framerate=1/1 ! xvimagesink
> 
> ffmpeg -f lavfi -i testsrc=duration=30:size=1080x720:rate=30 -vf
> drawtext="fontfile=/path/to/font.ttf: \
> text='Stream A': fontcolor=white: fontsize=24: box=1: boxcolor=black at 0.5: \
> boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -pix_fmt yuv420p stream_a.yuv
> -y
> 
> gst-launch-1.0 filesrc location=stream_a.yuv ! rawvideoparse width=1080
> height=720 framerate=1/1 ! xvimagesink
> 
> And the latter one displays the correct image. I guess the quickest solution
> for me is to use another resolution.
>

If you can change resolution to have dimensions which are multiple of 8
I guess that would be the most robust and backward compatible solution,
yes

For the current resolution, manually adjusting strides and offsets as
Nicolas suggested also works:

gst-launch-1.0 -v filesrc location=testfile ! rawvideoparse format=i420
width=972 height=720 framerate=1/1 plane-strides="<972,486,486>"
plane-offsets="<0,699840,874800>" ! identity silent=0 ! videoconvert !
xvimagesink

The identity is just to have some debug output, and videoconvert is
added for generality.

> One last question: do I need to create a bug report for this? And if yes,
> where? 
>

The issue is in gst-plugins-base/gst-libs/gst/video/video-info.c so if
you want to open a discussion you can file a report on
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues
after checking for similar reports.

Ciao,
   Antonio

-- 
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


More information about the gstreamer-devel mailing list