Supported Video Formats in FFmpeg

FFmpeg supports a wide range of video formats (also called containers). Below is a list of commonly used types, their extensions, and general use cases.

Format Extension Common Codecs Use Case
MP4 .mp4 H.264, AAC Web video, mobile devices, streaming
AVI .avi Xvid, MJPEG Legacy compatibility, Windows apps
MKV (Matroska) .mkv H.264, VP9, Opus High-quality storage, subtitles, multiple tracks
WebM .webm VP8/VP9, Opus Web use, HTML5 video
MOV .mov H.264, ProRes Apple ecosystem, professional editing
FLV .flv H.263, MP3 Legacy Flash video
OGG .ogv Theora, Vorbis Open source video, browser support
MPEG-TS .ts MPEG2, H.264 Broadcasting, streaming segments

Changing Output Format in fluent-ffmpeg


ffmpeg('input.avi')
  .format('mp4')        // Convert to MP4
  .save('output.mp4');

Listing Supported Formats


const ffmpeg = require('fluent-ffmpeg');

ffmpeg.getAvailableFormats((err, formats) => {
  console.log(formats);
});

Note: This returns an object where each key is a format code (e.g. mp4, avi, mkv), with descriptions and flags.