Linux / Unix: Convert AVI To MOV Format Using ffmpeg Command

by on August 27, 2011 · 0 comments· LAST UPDATED August 27, 2012

in

How do I convert a .avi file format to quicktime .mov file format under Linux using command line options?

You can use the ffmpeg command - a very fast video and audio converter that can also grab from a live audio/video source. The syntax is:

 
/usr/bin/ffmpeg -i "input.avi" -acodec libmp3lame -ab 192 "output.mov"
 

Where,

  • -i "input.avi" : Input .avi file.
  • -acodec libmp3lame : Force audio codec to libmp3lam codec.
  • -ab 192 - bitrate : Set the audio bitrate to 192 bit/s
  • "output.mov" : Output file name.

Example

Type the following command:

 
/usr/bin/ffmpeg -i "kids-birthday-party.avi" -acodec libmp3lame -ab 192 "/tmp/kids-dvd.mov"
 

Sample outputs:

ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 13 2012 14:14:09 with gcc 4.4.5
  configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis
  libavutil    50. 43. 0 / 50. 43. 0
  libavcodec   52.123. 0 / 52.123. 0
  libavformat  52.111. 0 / 52.111. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter   1. 80. 0 /  1. 80. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg4 @ 0x212edc0] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'kids-birthday-party.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 01:29:51.92, start: 0.000000, bitrate: 1088 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], 25 tbr, 25 tbn, 25 tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 32 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
[buffer @ 0x212ebe0] w:640 h:272 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
Output #0, mov, to '/tmp/kids-dvd.mov':
  Metadata:
    encoder         : Lavf52.111.0
    Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, s16, 0 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , , ,

Previous Faq:

Next Faq: