[Ffmpeg-devel] Bug in libavcodec/x264.c?

Robert Swain robert.swain
Thu Feb 2 13:33:55 CET 2006


Hello,

On 2/2/06, Luca Abeni <lucabe72 at email.it> wrote:
> Hi M?ns,
>
> On Thu, 2006-02-02 at 11:41 +0000, M?ns Rullg?rd wrote:
> > For the rate control to work properly you should not restrict the quantizer
> > range.
> In fact, the idea was to set qmin at the minimum possible value and qmax
> at the maximum possible value :)
>
> >   On the other hand, you really don't want to use values higher than
> > 31 anyway, so if the rate control fails with that limit you should use a
> > higher bitrate.
> Well, the problem is that I am trying to stream the video across a
> network with a limited bandwidth...
> With MPEG4, using -mbd 2 I can obtain a decent quality while remaining
> under my bandwidth constraints. I tried h264 (using libavcodec's
> x264.c), and the quality is much better... But the bandwidth constraints
> are not respected (because of all the VBV underflows) and a lot of
> packets are dropped by the network. So, when streaming MPEG4 is
> acceptable, and x264 is not.
>
> Anyway, if I understand you correctly changing the q mapping in x264.c
> does not make too much sense, and I will have to explicitly set qmax=51
> when using x264, right?

Yes. The problem arises from reusing variable names and not being able
to independently set defaults for each codec. This is on my todo list
but unless I remain unemployed after I graduate I probably won't get
round to 'fixing' it. :/ I recommend you read up on x264/h.264 and set
all options explicitly because the default values are not very good
for h.264. If you go into #x264 on irc.freenode.net you will probably
be able to obtain some assistance. (I will be there later but my
knowledge of streaming/VBV is minimal.)

> BTW: I am trying to encode 352x288 video captured from a tv card... Does
> anyone have suggestions about proper codec values for MPEG4 and for
> x264? I hope to be able to encode at 400kbps (with the current default
> settings, x264 is generally not able able to encode 252x288 at less than
> 600kbps), with peaks of 500kbps.

This will no doubt be possible.

>
>                         Thanks,
>                                 Luca

Regards,
Rob





More information about the ffmpeg-devel mailing list