[Libav-user] How to changes resolution to output file.
Michael Armes
michael.armes at gmail.com
Wed Feb 27 23:27:25 EET 2019
I did not find that setting bitrate had any effect in my scenarios with
mp4/mov. I had to manually control my color depth and resolution (and set
framerate) to hit my desired bitrate. I never did have to convert pixel
formats, but my read of the docs is that sws_scale can do this as long as
you set your SwsContext appropriately.
On Wed, Feb 27, 2019 at 11:08 AM ABDALLAH Moussa <Moussa.ABDALLAH at nexeya.com>
wrote:
> Thanks you for your help!
> To change the bit_rate I have to use sw_scale too?
>
> Le 27 févr. 2019 à 18:49, Michael Armes <michael.armes at gmail.com> a
> écrit :
>
> You need to scale *each frame* with sws_scale from lib_av (
> https://libav.org/documentation/doxygen/master/group__libsws.html#gae531c9754c9205d90ad6800015046d74).
> I suggest you look at the example code linked in the documentation for
> reference.
>
> On Wed, Feb 27, 2019 at 9:38 AM ABDALLAH Moussa <
> Moussa.ABDALLAH at nexeya.com> wrote:
>
>> Hello,
>>
>>
>>
>> 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 ?
>>
>>
>>
>> I have success to change the framerate but I failed with the resolution
>> or other option like bit_rate :
>>
>>
>>
>> ivst->r_frame_rate.num=25;
>>
>> ivst->r_frame_rate.den=1;
>>
>> ovst->r_frame_rate = ivst->r_frame_rate;
>>
>> ovst->avg_frame_rate = ovst->r_frame_rate;
>>
>> ivst->codec->bit_rate = 3000000;
>>
>> ovst->codec->bit_rate = 3000000;
>>
>> ivst->codec->height = 320;
>>
>> ivst->codec->width = 240;
>>
>> ovst->codec->height = 320;
>>
>> ovst->codec->width = 240;
>>
>>
>>
>> Thanks you for your help !
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/libav-user
>>
>> To unsubscribe, visit link above, or email
>> libav-user-request at ffmpeg.org with subject "unsubscribe".
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190227/f8ece105/attachment.html>
More information about the Libav-user
mailing list