Reputation: 31738
I am looking to strip all metadata (tags) out of an mp3 byte[]
to leave just the audio data.
Upvotes: 0
Views: 691
Reputation: 31738
Doing more Googling, I found this snippet:
// Get the ID3 tag size and flags; see 3.1
int tagsize = (headerbuf[9] & 0xFF) | ((headerbuf[8] & 0xFF) << 7 ) | ((headerbuf[7] & 0xFF) << 14 ) | ((headerbuf[6] & 0xFF) << 21 ) + 10;
boolean has_extended_hdr = (headerbuf[5] & 0x40) != 0 ? true : false;
// Read the extended header length and skip it
if ( has_extended_hdr )
{
int headersize = file.read() << 21 | file.read() << 14 | file.read() << 7 | file.read();
file.skipBytes( headersize - 4 );
}
source: http://www.ulduzsoft.com/2012/07/parsing-id3v2-tags-in-the-mp3-files/
Upvotes: 0
Reputation: 13579
Try looking at the following libraries maybe it will help you
http://www.novell.com/products/linuxpackages/opensuse11.1/taglib-sharp.html
https://github.com/mono/taglib-sharp
Upvotes: 1