<div dir="ltr"><div>You can use convert from imageMagick to create text frames. That is what I do.<br><br><a href="http://www.imagemagick.org/Usage/text/#text_operators">http://www.imagemagick.org/Usage/text/#text_operators</a><br><br><br></div>Salsaman.<br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br><a href="http://lives-video.com" target="_blank">http://lives-video.com</a><br><a href="https://www.openhub.net/accounts/salsaman" target="_blank">https://www.openhub.net/accounts/salsaman</a><br></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Feb 10, 2016 at 9:39 PM, Arthur Muller <span dir="ltr"><<a href="mailto:muller@vki.com" target="_blank">muller@vki.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="EN-US"><div><span class=""><p><span style="color:#1f497d">></span>Somebody know how can i add black frames with some text to obtain a output video.<span style="color:#1f497d"><u></u><u></u></span></p></span><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Juan,<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">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<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">1) Use sws_scale to convert each rgb image to yuv format.<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">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.<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">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.<u></u><u></u></span></p><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Good luck!<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="HOEnZb"><font color="#888888"><p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Arthur<u></u><u></u></span></p></font></span></div></div><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>