On my Windows 7 computer, I have several videos that need converting to an iOS-friendly format. I'd like to do this as efficiently as possible.

I have several kinds of videos:

  • MKVs containing (h|x)264 video and mp3 or AAC2ch.
  • AVI files containing any arbitrary video or audio stream.

I want to convert them to MP4s with h264 video with AAC2ch audio. On the Mac, I use MP4Tools and it does a great job. I can't find anything similar on Windows.

Is there an ffmpeg command, or an application that I can use that will simply pass-through the video when it's in the correct format? All of the Windows conversion software I have used just re-encodes the video, which adds a lot time, and reduces quality.


If the video and audio is already encoded properly, use the following FFmpeg command:

ffmpeg -i input.mkv -c copy output.mp4

This will copy the bitstreams without encoding.

To convert AVI files you usually want to re-encode them, since they will often contain MPEG-4 visual video and MP3 audio instead of the required (or recommended) h.264 / AAC.

  • Is there a one-size-fits-all command that will re-encode when necessary? – Redandwhite Nov 30 '12 at 16:00
  • @Redandwhite Not really, because there are some peculiarities as to how the h.264 (and audio, I guess) codec(s) need to be created, e.g. with a certain profile, without B-pictures, and you'd need to check these before attempting to re-encode. You could probably set up a batch script that parses MediaInfo output and re-encodes if necessary though. – slhck Nov 30 '12 at 16:15
  • 1
    if your offering a complete solution, why not just use a ffmpeg based video player on the iphone devices, so much easier than conversion and better on server bandwidth – Michelle Cannon Dec 6 '12 at 21:35

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.