[FFmpeg-trac] #5759(avcodec:new): libopusenc: make surround masking and LFE optimizations default, optional and independent of mapping family
FFmpeg
trac at avcodec.org
Sun Aug 7 21:23:23 EEST 2016
#5759: libopusenc: make surround masking and LFE optimizations default, optional
and independent of mapping family
-------------------------------------+-------------------------------------
Reporter: Peter.White | Type:
Status: new | enhancement
Component: avcodec | Priority: wish
Keywords: | Version: git-
mapping_family | master
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Summary of the bug:
Currently there is no way, that I know of, to enable surround masking and
LFE optimizations in the libopus encoder, other than enabling
-mapping_family 1. These optimizations result in a significantly lower
bitrate at virtually the same perceptual quality.
How to reproduce:
{{{
% ffmpeg -i surround_input -c:a libopus output
ffmpeg version N-81293-g81fcd91 Copyright (c) 2000-2016 the FFmpeg
developers
}}}
This by default disables above mentioned optimizations, as stated by the
docs for the mapping family option. To enable them one needs to set
mapping family to 1, which does not make much sense for input with less
than 3 channels.
The current release of opusenc
{{{
opusenc --version
opusenc opus-tools 0.1.9 (using libopus 1.1.3)
Copyright (C) 2008-2013 Xiph.Org Foundation
}}}
does enable those optimizations by default, easily observable by encoding
the same input with opusenc:
{{{
opusenc surround_input output
}}}
I have seen differences in bitrate of up to 20% with this. Plus, I have
found no way to even disable them with opusenc. So, if the opus developers
think it safe to enable these settings and not even provide an option to
disable them, I think it should be just as safe for ffmpeg to enable them
and provide an option to disable.
Or, leave the defaults as is and provide an option to enable the
optimizations separately from mapping family. That way one can still
leverage the automatic mapping family setting with -mapping_family -1 but
on top of that enable surround masking and LFE optimizations at will. Of
course that should be a no-op if the number of channels is less than 3.
Or, more precisely:
{{{ffmpeg -i input -lfe_optimizations -surround_masking output.opus}}}
should enable LFE optimizations only if there actually is an LFE channel
and likewise for surround masking.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5759>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list