ffmpeg error: at least one output file must be specified
Solution 1
It should work if you remove -f
from your command line. Try this:
ffmpeg -i mirai.mpg -r 30 -t 2 -ss 0:00 image2_4.png
Solution 2
Output a series of images
This is the correct method:
ffmpeg -i input.mpg output_%03d.png
This will result in a numbered series of images such as:
output_001.png
output_002.png
output_003.png
...
You do not need
-ss
(seek to specific position) if the value is going to be0
.You do not need
-r
unless you wantffmpeg
to duplicate or drop frames to match your desired frame rate (if it differs from the input frame rate).-f image2
is superfluous unless used in a script where the output name uses a variable.
Output a single image
Example to skip 30 seconds and output one image:
ffmpeg -ss 30 -i input -frames:v 1 output.png
See the image file muxer documentation for more info.
Elsa Amri
Updated on June 29, 2022Comments
-
Elsa Amri almost 2 years
I'm trying to input this command to extract a video into frames:
ffmpeg -i mirai.mpg -r 30 -t 2 -ss 0:00 -f image2_4%dpng
But I keep getting this error: "At least one output file must be specified". I'm new to this, any help would be appreciated.
UPDATE
Solved, I removed the -f like you said. Thanks!