[Libav-user] Black frames

salsaman salsaman at gmail.com
Thu Feb 11 02:38:04 CET 2016

You can use convert from imageMagick to create text frames. That is what I




On Wed, Feb 10, 2016 at 9:39 PM, Arthur Muller <muller at vki.com> wrote:

> >Somebody know how can i add black frames with some text to obtain a
> output video.
> Juan,
> This is somewhat close to what I’ve been doing – except that I had my
> images in RGB format. If you can generate the RGB images and put each image
> data in an array, then you can
> 1) Use sws_scale to convert each rgb image to yuv format.
> 2) Use avcodec_encode_video2/av_packet_rescale_ts to add each frame to
> your output stream. Make sure to flush everything by passing a NULL frame
> as many times as necessary at the end.
> Of course, there are a lot more details other than these calls
> (AVFormatContext, etc.). But if you’re familiar with the general procedure
> then I suggest that for each black frame with text you want to add just
> create the RGB image for that (hopefully, this is not too difficult),
> convert the RGB to YUV, and add the frame.
> Good luck!
> -Arthur
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160210/af7fc725/attachment.html>

More information about the Libav-user mailing list