Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 563
Simone Margaritelli Avatar asked Mar 26 '12 08:03

Simone Margaritelli


People also ask

What is FFmpeg video format?

ffmpeg is a command-line tool that converts audio or video formats. It can also capture and encode in real-time from various hardware and software sources such as a TV capture card. ffplay is a simple media player utilizing SDL and the FFmpeg libraries.

Does FFmpeg work with mp4?

FFmpeg can input most container formats natively, including MP4, . ts, MOV, AVI, Y4M, MKV, and many others. This is the output file. No switch necessary; just the file name.


1 Answers

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

ffmpeg -i input.mpg ... -f mp4 output.mp4 
like image 159
luukes Avatar answered Nov 04 '22 09:11

luukes