HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: ar9 on 2012-11-02 05:11:01

Title: How to ensure my FLAC files don't contain ID3 tags?
Post by: ar9 on 2012-11-02 05:11:01
Hi all,

XBMC supports ID3 tags and it seems that they natively favour them over Vorbis comments.
I have a library of FLAC and I want the proper tags to show.  For the most part, there are no ID3 tags, but there are some FLAC files that had them, and this meant it had wrong, or unstandardized tags, which bother me.

What I'm asking is this,
Is there anyway to know if a FLAC file has ID3 tags?
Also, is there anyway to get rid of them automatically?

I'm willing to learn how to script... component, anything, I really want to fix this issue!

Thanks all!
Title: How to ensure my FLAC files don't contain ID3 tags?
Post by: EpicForever on 2012-11-02 06:49:07
There's Windows Explorer utility/shell extension called Media Info - freeware (GPL/LGPL) available at Sourceforge. If you open FLAC file in it you will be able to see it. I used it quite long time ago so I'm not sure right now weather it simply reported ID3 frame or MDCI frame, but as far as I remember it was synonymous for my files, ripped with EAC with adding ID3 enabled while ripping.
Title: How to ensure my FLAC files don't contain ID3 tags?
Post by: nu774 on 2012-11-02 07:33:30
ID3v2 tag is located at the beginning of the file, and starts with a string "ID3". Therefore you can easily check if it exists by just looking at first 3 byte .
If you are using shell, try something like the following:
Code: [Select]
dd if=foo.flac of=/dev/stdout bs=1 count=3 2>/dev/null

It will show first 3 chars of your FLAC file, and it will be either "ID3" or "fLa" or "Ogg".

On the other hand, ID3v1 tag is located at the end of the file, and is of exactly 128 bytes length. ID3v1 starts with a string "TAG". It's not as easy as the ID3v2 case, but you can do something like this:
Code: [Select]
x=$(wc -c foo.flac) # get file size in bytes
position=$((${x%% *} - 128)) # seek position: file size - 128
dd if=foo.flac of=/dev/stdout bs=1 skip=$position count=3 2>/dev/null


As you can see, if you are willing to learn how to write scripts, if will be a trivial task for any scripting languages.
Title: How to ensure my FLAC files don't contain ID3 tags?
Post by: EpicForever on 2012-11-22 13:31:06
Here is how it looks in mentioned MediaInfo when FLAC is tagged properly, with Vorbis comment:

(http://imageshack.us/a/img339/5972/nomcdi.jpg)


And here is how it looks in MediaInfo when  FLAC is tagged with ID3:

(http://imageshack.us/a/img696/9871/mcdi.jpg)

As I said before - MCDI is present when file isn't correctly tagged.
Title: How to ensure my FLAC files don't contain ID3 tags?
Post by: EpicForever on 2012-11-22 14:40:48
I forgot to add that MediaInfo has also precompiled versions for Linux as well as source code available that let's you compile it on your own.
Title: How to ensure my FLAC files don't contain ID3 tags?
Post by: Porcus on 2012-11-22 19:04:50
Old thread: http://www.hydrogenaudio.org/forums/index....showtopic=79525 (http://www.hydrogenaudio.org/forums/index.php?showtopic=79525)