Unwidescreening

ffmpeg 

Tuesday, September 02, 2008

BBC Four often show old programmes (like Doctor Who and Batman) that are transmitted in widescreen, but with black borders down the sides to keep the original 4:3 aspect ratio of the main picture. As the screen on my Archos (and my phone) are 4:3, it seems silly to play the widescreen broadcast in letterbox, and leave the picture in a tiny box in the middle.
So this screen crops the borders off the side, thus converting a widescreen broadcast to a 4:3 DivX.
It also works for things that really are widescreen - when converting for a 4:3 display, it's sometimes more watchable to have a bigger image with the side of the picture missing, than being able to see the whole picture, smaller.
This does a two pass encode for better quality.

ffmpeg -i inputfile.mpg -vtag DIVX -f avi -vcodec mpeg4 -aspect 4:3 -cropleft 100 -cropright 100 -pass 1 -s 640x480 -b 1000k -acodec mp3 -ab 128000 -ar 48000 -ac 2 outputfile.avi

rm outputfile.avi

ffmpeg -i "$f" -vtag DIVX -f avi -vcodec mpeg4 -aspect 4:3 -cropleft 100 -cropright 100 -pass 2 -s 640x480 -b 1000k -acodec mp3 -ab 128000 -ar 48000 -ac 2 outputfile.avi

rm ffmpeg2pass*





More

Archives     Categories