The Traders' Den  

  The Traders' Den > Where we go to learn ..... > Technobabble
 

Notices

Technobabble Post your general Need for Help questions here.
Lossy or Lossless?
Moderators

Reply
 
Thread Tools
  #1  
Old 2005-12-01, 08:45 AM
liveman's Avatar
liveman liveman is offline
lorsque j'étais quelqu'un
48.43 GB/67.32 GB/1.39
 
Join Date: Dec 2004
Location: Québec, Canada
How to detect Replaygain tag?

I know it's a dumb question but I'd like to know how can I detect that my FLAC files have replaygain tag in it?

I've downloaded a set that I've been told was replaygain tagged but I didn't get the info when, for example, I put the file into winamp and ask for "file info" or into foobar when I click on a specific track for "show info file (special)" or "properties".

I made a test encoding a wav file with "replaygain" option checked on Flac Frontend and this time I have replaygain info for the specific flac file on foobar - "show info file (special)"

I've re-encoded the original replaygain flac to flac and indeed there's a difference: I have same fingerprints / shntool md5 signature / bitcompare results as audio data is indentical but mkwACT md5 signature is different for the two tracks due to the hidden tag...

I guess there's no need for me to rencode the flac for fixing it because when I decode the flac to wav the replaygain info is gone, am I right?
Reply With Quote Reply with Nested Quotes
  #2  
Old 2005-12-02, 10:05 AM
Five's Avatar
Five Five is offline
189.30 GB/594.78 GB/3.14
 
Join Date: Oct 2004
Location: Canada
Re: How to detect Replaygain tag?

there was a discussion about this a month or two back... I don't believe there's any way to view/edit realplaygain tags, they can be added at the time of encoding and that's about it (for the time being). If anybody knows how to view/edit them, I'd love to learn.

the "mkwACT md5 signature" is a simple wholefile md5 hash which can also be generated by many other progs (such as md5summer). This is a "dumb" sum because it is based on the entire file, so when you run one on a FLAC it calculates based on the compressed audio together with its header. So the little bit of information contained in the header for realplaygain (probably 1k) is what's throwing off the verification, whereas with ffp & st5 the hash is generated from the decompressed audio. ffp & st5 are subtlely different but the checksums aside from formatting will be identical for any properly encoded FLAC set. The advantage of st5 over old wholefile md5 is that since it calculates based on the decompressed audio only it will show the same checksums even if you reencode at a different compression setting or even to another lossless format. md5 is sensitive to any change in the compression and/or header and can be useful (as you've found) for detecting changes in the header when all else fails.

hope that makes sense, I'm still on my 1st coffee...
__________________
Checksums Demystified | ask for help in Technobabble

thetradersden.org | ttd recommended free software/freeware webring
shntool tlh eac foobar2000 spek audacity cdwave vlc

Quote:
Originally posted by oxymoron
Here you are in a place of permanent madness, be careful!
Reply With Quote Reply with Nested Quotes
  #3  
Old 2005-12-02, 11:47 AM
DoIFeelLucky's Avatar
DoIFeelLucky DoIFeelLucky is offline
89.39 GB/113.04 GB/1.26
 
Join Date: Mar 2005
Location: Toronto
Re: How to detect Replaygain tag?

foobar2000 allows you to scan files for ReplayGain (album- or track-based), allows you to edit ReplayGain gain and peak values manually (although that's not usually a good idea, especially if you're increasing the values, as it can lead to clipping), and lets you remove all ReplayGain info from files.

Now I just did a test, encoding the same file from WAV to FLAC, using FLAC Frontent 1.7.1. Both files had a padding value of 4096. The first was encoded without the ReplayGain option, and the second was encoded to a different folder using ReplayGain. I copied the ReplayGained file to a third folder. Then, I opened this copy in foobar2000, right-clicked on it, selected Replaygain > Remove replaygain info from files.

File sizes (according to foobar2000's file info dialogue):
FLAC: 25,047,172 Bytes
FLAC w/ReplayGain: 25,047,320 Bytes
FLAC w/ReplayGain info removed: 25,047,320 Bytes

Even after I removed the ReplayGain info from the FLAC file, the tags disappeared but the less-than 150 Bytes taken up by the tags was not removed from the file. Since all three files have different wholefile md5 hashes, I'm assuming that the tiny portion of the file's header that contained the ReplayGain tags has been changed to null data.

BUT WAIT!

Since all the FLAC files that I'd created had 4096 bits of padding (FLAC Frontend's default, since I saw no option to specify padding values), I figured, what if I took my original FLAC file (the one I encoded without using ReplayGain), and used foobar2000's ReplayGain scanner to apply ReplayGain info to it? [To do this, right-click on the file or group of files that you want to ReplayGain, and say Replaygain > Scan per-file track gain or Scan selection as album. The latter is pretty much the only viable option for people dealing with concerts, anyway.]

I tried it, and lo and behold, the file was the same size as the original, even after the ReplayGain tags were added (25,047,172 Bytes). Obviously, foobar2000 wrote the ReplayGain tags into the file's padding (which is what the padding is there for, anyway). Checking that file against the md5 hash that I'd calculated earlier obviously produced a different sum and an error message. I then took this file, and using the aforementioned method, removed the ReplayGain info from the file. I checked the file info: the tags were gone and the file size was still 25,047,172 Bytes. I then checked the file against its original md5 hash. This time, it verified OK!

So, long story short, if you want to add ReplayGain info (or any other tags, such as title, artist, album, tracknumber, etc.) to a FLAC file and be able to later remove that info and have it check out OK against the original wholefile md5, use foobar2000's ReplayGain tool to scan and add the ReplayGain tags. This won't work if the file doesn't contain padding to facilitate the writing of tags, but FLAC encoders (such as the FLAC Frontend and foobar2000's FLAC encoder ) add 4096 bits of padding by default, so unless the person encoding it messed around with FLAC's options for some insane reason, it should work fine.
Reply With Quote Reply with Nested Quotes
  #4  
Old 2005-12-02, 01:55 PM
Five's Avatar
Five Five is offline
189.30 GB/594.78 GB/3.14
 
Join Date: Oct 2004
Location: Canada
Re: How to detect Replaygain tag?

wow that's some detailed information thanks for that

wholefile md5s shouldn't be used with audio shows any longer, .ffp and/or .st5 are pretty much all I ever see anymore (as it should be). with ffp/st5 you can change the header all day (and even the format) so it is preferred.
__________________
Checksums Demystified | ask for help in Technobabble

thetradersden.org | ttd recommended free software/freeware webring
shntool tlh eac foobar2000 spek audacity cdwave vlc

Quote:
Originally posted by oxymoron
Here you are in a place of permanent madness, be careful!
Reply With Quote Reply with Nested Quotes
  #5  
Old 2005-12-05, 11:32 AM
Beleaguered's Avatar
Beleaguered Beleaguered is offline
60.20 GB/167.62 GB/2.78
 
Join Date: Nov 2004
Re: How to detect Replaygain tag?

Nobody likes the command line....

To view all tags (including replaygain):
Code:
metaflac --list --block-type=VORBIS_COMMENT track.flac
To add replaygain tags:
Code:
metaflac --add-replay-gain *.flac
(Note, under Windows you need to replace *.flac with the complete list of all tracks in the album: track01.flac track02.flac track03.flac etc.)

For other commands:
Code:
metaflac --help
metaflac should be included in the the standard flac distribution.
__________________
"If it weren’t for the Buzzcocks, who knows, we might sound like Good Charlotte…oh they’re good, it just sounds like…well, it tastes like a popsicle that’s been stuck up somebody’s ass, but that’s my opinion. Some people are into that, who am I to say? " -Eddie Vedder, Madison Square Garden, August 2003
Reply With Quote Reply with Nested Quotes
  #6  
Old 2005-12-05, 08:50 PM
jcrab66's Avatar
jcrab66 jcrab66 is offline
We all walk the Long Road....
75.63 GB/483.42 GB/6.39
 
Join Date: Nov 2004
Location: Earth
Re: How to detect Replaygain tag?

Quote:
Originally Posted by Five
wow that's some detailed information thanks for that

wholefile md5s shouldn't be used with audio shows any longer, .ffp and/or .st5 are pretty much all I ever see anymore (as it should be). with ffp/st5 you can change the header all day (and even the format) so it is preferred.

what can one use to generate an st5?
__________________
If you want to see a damn good live show check out THIS band.
Reply With Quote Reply with Nested Quotes
  #7  
Old 2005-12-06, 10:06 AM
Beleaguered's Avatar
Beleaguered Beleaguered is offline
60.20 GB/167.62 GB/2.78
 
Join Date: Nov 2004
Re: How to detect Replaygain tag?

Quote:
Originally Posted by jcrab66
what can one use to generate an st5?
Shntool: shntool md5 *.flac
or
Trader's Little Helper
__________________
"If it weren’t for the Buzzcocks, who knows, we might sound like Good Charlotte…oh they’re good, it just sounds like…well, it tastes like a popsicle that’s been stuck up somebody’s ass, but that’s my opinion. Some people are into that, who am I to say? " -Eddie Vedder, Madison Square Garden, August 2003
Reply With Quote Reply with Nested Quotes
Reply

The Traders' Den > Where we go to learn ..... > Technobabble

Similar Threads
Thread Forum Replies Last Post
How to detect transcoded video - juanemma Technobabble 4 2007-08-15 03:40 PM
PC App That Can Detect Sample Rate Prior To Recording? - NoddingTurdFAN Technobabble 0 2006-08-08 09:18 AM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forums


All times are GMT -5. The time now is 01:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - , TheTradersDen.org - All Rights Reserved - Hosted at QuickPacket