#11619(undetermined:new): OPUS downmix volume clipping
#11619: OPUS downmix volume clipping --------------------------------------+---------------------------------- Reporter: Marco | Type: defect Status: new | Priority: normal Component: undetermined | Version: 7.1 Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | --------------------------------------+---------------------------------- (I'm using version 7.1.1, the one shipped with Fedora 42) When downmixing a 5.1 surround track from a film (any film actually) to a stereo 2.0 opus track, the output stereo track seems to be clipping when opened with Tenacity (fork of Audacity). This is the command I used to convert the 5.1 track to 2.0 opus: {{{ ffmpeg -i audio.mka -c:a libopus -b:a 128k -ac 2 audio.opus }}} I also tried the following command: {{{ ffmpeg -i audio.mka -ac 2 audio.wav }}} Comparing the output of both commands in Tenacity, I notice a volume increase in the OPUS track compared to the WAV one, and that makes the volume clip in many parts. Is there something I'm misunderstanding? The outputs should look similar, they are not. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: OPUS downmix volume clipping ---------------------------------+---------------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: undetermined Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------+---------------------------------------- Changes (by Marco): * Attachment "screenshot.webp" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: OPUS downmix volume clipping ---------------------------------+---------------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: undetermined Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------+---------------------------------------- Description changed by Marco: Old description:
(I'm using version 7.1.1, the one shipped with Fedora 42)
When downmixing a 5.1 surround track from a film (any film actually) to a stereo 2.0 opus track, the output stereo track seems to be clipping when opened with Tenacity (fork of Audacity). This is the command I used to convert the 5.1 track to 2.0 opus: {{{ ffmpeg -i audio.mka -c:a libopus -b:a 128k -ac 2 audio.opus }}} I also tried the following command: {{{ ffmpeg -i audio.mka -ac 2 audio.wav }}} Comparing the output of both commands in Tenacity, I notice a volume increase in the OPUS track compared to the WAV one, and that makes the volume clip in many parts. Is there something I'm misunderstanding? The outputs should look similar, they are not.
New description: (I'm using version 7.1.1, the one shipped with Fedora 42) When downmixing a 5.1 surround track from a film (any film actually) to a stereo 2.0 opus track, the output stereo track seems to be clipping when opened with Tenacity (fork of Audacity). This is the command I used to convert the 5.1 track to 2.0 opus: {{{ ffmpeg -i audio.mka -c:a libopus -b:a 128k -ac 2 audio.opus }}} I also tried the following command: {{{ ffmpeg -i audio.mka -ac 2 audio.wav }}} Comparing the output of both commands in Tenacity, I notice a volume increase in the OPUS track compared to the WAV one, and that makes the volume clip in many parts. Is there something I'm misunderstanding? The outputs should look similar, they are not. [[Image(screenshot.webp)]] Upper track is the WAV track, lower is OPUS. -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: "libopus" downmix (5.1 -> 2ch) unintended volume clipping ---------------------------------+----------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+----------------------------------- Changes (by MasterQuestionable): * analyzed: 0 => 1 * cc: MasterQuestionable (added) * component: undetermined => avcodec * summary: OPUS downmix volume clipping => "libopus" downmix (5.1 -> 2ch) unintended volume clipping Comment: ͏ Seems "libopus" handled the downmixing wrong..? ͏ Try feeding the already-downmixed version? ͏ E.g. `ffmpeg -v debug -hide_banner -nostdin -nostats -i "audio.mka" -af "channelmap=DL-FL|DR-FR" -c:a libopus -b:a 128k "audio.opus"` ͏ Related: ͏ https://ffmpeg.org/ffmpeg.html#Audio-Options ͏ https://ffmpeg.org/ffmpeg-filters.html#channelmap ͏ https://superuser.com/questions/852400/properly-downmix-5-1-to- stereo-using-ffmpeg#1410620 \\ ͏ Off-Topic: ͏ WebP (lossy VP8) is not WebP Lossless. ͏ The latter suits the context far better. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: "libopus" downmix (5.1 -> 2ch) unintended volume clipping ---------------------------------+----------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+----------------------------------- Comment (by Marco): Thank you for the reply. Sure, first downmixing to WAV and then converting WAV to OPUS does the job, but I would like to downmix directly to OPUS, and that sounds like an issue since it should give the same output as WAV. Tried your command and it outputs many errors, the first lines of error are: {{{ [Parsed_channelmap_0 @ 0x7f4a000047c0] input channel 'DL' not available from input layout '5.1(side)' [Parsed_channelmap_0 @ 0x7f4a000047c0] input channel 'DR' not available from input layout '5.1(side)' }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: "libopus" downmix (5.1 -> 2ch) unintended volume clipping ---------------------------------+----------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+----------------------------------- Comment (by MasterQuestionable): ͏ Perhaps try other channel descriptions? ͏ Per: ͏ https://superuser.com/questions/852400/properly-downmix-5-1-to- stereo-using-ffmpeg#comment2439568_1410620 ͏ https://superuser.com/questions/852400/properly-downmix-5-1-to- stereo-using-ffmpeg#1663861 ͏ The "channelmap" is just copied from documentation without actual change. ͏ Maybe itself invalid..? ("DL" "DR" be error?) ͏ [ !^ Probably just bad example. ] ͏ See also: https://ffmpeg.org/ffmpeg-utils.html#Channel-Layout ͏ I generally use Mono directly and not bothering these peculiar layouts. ͏ (arrange remix explicitly on need) -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: "libopus" downmix (5.1 -> 2ch) unintended volume clipping ---------------------------------+----------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+----------------------------------- Comment (by Marco): Although am grateful for the tips, I don't want a workaround... I just would like to understand why there are 2 different outputs when using a format compared to another. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11619: "libopus" downmix (5.1 -> 2ch) unintended volume clipping ---------------------------------+----------------------------------- Reporter: Marco | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: 7.1 | Resolution: Keywords: libopus | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ---------------------------------+----------------------------------- Comment (by MasterQuestionable): ͏ FFmpeg tried to use "libopus" 's handling for channel remix. ͏ And "libopus" botched the job. ͏ Some codecs have internal extra conversion capability. ͏ Which FFmpeg may attempt to use. ͏ . ͏ E.g. ͏ "libwebp", when inputting unmatching color format; may warn: ͏ |*| Using libwebp for RGB-to-YUV conversion. You may want to consider passing in YUV instead for lossy encoding. ͏ |*| Using libwebp for YUV-to-RGB conversion. You may want to consider passing in RGB instead for lossless encoding. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11619#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg