1

I have a MPEG-TS file input.mpg (I know, the file name does not look like a MPEG-TS file, but that is the file I received and by ffprobe I know it is a MPEG-TS file).

When I transcode the file by

ffmpeg -i input.mpg output.ps

ffmpeg says it is unable to find a suitable output format. But according to Wikipedia, .ps is a valid file extension for MPEG-PS.

How can I know which extension will be recognized by ffmpeg?

1 Answer 1

3

There's no single list which has all the extensions supported by muxers in ffmpeg. FFmpeg is modular so each muxer registers the extensions it supports. A utility function then traverses through all registered muxers and tries to match their extensions with that of the output filename specified.

At the command line, you can check the extensions registered to a particular muxer:

ffmpeg -h muxer=mpeg

whose output will have a line like the 2nd line here

Muxer mpeg [MPEG-1 Systems / MPEG program stream]:
    Common extensions: mpg,mpeg.
....

Note that extensions by themselves don't signify anything other than provide a basis to select a muxer. If you want a MPEG Program Stream to have the extension ps, then use

ffmpeg -i input.mpg -f mpeg output.ps

This -f option forces the output format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.