how to convert container format for a video file without re-encoding After some study and research, now I know that AVI and MP4 are video 'container' formats. They are also called 'video file formats'. The actual video data format for the video data in these formats can be encoded in any related format for example H.264 or MPEG-4.

I was trying to copy a AVI video file (H.264 encoded) from my computer to my tablet and the iTunes gave me error that this specific video cannot be played on this iPad. Then I tried copying another video file, this time a MP4 file, and it was copied correctly.

I searched on Apple website and came to know that IPad Air supports the below three videos and their formats.


  
  H.264 video up to 1080p, 60 frames per second, High Profile level 4.2    with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4,    and .mov file formats;   
  MPEG-4 video up to 2.5 Mbps, 640 by 480    pixels, 30 frames per second, Simple Profile with AAC-LC audio up to    160 Kbps per
  channel, 48kHz, stereo audio in .m4v, .mp4, and .mov    file formats; 
  Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per    second, audio in ulaw, PCM stereo audio in .avi file format;
  


Now I want to convert the existing video AVI file to MP4 format and try to copy again. I do not want to re-encode the video again in H.264 format to avoid quality loss. Is there any solution for my problem. I have access to both, Mac OS X and Windows machines so I am open to any solution. Please help.
I achieved this using ffpeg, a free and open source command line tool.