FFmpeg: Select specific decoder

Step-by-Step descriptions of how to do things.

FFmpeg: Select specific decoder

Postby peter_b » Fri Sep 28, 2018 8:39 pm

For some formats, FFmpeg may offer different encoders/decoders to choose from.
For encoding this is quite clear, as one has to specify which codec to use anyway - and therefore already choosing the desired encoder.

When decoding however the syntax for selecting which decoder is used is not that clear:
You specify the "codec" before the input filename.

For example if you want to framemd5 a Jpeg2000 file, you can choose between "libopenjpeg" and FFmpeg's internal/native decoder "jpeg2000":

Decoding using the native decoder:
Code: Select all
$ ffmpeg -c:v jpeg2000 -i INPUT -f framemd5 OUTPUT.framemd5

Using the OpenJPEG library:
Code: Select all
$ ffmpeg -c:v libopenjpeg -i INPUT -f framemd5 OUTPUT.framemd5

In the output, you will see the corresponding decoder actually used:

Stream mapping:
Stream #0:0 -> #0:0 (jpeg2000 (native) -> rawvideo (native))

Stream mapping:
Stream #0:0 -> #0:0 (jpeg2000 (libopenjpeg) -> rawvideo (native))

This is just an example using JPEG2000, but for other formats the principle is the same - only the names are different ;)
  • 0

User avatar
Posts: 302
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Return to HowTo's

Who is online

Users browsing this forum: No registered users and 1 guest

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: Google [Bot] and 11 guests

Reputation System ©'