[FFmpeg-user] different aspect ration in ONE file

Simon Döbereiner - SmartCast doebereiner at smartcast.de
Tue Dec 17 14:40:31 CET 2013


Dear All,

I have lots of *.ts files to convert to mp4. No Problem so far, but it's a recording from a television channel with different aspect ratio. So for example the movie is 4/3 while the adverts are 16/9.

Here comes the problem: all ts files already have squished the parts with 16/9 to 4/3 (the recording doesn't care, it just records one full hour).

Is there any possibility to fix the padding to have 4/3 as 4/3 and 16/9 as 16/9 although it's in ONE file?

Atm I use this to encode my files:

/usr/local/bin/ffmpeg -y -i "$f" -crf 30 -vf "yadif, scale=iw*sar:ih , pad=max(iw\,ih*(16/9)):-Ow/(16/9):(ow-iw)/2:(oh-ih)/2" -threads 24 -aspect 16:9 "${f/.ts}.mp4" >> "${f/.ts}.log" 2>&1 ;
x264

Best,
Simon Döbereiner
Software Development
Softwareentwicklung
-----------------------------------
SmartCast GmbH              Germany
Beta-Str. 7,  D-85774 Unterfoehring
Tel               +49 89 411144 136
Fax               +49 89 411144 222
E-Mail     doebereiner at smartcast.de<mailto:doebereiner at smartcast.de>
www                www.smartcast.eu
-----------------------------------
Tel Hong Kong       +852 3 973 3729
Tel Singapore       +65  3 158 2164
Tel Thailand        +66  2 402 8274
-----------------------------------
Managing Director / Geschäftsführer
Christian Brenner,  HRB Mchn 137561
-----------------------------------



More information about the ffmpeg-user mailing list