<div dir="ltr"><div>you are absolutely in the right path. you just have to figure how to implement a function that copies/translate the pixels from you QT data-structure into the buffer that in the example is being filled with self-generated data. <br>It may be as easy as to copy each r,g,b byte or depending on your input/output formats, it may require some manipulation to properly decode/encode the pixels in the right formats (bit lengths, channel order, etc) <br>I went through that path a couple of months ago, in my case I was writing a video-recorder chrome-extension and had to copy the pixels from the chrome-video stream into the ffmpeg AVFrame. I used the same example that you as reference for that. <br><br></div><div>other tricky part you will have to solve (once you will be able to copy frames) will be the timing of each frame. but that is another history.    <br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Cesar  Pachón<br>-------------------------------------------------------------<br><a href="http://www.cesarpachon.com" target="_blank">www.cesarpachon.com</a>, just a digital hermit<br><br></div></div></div>
<br><div class="gmail_quote">On Wed, Aug 12, 2015 at 4:31 AM, Moreno, Nicolas - Harris France <span dir="ltr"><<a href="mailto:NMORENO@harris.com" target="_blank">NMORENO@harris.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="blue" vlink="purple" lang="FR">
<div>
<p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">My application needs to capture all the window to create a capture video. This software is developed with C++ and Qt.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I can get a screenshot each X msec and now I have to put it in a video file. I would like to use FFmpeg but I didn’t found a example to create a video with QPixmap (or pixmap). I found this example:
<a href="http://ffmpeg.org/doxygen/trunk/decoding_encoding_8c-example.html" target="_blank">http://ffmpeg.org/doxygen/trunk/decoding_encoding_8c-example.html</a> but I can’t doing it work (problem with malloc) and I am not sure that is the better way to create video.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Can you explain me how to create a video or show me an example, please?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">If you need, I can get you more information.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Nicolas MORENO<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><i><span style="font-size:10.5pt;font-family:Colibri" lang="EN-US">------------------------------------------------<u></u><u></u></span></i></b></p>
<p class="MsoNormal"><b><i><span style="font-size:10.5pt;font-family:Colibri" lang="EN-US">Nicolas MORENO</span></i></b><span style="font-size:10.5pt;font-family:Colibri" lang="EN-US"><br>
Consulting Software Engineer<br>
<br>
<b>Exelis</b><br>
<b>Visual Information Solutions</b><br>
<b>A subsidiary of Exelis Inc.</b><br>
Standard : <a href="tel:%2B33%20%280%29%205%2081%2091%2090%2033" value="+33581919033" target="_blank">+33 (0) 5 81 91 90 33</a><br>
<a href="mailto:nicolas.moreno@exelisinc.com" target="_blank">nicolas.moreno@exelisinc.com</a></span><span style="font-size:10.0pt;font-family:Colibri" lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<br>
<hr>
<font face="Arial" size="1" color="Gray"><br>
This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions
 presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by
 any virus transmitted by this e-mail. <br>
</font>
</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>