To convert an AVI file to MOV format using the ffmpeg
command in Linux or Unix, you can use the following syntax:
ffmpeg -i input.avi -c copy output.mov
Here, input.avi
is the name of the input AVI file, and output.mov
is the name of the output MOV file. The -c copy
option tells ffmpeg
to copy the video and audio streams without re-encoding, which is faster than re-encoding but may result in a loss of quality.
If you want to re-encode the video and audio streams to improve the quality, you can use a different ffmpeg
command, such as:
ffmpeg -i input.avi -c:v libx264 -c:a aac -crf 18 -b:a 192k output.mov
In this example, -c:v libx264
specifies the H.264 video codec, -c:a aac
specifies the AAC audio codec, -crf 18
specifies the constant rate factor (a value between 0 and 51, where 0 is lossless and 51 is the lowest quality), and -b:a 192k
specifies the bitrate of the audio stream.
Note that ffmpeg
is a very powerful and flexible tool, and there are many options available for converting video files. The above examples are just a few of the many possible ways to use ffmpeg
to convert AVI to MOV format.