A couple of similar questions are on stackoverflow, but I haven't been able to figure this exact problem out.
I want to get a list of the fourcc
s for the avi codecs that FFMpeg can decode.
I know how to get all the formats ffmpeg -formats
and codecs ffmpeg -codecs
but neither list gives me an accessible list of fourccs
. Neither does the documentation I can find.
I need this list, so that my application can access the fourcc
of an avi
file and determine whether to use ffmpeg
or VfW
(or DirectX
) to try decode the file.
Is there some ffmpeg
command that can give me this list?
It is possible to the mapping via avformat api, without digging in the source code.
The functions
avformat_get_riff_video_tags
,avformat_get_riff_audio_tags
andav_codec_get_id
are all defined in "libavformat/avformat.h".you can also get the mapping for a specific format using the table
AVOutputFormat.codec_tag
orAVInputFormat.codec_tag
I don't know if it's comprehensive but the source code seems to contain a list of FourCCs.
Look at http://ffmpeg.org/doxygen/trunk/isom_8c-source.html
There are lots of lines like this
You should be able to download the latest source and write a script to pick them out.
To extend the answer given above by Darren (and because the comment facility doesn't allow this much text) here is the full list of codecs parsed from the isom_8c-source file on ffmpeg.org: