187

I need a list of codecs and formats supported by FFmpeg. Where can I find it?

llogan
  • 121,796
  • 28
  • 232
  • 243
poobalan
  • 1,911
  • 2
  • 12
  • 3
  • There should be a SE site for FFmpeg. Please [follow](http://area51.stackexchange.com/proposals/40292) and verify your email to cast you vote! – Shimmy Weitzhandler Apr 30 '12 at 13:54
  • My similar question got a good answer: http://stackoverflow.com/questions/8727992/ffmpeg-fourcc-avi-codec-support-list – Sugrue May 21 '12 at 16:10

5 Answers5

233

Codecs proper:

ffmpeg -codecs

Formats:

ffmpeg -formats
Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
  • 4
    That would only be a list of formats supported by a specific build/installation of FFmpeg. There are a very wide range of FFmpeg builds in use. – mikerobi Oct 05 '11 at 19:02
  • 27
    Yes, if you're interested in it abstractly, you can consult the source code and broader documentation. However, most people will initially be interested in *their* ffmpeg. – Matthew Flaschen Oct 05 '11 at 22:08
  • 3
    I guess it depends on the intent of the questioner, but I don't consider it abstract. If a client calls and ask me to support the Purple Unicorn Codec 2.718, it wouldn't occur to me to do `ffmpeg -formats`. – mikerobi Oct 05 '11 at 23:24
  • FWIW, the "-codec" option is not available for ffmpeg version SVN-r0.5.10 and (presumably) earlier. – Digger Jan 17 '16 at 05:48
  • 1
    @Matthew Not necessarily... The main reason I am interested to see if a codec is supported is that I already got an "Unsupported codec" message from my ffprobe and want to see if this is due to my local installation.... – ntg Apr 18 '17 at 12:10
158

The formats and codecs supported by your build of ffmpeg can vary due the version, how it was compiled, and if any external libraries, such as libx264, were supported during compilation.

Formats (muxers and demuxers):

List all formats:

ffmpeg -formats

Display options specific to, and information about, a particular muxer:

ffmpeg -h muxer=matroska

Display options specific to, and information about, a particular demuxer:

ffmpeg -h demuxer=gif

Codecs (encoders and decoders):

List all codecs:

ffmpeg -codecs

List all encoders:

ffmpeg -encoders

List all decoders:

ffmpeg -decoders

Display options specific to, and information about, a particular encoder:

ffmpeg -h encoder=mpeg4

Display options specific to, and information about, a particular decoder:

ffmpeg -h decoder=aac

Reading the results

There is a key near the top of the output that describes each letter that precedes the name of the format, encoder, decoder, or codec:

$ ffmpeg -encoders
[…]
Encoders:
 V..... = Video
 A..... = Audio
 S..... = Subtitle
 .F.... = Frame-level multithreading
 ..S... = Slice-level multithreading
 ...X.. = Codec is experimental
 ....B. = Supports draw_horiz_band
 .....D = Supports direct rendering method 1
 ------
[…]
 V.S... mpeg4                MPEG-4 part 2

In this example V.S... indicates that the encoder mpeg4 is a Video encoder and supports Slice-level multithreading.

Also see

What is a codec and how does it differ from a format?

Community
  • 1
  • 1
llogan
  • 121,796
  • 28
  • 232
  • 243
  • Thank you very much llogan for those extra filtering options. Is it possible to further go, and for example ask FFMPEG to list all Encoders/Decoders that are only for Video, or only for Audio? – spaceman May 04 '20 at 15:39
  • 1
    @spaceman You can do that with some additional processing. Example using `grep` on Linux: `ffmpeg -encoders | grep "^ V"` – llogan May 04 '20 at 16:42
  • Is there any way to list codecs available for each format? – Nicke Manarin Jun 17 '21 at 16:01
  • @NickeManarin No, but you can view the default encoders for a muxer, such as with: `ffmpeg -h muxer=webm` – llogan Jun 17 '21 at 17:09
64
ffmpeg -codecs

should give you all the info about the codecs available.

You will see some letters next to the codecs:

Codecs:
 D..... = Decoding supported
 .E.... = Encoding supported
 ..V... = Video codec
 ..A... = Audio codec
 ..S... = Subtitle codec
 ...I.. = Intra frame-only codec
 ....L. = Lossy compression
 .....S = Lossless compression
Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
suja
  • 641
  • 5
  • 2
37

You can see the list of supported codecs in the official documentation:

Supported video codecs

Supported audio codecs

wonea
  • 4,783
  • 17
  • 86
  • 139
0

To list all pixel formats supported:

ffmpeg -pix_fmts list
Rok Benko
  • 14,265
  • 2
  • 24
  • 49