[Libav-user] generating blank video frame?

Alex Cohn alexcohn at netvision.net.il
Sat Jan 28 14:20:08 CET 2012


On Jan 28, 2012 1:53 AM, "David Henry" <dhenry at movenetworks.com> wrote:
>
> I'm working on an application where if a UDP transport stream is
lost/dropped for some time, I want to insert blank frames of video and
silence for
> audio.
...
> I would like to create blank frames in a separate thread.  I tried just
creating an output buffer, same size I get back from sws_scale() and doing
a memset() 0 on it, but then my player plays a green frame for that video.

You should memset U and V channels to 127. If your pictures are yuv420
planar then you should set w*h bytes to 0 and after that w*h/2 to 127.

BR,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120128/ab494185/attachment.html>


More information about the Libav-user mailing list