Simone Margaritelli
Simone Margaritelli

Reputation: 4733

FFmpeg output file format with no extension

I'm developing a system which needs to store videos in the form:

/path/to/video/<md5 of the file>

So I do not have an output extension. I'm using ffmpeg to convert those videos, but it seems that it uses output file extension to determine the output format, so here's my problem.

Due to the fact I don't have an output extension in file names, is there a way to specify the output format directly in the command line without create temporary files or dirty solutions like this ?

Upvotes: 63

Views: 52595

Answers (2)

Tran Chien
Tran Chien

Reputation: 633

Same solution with @luukes answer but please notice that if you're making aac output, the parameter for -f is adts:

ffmpeg -i input.mpg ... -f adts output

To create a file named output in aac format.

Upvotes: 1

luukes
luukes

Reputation: 1540

Use the -f parameter to tell ffmpeg which output-format to use. E.g

ffmpeg -i input.mpg ... -f mp4 output

to create a file named output in mp4 format.

Upvotes: 104

Related Questions