[Bug 753275] Opus: playback gain always relative to EBU R128 level (-23db LUFS), must be played 5db louder to match ReplayGain level (-18db LUFS) when using ReplayGain

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed May 3 09:43:49 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=753275

--- Comment #16 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> ---
There were two additional things:

- opusparse is nuking the header gain, which was showing up as 0. This was
introduced by 51edbeb9d94b2a85b303097759af7cf35a344cb5, and this patch fixes it
(though probably breaks what slomo changed):

diff --git a/ext/opus/gstopusparse.c b/ext/opus/gstopusparse.c
index 56e8bb8..41007b3 100644
--- a/ext/opus/gstopusparse.c
+++ b/ext/opus/gstopusparse.c
@@ -366,7 +366,7 @@ gst_opus_parse_parse_frame (GstBaseParse * base,
GstBaseParseFrame * frame)
     }

     if (!(frame->flags & GST_BASE_PARSE_FRAME_FLAG_QUEUE)) {
-      if (FALSE && parse->id_header && parse->comment_header) {
+      if (/*FALSE &&*/ parse->id_header && parse->comment_header) {
         guint16 pre_skip;

         gst_buffer_map (parse->id_header, &map, GST_MAP_READWRITE);

This causes the header to be parsed again, and thus use the real gain from the
header, instead of assuming 0.

- since there is no peak specified, rgvolume will assume 1.0, and refuse to
increase volume past what it sees as potentially clipping. If I add
headroom=200 to get rid of that check, volume with the sample you gave does
increase by the 5 dB (or at least the Vorbis and Opus versions sound similar in
loudness to me).

slomo: ideally, I reckon we should parse the id_header (if we have one) in the
else branch (the one that's always taken currently) and use preskip (which
AFAICT is always 0 now) and gain (and possibly other fields) when creating the
new id header (since I don't really know why it's now re-created if we have
one).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list