#926 closed defect (invalid)
-r ignored, resulting in error "Option framerate not found"
Reported by: | Charles C. | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | y4m |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
This is essentially the same as #403, though that was closed as invalid. This appears to be valid.
I've been using ffmpeg to generate video (various video codecs) from individual frames generated by another program, which is fed to ffmpeg by pipe to stdin in yuv4mpegpipe format, along with a separate audio file. This worked for a long time, with a commandline like this:
ffmpeg -i /path/to/audio.m4a -acodec copy \ -r 25 -f yuv4mpegpipe -i - \ -vcodec flv -vb 250k -qmin 5 -qmax 50 -g 150 \ -y /path/to/output.flv
The yuv4mpeg header that's being generated by the program is this:
YUV4MPEG2 W854 H480 F25:1 Ip A0:0 C420mpeg2 XYSCSS=420MPEG2
With recent versions of ffmpeg built from the git repo (my current version is ffmpeg version N-32933-g9b3df9b [...] built on Sep 25 2011 14:17:40 with gcc 4.4.3
), ffmpeg refuses to start with this same command, exiting with returncode 1 and giving this error:
Option framerate not found.
If I leave off the -r 25
option it appears to work, using the input framerate from the yuv4mpeg header. But shouldn't it let me override that with -r
, say if I wanted the output video to run at 30fps instead of 25?
Change History (6)
comment:1 by , 13 years ago
Keywords: | y4m added |
---|
comment:2 by , 13 years ago
Maybe it didn't used to actually let you set the frame rate -- but it didn't error out.
comment:3 by , 13 years ago
I consider it worse to silently accept options that have no effect than to error out.
Do you disagree?
comment:4 by , 13 years ago
Yes, I suppose so.
But more to the point: can -r
be made to specify the frame rate, overriding the detected rate from the input file? Consider that a feature request.
comment:5 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I suspect you can use -vf setpts to achieve what you want.
See ticket #694.
comment:6 by , 13 years ago
But more to the point: can -r be made to specify the frame rate, overriding the detected rate from the input file?
ffmpeg already works the way you want. You must specify the rate of the output file, not the rate of the input file. You do that by placing the -r 25 after the -vcodec option and before the output filename.
So, I believe the command you should use is:
ffmpeg -f yuv4mpegpipe -i - \
-vcodec flv -vb 250k -r 25 -qmin 5 -qmax 50 -g 150 \
-y outfile.flv
Since you claim that this used to work:
Please add a command line and complete, uncut console output for a version that allowed you to set the framerate.