[FFmpeg-user] flv encoder ignores the bit rate?

James Darnley james.darnley at gmail.com
Tue Aug 21 18:35:30 CEST 2012

On 2012-08-20 23:41, Makc wrote:
> On Mon, Aug 20, 2012 at 10:21 PM, James Darnley <james.darnley at gmail.com> wrote:
>> Now for the question, why do you want 100M?
> I need to process the video in flash runtime based tool, locally, so I
> prefer quality over size. However, even at these insane rates I get
> shitty output (compared to source video) Google comes up with
> anecdotal evidence to support codec limitation theory: "We spend days
> running tests. I'm pretty sure that is a point with both those codecs
> where increasing the bitrate doesn't make a difference to visual
> quality" http://forums.creativecow.net/thread/190/857637

That reason is fine.  You could also try the following but it is
equivalent to your setting qmin and qmax:
ffmpeg -i INPUT -qscale 1 -qmin 1 -g 1 OUTPUT.flv

As for the poor quality you claim you are getting.  I cannot see any
difference between a test video as input and this high bitrate output
from ffmpeg.  FYI with this video I managed to get 61M out of the encoder.

> Flash runtime also understands f4v video, but when I do ffmpeg -i
> my.mov -sameq -g 1 out.mp4 it does not seem to respect "g 1" setting,
> and that breaks seeking :(

If you do that, you will not get a file that flash understands.  ffmpeg
will use the mpeg4 encoder not h264.  For that you would have to use
libx264.  Anyway, I cannot reproduce your report that ffmpeg is ignoring
-g 1 with either mpeg4 or libx264

Now on to Roger's suggestions.  -crf 0 does nothing because it is an
option only for libx264.  You may attempt lossless encoding with libx264
if you like but I don't think flash can decode it.  Huffyuv is also not
supported.  As for the claim that yuv420p is lossy, that is only true if
the input video does not already have 4:2:0 chroma subsampling.  You can
try yuv422p and libx264 if you like.  I think I have read that flash can
decode it.

More information about the ffmpeg-user mailing list