Announcement

Collapse
No announcement yet.

Adding ReplayGain tags

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tony T
    replied
    I just use metaflac to add replay gain.
    This script I use will work (FLAC files only) IF you have your files organized by Artist/Album (where each album has its own folder) (not sure how else it could/should be organized)

    This script will walk the directory entered in the FIRST line. My files are in ~/Music/FLAC, so starting there will process all FLAC files.

    If you want to use this, test on one Album (or Artist) first:

    Code:
    #!/bin/bash
    
    StartDir=$HOME/Music/FLAC	# No trailing slash!
    count=0
    
    function walk_tree {
    	local directory="$1"
    	local i
    	for i in "$directory"/*
    	do
    		if [ -d "$i" ]; then 	# Process directory and then walk-down
    		ls "$i/"*.flac | grep -i -q -s ".flac$"	# Does directory contain FLAC files?
    		if [ $? -eq 0 ] ; then
    			echo "Adding replay gain tags to:"
    			for j in "$i/"*.flac
    			do 
    				echo "$j"
    				let count++
    			done	
    			/usr/local/bin/metaflac --preserve-modtime --add-replay-gain "$i/"*.flac
    			echo "$i done!"	# echo directory that we're in
    			echo $count files processed.
    		fi
    		walk_tree "$i"		# DO NOT COMMENT OUT THIS LINE!!
    		else
    			continue		# replace continue with command to process individual file "$i" (i.e. echo "$i")
    		fi
    	done
    }
    
    # Process FLAC files in starting directory
    cd "$StartDir"
    ls *.flac | grep -i -q -s ".flac$"		# Does directory contain FLAC files?
    if [ $? -eq 0 ] ; then
    	echo "Adding replay gain tags to:"
    	for j in *.flac
    	do 
    		echo "$j"
    		let count++
    	done	
    	/usr/local/bin/metaflac --preserve-modtime --add-replay-gain *.flac
    	echo "$StartDir done!"	# echo directory that we're in
    	echo $count files processed.
    fi
    # Now walk down tree in this directory
    walk_tree "$StartDir"

    Leave a comment:


  • d6jg
    replied
    Originally posted by w3wilkes View Post
    Did the bulk file changer and copied the Modified time stamp to the Accessed time stamp, ran foobar2000 to do track gain and then album gain. Looks like I've now got RG for Albums and Tracks with album peaks and track peaks. Looking at the files I see that foobar2000 preserved the Modified time stamp so now the Accessed and Modified timestamps are the same which I don't see as a big deal. Couldn't find any documentation on foobar2000 leaving the Modified timestamps alone! Anyone have any info on that?
    I can’t remember exactly as it was a fair while ago that I did it but I ran Foobar2000 over my entire library to add RG tags in conjunction with Bulk Filechanger and I ended up with the desired result. That said I did it in a few lumps as conveniently I had 3 top level folders.

    I don’t run LMS on Windows but I expose my music files via Samba so it’s effectively the same

    Leave a comment:


  • w3wilkes
    replied
    Did the bulk file changer and copied the Modified time stamp to the Accessed time stamp, ran foobar2000 to do track gain and then album gain. Looks like I've now got RG for Albums and Tracks with album peaks and track peaks. Looking at the files I see that foobar2000 preserved the Modified time stamp so now the Accessed and Modified timestamps are the same which I don't see as a big deal. Couldn't find any documentation on foobar2000 leaving the Modified timestamps alone! Anyone have any info on that?

    Leave a comment:


  • w3wilkes
    replied
    Originally posted by Wirrunna View Post
    You can use BulkFileChanger (https://www.nirsoft.net/utils/bulk_file_changer.html) to save the "modified time" to "accessed time"...
    The "accessed timestamp" has been disabled by default since Vista.
    I know this is an old thread but I thought I'd add this info for anyone else wanting to do replaygain and preserve the modified timestamp.

    Finally getting around to this. I'm on Windows 10 and found that "accessed time" is apparently enabled by default. Found I could disable it manually using an elevated command prompt with the following command;

    fsutil behavior set disablelastaccess 3

    Now for the test folder!

    Leave a comment:


  • Wirrunna
    replied
    Originally posted by w3wilkes View Post
    Do any of these RG tools give the ability to preserve file timestamps like MP3Tag?
    You can use BulkFileChanger (https://www.nirsoft.net/utils/bulk_file_changer.html) to save the "modified time" to "accessed time", then run dbPoweramp or your RG tool of choice, then restore the "modified time" by moving "accessed time" back to "modified time".

    I would test first on one album. I also add 5 seconds to the modified time so that LMS picks it up in a "changed or new" scan.

    The "accessed timestamp" has been disabled by default since Vista - https://blogs.technet.microsoft.com/...s-performance/ - so you won't upset many programs, but as usual, test on a small batch of files first.

    Leave a comment:


  • w3wilkes
    replied
    Do any of these RG tools give the ability to preserve file timestamps like MP3Tag?

    Leave a comment:


  • BJW
    replied
    with winamp, you can write all track AND album RG tags at once, unattended. u just have to set a few options in prefs first, but its very easy and reliable.

    however, it uses the orig RG, not R128. eventually i will redo the tags for R128, but in no rush to do so.

    Leave a comment:


  • garym
    replied
    Originally posted by d6jg View Post
    I my case Foobar2000 is on a W10Pro client machine (i5 with 8GB Ram) and the files are on a NAS - you still don't see any issue ?
    It will take longer with files on NAS, but I see no issue.

    Leave a comment:


  • bakker_be
    replied
    Originally posted by d6jg View Post
    I my case Foobar2000 is on a W10Pro client machine (i5 with 8GB Ram) and the files are on a NAS - you still don't see any issue ?
    None at all, I'm running it on a similar machine.

    Leave a comment:


  • stereoptic
    replied
    I've used the batch converter in dbpoweramp to convert the files to a different directory and after the conversion I replace the old directory with the new.

    Leave a comment:


  • d6jg
    replied
    Originally posted by garym View Post
    Yes, I used it once on 50,000+ tracks, writing album/track RG values to my files.
    Originally posted by bakker_be View Post
    Same here, on 100K+ tracks ...
    I my case Foobar2000 is on a W10Pro client machine (i5 with 8GB Ram) and the files are on a NAS - you still don't see any issue ?

    Leave a comment:


  • bakker_be
    replied
    Originally posted by garym View Post
    Yes, I used it once on 50,000+ tracks, writing album/track RG values to my files.
    Same here, on 100K+ tracks ...

    Leave a comment:


  • garym
    replied
    Originally posted by d6jg View Post
    Thanks
    I guess my next thought is whether Foobar can handle 30000 tracks at one go?
    Yes, I used it once on 50,000+ tracks, writing album/track RG values to my files.

    Leave a comment:


  • Jeff07971
    replied
    Originally posted by d6jg View Post
    Thanks
    I guess my next thought is whether Foobar can handle 30000 tracks at one go?
    Funny you should ask today !
    I was lying in the bath yesterday when I noticed a BIG difference in gain between albums so I set out to find out why. Replaygain was the answer (or rather lack of it)

    I use EZ CD Convertor for ripping to FLAC (and then converting to VBR MP3s for the car)
    I found that EZCD has the ability to scan down directories and then recalculate all replay gains.
    23000 Tracks takes a few hours to recalculate and then a few hours to re save the files (at about 130MB/s)

    EZ CD is not free though (30 Euros for "lifetime" subscription) but there is a 30 Day trial
    I like it a lot and have used it for many years

    Jeff

    Leave a comment:


  • Roland0
    replied
    Originally posted by d6jg View Post
    I am looking for ideas on the best way to add ReplayGain (album & track) tags to a library of 30,000 mostly FLAC & 320kbps MP3 files.
    You may want to have a look at rgain, specifically the collectiongain tool:

    This program is designed to apply Replay Gain to whole music collections, plus the ability to simply add new files, run collectiongain and have it replay-gain those files without asking twice.
    Note: I've never used this, so no idea how well it works...

    Leave a comment:

Working...
X