FFMPEG

Convert AVI to MP4

no Re-encode: Only changing the container

ffmpeg -i input_filename.avi -c:v copy -c:a copy -y output_filename.mp4

In this commandline, you are providing

  • the AVI video as input

  • specifying the name of the output MP4 file,

  • instructing FFmpeg to directly copy the audio and video (seen here: -c:v copy -c:a copy) from the AVI container format to the MP4 container format.

Convert Image Sequence to Video

Sequential

In this example the input images are sequentially named img001.png, img002.png, img003.png, etc.

ffmpeg -framerate 24 -i img%03d.png output.mp4

Starting with a specific image

For example if you want to start with img126.png then use the -start_number option:

Pipe

You can use cat or other tools to pipe to ffmpeg:

Convert .mov to .mp4

Converting .oog to .mp3

I used this command:

Here is a more complicated version:

Explanation of the used arguments in this example:

  • -i - input file

  • -vn - Disable video, to make sure no video (including album cover image) is included if the source would be a video file

  • -ar - Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options.

  • -ac - Set the number of audio channels. For output streams it is set by default to the number of input audio channels. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options. So used here to make sure it is stereo (2 channels)

  • -b:a - Converts the audio bitrate to be exact 192kbit per second

Last updated