<div dir="ltr"><div dir="ltr">You need to scale *each frame* with sws_scale from lib_av (<a href="https://libav.org/documentation/doxygen/master/group__libsws.html#gae531c9754c9205d90ad6800015046d74">https://libav.org/documentation/doxygen/master/group__libsws.html#gae531c9754c9205d90ad6800015046d74</a>). I suggest you look at the example code linked in the documentation for reference.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 27, 2019 at 9:38 AM ABDALLAH Moussa <<a href="mailto:Moussa.ABDALLAH@nexeya.com">Moussa.ABDALLAH@nexeya.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="FR">
<div class="gmail-m_-4308692754950187338WordSection1">
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to record a stream video to a output file mkv. I set my camera with the resolution 1280x720 and I would like to change it with ffmpeg on my program how can I do that please ?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have success to change the framerate but I failed  with the resolution or other option like bit_rate :<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ivst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">r_frame_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">.</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">num</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">=</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">25</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ivst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">r_frame_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">.</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">den</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">=</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">1</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;
<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ovst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">r_frame_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">      =
 ivst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">r_frame_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ovst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">avg_frame_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">    =
 ovst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">r_frame_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ivst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">codec</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">bit_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">
 = </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">3000000</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;
<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ovst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">codec</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">bit_rate</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">
 = </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">3000000</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ivst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">codec</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">height</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">
 = </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">320</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ivst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">codec</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">width</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">
 = </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">240</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ovst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">codec</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">height</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">
 = </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">320</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:rgb(30,30,30)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">        ovst-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">codec</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">-></span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(156,220,254)">width</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">
 = </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(181,206,168)">240</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(212,212,212)">;<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks you for your help !<u></u><u></u></p>
</div>
</div>

_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div>