[FFmpeg-devel] [PATCH] Change libvpx-vpx default to crf=32.

Jan Ekström jeebjp at gmail.com
Thu Aug 29 20:06:57 EEST 2019


On Thu, Aug 29, 2019 at 7:17 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
> Am Do., 29. Aug. 2019 um 18:12 Uhr schrieb Elliott Karpilovsky
> <elliottk-at-google.com at ffmpeg.org>:
> >
> > On Wed, Aug 28, 2019 at 3:11 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> > >
> > > Am Mi., 28. Aug. 2019 um 23:26 Uhr schrieb Elliott Karpilovsky
> > > <elliottk-at-google.com at ffmpeg.org>:
> > > >
> > > > Current default is 200kbps, which produces inconsistent
> > > > results (too high for low-res, too low for hi-res). Use
> > > > CRF instead, which will adapt. Affects vp8/vp9. Also
> > > > have VP8 use a default bitrate of 256kbps.
> > >
> > > Would it simplify the patch if -crf 0 would indicate lossless encoding?
>
> > I do not believe so. I believe that there would be more code changes
> > to switch the checks from ctx->lossless to ctx->crf,
>
> Of course but that wasn't my question.
> I believe it is a horrible bug that x264 uses crf 0 for lossless encoding,
> while libvpx uses another option. If fixing this bug simplifies your
> patch, I believe it is worth the effort.
>

Just for the record, libx264 only does lossless for CRF=0 for 8bit
coding. The quantizer range for CRF was expanded downwards for higher
bit depths since the results were similar for lossy coding. In that
case you either have to poke the right negative value, or set
quantizer to zero - which is the option that works for all bit depths
with libx264.

That said, I do not have heavy objections one way or another regarding
how the libvpx wrapper defines CRF (as I think the definition for VP8
and VP9 is already in general different from what libx264 does - like
bit rate being required for VP8 etc). Just wanted to refresh people's
minds regarding libx264's CRF behavior with lossless coding.

Best regards,
Jan


More information about the ffmpeg-devel mailing list