Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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