I've got some recordings from TV. The movies are all in 4:3 but the advertisement is in 16:9. My input format is a mpeg 2 transport stream. I would like to convert my movies to mp4 with h264 video and aac audio but delete all frames from the video with 16:9 aspect ratio. The sound should also be deleted at the matching frames. Converting mts to mp4 is easy with ffmpeg but how do I extract the frames with 4:3 aspect ratio?

converting mts to mp4:

ffmpeg -i input.mts -b:v 6000k -b:a 256k -vcodec libx264 -acodec aac -o output.mp4

I'm under a gentoo linux with ffmpeg version 0.10.3 and MEncoder 1.1-4.5.4


Comskip is a software that can detect ads based on a variety of characteristics. One of them is "changes in aspect ratio". So you should integrate comskip into your process.

  • I'm under linux only :( I resolved this with ProjectX. It's a java tool that has a gui and a commandline interface. I wrote a simple bash script that invokes ProjectX with several parameters for all my movies. Works great :D – MinecraftBhil Nov 22 '13 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.