Replay Gain

Got an idea? Missing something? Post your feature request here.

Moderator: moderators

Replay Gain

Postby ScorpionStingz » Sun Nov 05, 2017 12:50 am

Is it even possible to stream and normalize volume? My vorbis files all contain replay gain tags but I don't think they are being read. If at all possible this seems like a reasonable request.
ScorpionStingz
 
Posts: 3
Joined: Sun Nov 05, 2017 12:42 am

Re: Replay Gain

Postby lonesomerider » Fri Dec 15, 2017 3:33 pm

I used transcoding with ffmpeg to achieve this:

Album repleaygain:
convert from: mp3 flac ogg oga aac m4a wav wma aif aiff ape mpc shn
convert to: flac
STEP 1: ffmpeg -loglevel panic -nostats -i %s -map 0:0 -af volume=replaygain=album -f flac -

ffmpeg params depend on the version of ffmpeg you have

the drawback is that you lose skipping inside the track.
/lonesomerider

Image
lonesomerider
 
Posts: 26
Joined: Fri Oct 20, 2017 9:09 am
Location: Switzerland

Re: Replay Gain

Postby dest41 » Wed Feb 21, 2018 3:53 pm

Transcoding for replaygain seems overkill. That metadata should be given to the online player, so that volume is adjusted accordingly. That would change the communication protocol though.
dest41
 
Posts: 10
Joined: Wed Apr 08, 2015 9:10 am

Re: Replay Gain

Postby dest41 » Wed Feb 21, 2018 3:54 pm

And taking replay gain into account is a very useful feature IMHO.
dest41
 
Posts: 10
Joined: Wed Apr 08, 2015 9:10 am

Re: Replay Gain

Postby lonesomerider » Sun Mar 11, 2018 1:23 pm

I agree that it should be part of the player.

But I have the specific issue that I uses Sonos and sonos only supports replaygain "magically" on flac files and ignores it on mp3.
I decided to have separate players with separate logins to switch between album replaygain and track replaygain. Like this I am able to listen to albums with the right loudness for the different tracks and switch to track gain on random play.
Maybe an overkill, but I am a control freak regarding my listening preferences.

using apps like dsub makes this configuration obsolete, but then again they usually only implement track gain or album gain, but not both, which annoys me either on concept albums or on random play, especially when listening with headphones.

I am already too long old style on this matter that I do not wait any more for the new savior to promise me musical heaven. I want my musical paradise now and here. And under my control ;-).
/lonesomerider

Image
lonesomerider
 
Posts: 26
Joined: Fri Oct 20, 2017 9:09 am
Location: Switzerland

Re: Replay Gain

Postby lonesomerider » Sun Mar 11, 2018 1:42 pm

I just realised i did not update the settings i use now (removing the tags to prevent double replaygain being applied):

Album and Track gain to flac:
Code: Select all
ffmpeg -loglevel panic -nostats -i %s -map 0:0 -af volume=replaygain=album -metadata REPLAYGAIN_TRACK_GAIN= -metadata REPLAYGAIN_ALBUM_GAIN= -metadata REPLAYGAIN_TRACK_PEAK= -metadata REPLAYGAIN_ALBUM_PEAK= -f flac -
ffmpeg -loglevel panic -nostats -i %s -map 0:0 -af volume=replaygain=track -metadata REPLAYGAIN_TRACK_GAIN= -metadata REPLAYGAIN_ALBUM_GAIN= -metadata REPLAYGAIN_TRACK_PEAK= -metadata REPLAYGAIN_ALBUM_PEAK= -f flac -


Same to mp3:
Code: Select all
ffmpeg -loglevel panic -nostats -i %s -map 0:0 -af volume=replaygain=album -metadata REPLAYGAIN_TRACK_GAIN= -metadata REPLAYGAIN_ALBUM_GAIN= -metadata REPLAYGAIN_TRACK_PEAK= -metadata REPLAYGAIN_ALBUM_PEAK= -b:a %bk -v 0 -f mp3 -
ffmpeg -loglevel panic -nostats -i %s -map 0:0 -af volume=replaygain=track -metadata REPLAYGAIN_TRACK_GAIN= -metadata REPLAYGAIN_ALBUM_GAIN= -metadata REPLAYGAIN_TRACK_PEAK= -metadata REPLAYGAIN_ALBUM_PEAK= -b:a %bk -v 0 -f mp3 -


And for downsampling to mp3:
Code: Select all
ffmpeg -loglevel panic -nostats -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -


Explanation of the parameters:
Code: Select all
-loglevel panic -nostats
reduce log size to errors only.
Code: Select all
-metadata REPLAYGAIN_TRACK_GAIN= -metadata REPLAYGAIN_ALBUM_GAIN= -metadata REPLAYGAIN_TRACK_PEAK= -metadata REPLAYGAIN_ALBUM_PEAK=
remove replay gain information

The rest are the standard parameters as used by subsonic as default, except the
Code: Select all
-v 0
, which forces best dynamic encoding on mp3
/lonesomerider

Image
lonesomerider
 
Posts: 26
Joined: Fri Oct 20, 2017 9:09 am
Location: Switzerland

Re: Replay Gain

Postby apastuszak » Sat Mar 24, 2018 10:26 pm

AVsub on the iPhone and DSub on Android both support ReplayGain. The Gain tags are sent to the client app. Up to the app if it uses them.
apastuszak
 
Posts: 78
Joined: Tue Oct 29, 2013 4:00 am


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest