Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to ensure my FLAC files don't contain ID3 tags? (Read 9623 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to ensure my FLAC files don't contain ID3 tags?

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!

How to ensure my FLAC files don't contain ID3 tags?

Reply #1
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.

How to ensure my FLAC files don't contain ID3 tags?

Reply #2
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.

 

How to ensure my FLAC files don't contain ID3 tags?

Reply #3
Here is how it looks in mentioned MediaInfo when FLAC is tagged properly, with Vorbis comment:




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



As I said before - MCDI is present when file isn't correctly tagged.

How to ensure my FLAC files don't contain ID3 tags?

Reply #4
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.