[Libav-user] possible AVFilterGraph bug: code, work around, and video triggering issue
Hendrik Leppkes
h.leppkes at gmail.com
Wed Jan 25 03:52:48 EET 2017
On Wed, Jan 25, 2017 at 12:44 PM, Blake Senftner
<bsenftner at earthlink.net> wrote:
> I apologize, I have a number of these problem videos and because the video I linked has the same “2 extra pixels per image row” issue, I thought it was also YUV. Sorry I wasted your time, Carl.
>
> https://www.dropbox.com/s/nzwvdoi17am62cp/DoubleLiveEnroll.wmv?dl=0
>
> This video linked above is a 3 second WMV (WMV3) format video with yuv420p pixels and a resolution of 854x480. After conversion to RGBA each image row has an additional 2 pixels of unnecessary data.
>
> The AVFilterGraph linked in my previous email exhibits this issue; additionally, direct use of a sws_context to convert the pixel format also causes the issue. (I did not try with a scale in image dimensions.)
>
linesize can include extra padding, there is no guarantees that all
content in each line is actual image content. All it indicates is the
amount of bytes between the start of each line/row, not the size of
actual image content.
So if you want to extract the actual image content only, discarding
any extra padding per line, you need to read every line individually
based on the width - like your code seems to do.
- Hendrik
More information about the Libav-user
mailing list