IPB

Welcome Guest ( Log In | Register )

How to ensure my FLAC files don't contain ID3 tags?
ar9
post Nov 2 2012, 06:11
Post #1





Group: Members
Posts: 1
Joined: 2-November 12
Member No.: 104261



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! biggrin.gif
Go to the top of the page
+Quote Post
 
Start new topic
Replies
nu774
post Nov 2 2012, 08:33
Post #2





Group: Developer
Posts: 562
Joined: 22-November 10
From: Japan
Member No.: 85902



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
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
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.
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th December 2014 - 05:04