Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: ReplayGain on Opus files (Read 2369 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ReplayGain on Opus files

Hi.
Version 1.3.17.
All (?) Opus music files (with RG enabled and having RG info) play on low level. When I try to rescan any of the files for Track RG, it gives a result of +5.00 dB. One more scan will give more or less right value, but decoding sound level is low then.

mp3, FLAC, Musepack files seem to be OK. Only Opus is noticed. Level difference is easy to see on Waveform Minibar (Mod) also.

Re: ReplayGain on Opus files

Reply #1
Version 1.3.15 does the same. I discovered that RG info being not read and Opus files are considered as files without RG info.

Re: ReplayGain on Opus files

Reply #2
Rolled back more, to v. 1.3.14.
The same situation.
Experimentally found out that Preferences : Advanced : Tagging : Opus : Header gain option was "Use Track Gain", switched to "Leave null". The playback is still as without RG info. Good news: scan runs with stable and correct result now. Bad news: Waveform Minibar (Mod) still shows low-level graph.Some more manipulations, and the waveform has normal level now.

UPD: switched back to v. 1.3.17. ReplayGain seems to function OK with Opus now. Remained "Leave null" option for mentioned parameter.
Head-spinning issue related to small preferences option.

Re: ReplayGain on Opus files

Reply #3
Did you use something else than foobar2000 to ReplayGain scan the Opus files? Opus specs forbid the use of old ReplayGain tags as it has its own R128 gain tags. Header gain adjustment is also part of the specifications. Decoders are supposed to always apply the header gain and optionally R128 Gain from tags as an additional adjustment. Since not all players support tag based ReplayGain foobar2000 allows writing the desired RG info to header. That feature is supposed to give ReplayGain with Opus everywhere where the format can be decoded.

That said I get the same ReplayGained loudness with Opus with all header writing options when I use foobar2000 to do the tagging and playback.

Re: ReplayGain on Opus files

Reply #4
Did you use something else than foobar2000 to ReplayGain scan the Opus files?
Nope, the Opus files were coded using foobar2000 including its RG scanner. As much as I can remember, it was all right before the last software update. Several plug-ins were installed/updated too.

Wanting to make another try, I switched to "Use Track Gain" back. And now v.1.3.17 (latest) player behaves without strange.

Guessing: Could it be any preferences corruption?

Quote
Opus specs forbid the use of old ReplayGain tags as it has its own R128 gain tags. Header gain adjustment is also part of the specifications. Decoders are supposed to always apply the header gain and optionally R128 Gain from tags as an additional adjustment. Since not all players support tag based ReplayGain foobar2000 allows writing the desired RG info to header. That feature is supposed to give ReplayGain with Opus everywhere where the format can be decoded.
Thank you for verbose explanation. What do you mean by "old ReplayGain tags"? Are they non-R128-conformed RG tags, which were used in Opus long time ago, but some software may still use them?
Quote
That said I get the same ReplayGained loudness with Opus with all header writing options when I use foobar2000 to do the tagging and playback.
Sorry, it's difficult for me to sense this sentence. Should I leave "Use Track Gain" option checked? =)

When the mentioned bug was acting, foobar2000 failed to get ReplayGain info from Opus files as if they had none:
- playback volume changed when I adjusted "Preamp for files w/o RG info" value but not of "Preamp for files with RG info";
- file properties didn't show any RG info.
But strange result of scanning "+5 dB" on every second time. When I applied the "+5" result, volume level became higher. Now, knowing amplification algorithm, I suppose that header gain-related part of playback code was acting.

Just guessing: Can the bug be related to Media Library somehow? But, I mainly stick to the preferences corruption cause.

Re: ReplayGain on Opus files

Reply #5
Wanting to make another try, I switched to "Use Track Gain" back. And now v.1.3.17 (latest) player behaves without strange.

Guessing: Could it be any preferences corruption?
Curious. If you had a backup of the config from that time it could be verified. Or Peter could read the code to see if it's possible.

What do you mean by "old ReplayGain tags"? Are they non-R128-conformed RG tags, which were used in Opus long time ago, but some software may still use them?
I mean the ReplayGain tags used pretty much everywhere, REPLAYGAIN_TRACK_GAIN and the other three similar tags. They have never been used in Opus by programs that respect Opus specs, foobar2000 for example has not written them there. Opus wants people to use R128_TRACK_GAIN tag.

Quote
That said I get the same ReplayGained loudness with Opus with all header writing options when I use foobar2000 to do the tagging and playback.
Sorry, it's difficult for me to sense this sentence. Should I leave "Use Track Gain" option checked? =)
I meant that I don't experience the problem you described. When I had RG in use and I played three Opus files tagged with the three different header setting they all had identical loudness.

Just guessing: Can the bug be related to Media Library somehow? But, I mainly stick to the preferences corruption cause.
Were your files located on the harddrive of your machine and not on some network storage? Media Library shouldn't affect things but some weird storage that doesn't report file changes perhaps might.

Re: ReplayGain on Opus files

Reply #6
Guessing: Could it be any preferences corruption?
Curious. If you had a backup of the config from that time it could be verified. Or Peter could read the code to see if it's possible.
In my country we have a saying: If to know where you'll fall you could lay out a stacked straw. Meaning I didn't expect to meet such a problem. =)
Guessing that I immediately checked for availability of settings backup. Unfortunately, Autosave plugin is adjusted to keep only two setting backups and they are updating often, thus I don't have interesting configuration.
Guessing more: Autosave plugin itself could produce settings corruption? Last day I had to kill the task once, because I double-clicked some file (OctaMED has "med" extention files, foobar is associated with this type, but cannot open it), but the application hangs/locks in that case (playlist dedicated for double-click enqueues only this "unknown" file alone, and foobar2000 starts to continuously retry playback and does not respond anymore - this is an old exception, some time ago I initiated discussion about related issue).

I meant that I don't experience the problem you described. When I had RG in use and I played three Opus files tagged with the three different header setting they all had identical loudness.
Yes, being curious about this strange situation, I couldn't reproduce it myself later.

Just guessing: Can the bug be related to Media Library somehow? But, I mainly stick to the preferences corruption cause.
Were your files located on the harddrive of your machine and not on some network storage? Media Library shouldn't affect things but some weird storage that doesn't report file changes perhaps might.
All mentioned files placed on a local HDD. Machine was quite heavily loaded (video encoding task), but foobar2000 was successfully restarted several times, because I tried to test previous versions, and all those had the same result. I'm just curious about possibility of such situation caused by Media Library functions.

Spoiler (click to show/hide)

Re: ReplayGain on Opus files

Reply #7
Okay, it happened again.
Opus files (it seems all but from yesterday event, unclear) have low level. RG scan gives strange +5 dB result, peak level shows value around 0.25.
ReplayGain scanner reports that the file already has RG info, but file properties (details tab) does not show any replaygain-related information. But somewhere, despite low-level output and +5 dB RG scan result, fb2k shows RG info in the details tab.
"Edit RG info" command always (as much as I checked) shows Track/Album-mode values.
Any suggestions?

Re: ReplayGain on Opus files

Reply #8
Tried disabling media library - removed all strings from music folder paths. Now Waveform Minibar (Mod) plugin doesn't remember waveforms, but a couple of restarts and the same situation - low Opus level, +5 dB RG scan result. And it's remarkable that every second restart shows the problem, and every other one - does not (everything seems ok then, level is normal, etc.).
Below down here is my components report.
Spoiler (click to show/hide)

Re: ReplayGain on Opus files

Reply #9
Occurrence is not 1 by 1. Sometimes it starts normally, another time gives me a "low-level Opus mode".

Re: ReplayGain on Opus files

Reply #10
Oh god, I just realized what's causing it: VGMStream. I'll disable the .opus extension there and push another release shortly. E: Released, hit your update button or menu item.

Re: ReplayGain on Opus files

Reply #11
Oh god, I just realized what's causing it: VGMStream. I'll disable the .opus extension there and push another release shortly. E: Released, hit your update button or menu item.
I was already thinking about removing all recently installed plugins. Tricky for me that I did several new installations at once with last foobar2000 update, including VGMStream plug-in.
Speaking about last one, why does the plugin care about .opus file type nevertheless this type is well supported by fb2k itself?

Now I've updated plugin, tried to restart app. Seem to be all right and stable.

The question is how can I find out which plugin responds to which file type(s)?
More, I've already met situation when my preference was difficult to establish. As far as I remember, it was fight for NES music file (NSF) between Game Emu Player and NSF input plugin. Sorry, kode54, not in favor of GEP. ;-) There was enough to simply uncheck corresponding file type in plugin options menu. But vgmstream does not have such an option.

Re: ReplayGain on Opus files

Reply #12
Hi, I just started testing Opus with my Logitech Media Server and Squeezeboxes.
It turns out that ReplayGain doesn't work for me either.

LMS reads these tags:
R128_ALBUM_GAIN: 0
R128_TRACK_GAIN: 0
No peak values.

Foobar reads these:
Track Gain: +1.11dB
Track Peak: <NULL>
Album Gain: 1.11dB
Album Peak: <NULL>

VLC reads:
Track Gain: 0
Album Gain: 0

My setup:
LMS 8.1.1 - 1609569900
libopus 1.3, libopusenc 0.2.1
Foobar 2000 1.6.2 (Windows), using Foobar to apply RG to .opus containers

Two side notes:
1. When I apply RG to the original FLAC file before converting to opus, Foobar drops the RG tags completely. Applying RG to the .opus container causes above behavior.
2. dbpoweramp seems to convert, scan and tag RG correctly. At least, the tags appear as expected.

Here is an .opus file that has bad RG, but otherwise seems to play fine on my squeezeboxes:
https://1drv.ms/u/s!AoQI5_3ipPc6pN58xQs5_pwWRsR_3A?e=tWBhDm
(link expires in two weeks)

Happy to help troubleshooting!

 
SimplePortal 1.0.0 RC1 © 2008-2021