How would I go about getting a list of all the file extensions supported by FFmpeg for use in an ExtensionFilter used by FileChooser in JavaFX?
I am familiar with the "-codecs" and "-formats" options from FFmpeg, but these list the format and codec names which do not necessarily coincide with their file extensions.
e.g. (partial output from "ffmpeg -formats")
parsing aac and ac3 from the output of ffmpeg would work fine to create file extensions for those types of files, but matroska has ".mkv" file extension.
There's no list directly available. You'll have to run
for input formats, ffmpeg -demuxers
for output formats, ffmpeg -muxers
Then for each entry, run
for input formats, ffmpeg -h demuxer=entry
for output formats, ffmpeg -h muxer=entry
Each format readout will show something like,
Muxer matroska [Matroska]:
Common extensions: mkv.
Mime type: video/x-matroska.
Default video codec: h264.
...
or
Demuxer avi [AVI (Audio Video Interleaved)]:
Common extensions: avi.
...
Then you can collect all extensions from the Common extensions
entries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With