[Libav-user] [resize video] Lost duration

Hung Nguyen Hung.Nguyen at ambientdigitalgroup.com
Tue Oct 14 03:59:13 CEST 2014


Hi Carl,

Yes, I also scale the input using scale filter. 
The filter I use is as following:
filter_spec = "scale=iw*min(640/iw\\,360/ih):ih*min(640/iw\\,360/ih), pad=640:360:(640-iw*min(640/iw\\,360/ih))/2:(360-ih*min(640/iw\\,360/ih))/2”;

I still don’t understand why scale video cause duration metadata lost. 

Thanks,

—
Hưng



On Oct 13, 2014, at 11:59 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Hung Nguyen <Hung.Nguyen at ...> writes:
> 
>> The problem I am facing now is, every time I try to 
>> change video size when initialise encoder, the 
>> output video does not have video duration: 
>> 
>> enc_ctx->height = 360;
>> enc_ctx->width = 640; 
> 
> Did you just set the dimensions in the codec context 
> or did you also use the scale your input (with the 
> scale filter)?
> 
> Carl Eugen
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user



More information about the Libav-user mailing list