Forum Moderators: coopster

Message Too Old, No Replies

Reading and Using MP3 Headers

Where to look to find help?

         

mbcx9rvt

3:23 am on Mar 30, 2004 (gmt 0)

10+ Year Member



Evening all,

I'm currently trying to database all of my MP3 samples of my vinyl records for a new site that I am working on. I'm also trying to be clever at the same time - which in turn *should* save me some time.

Can anyone point me in a direction which should lead me to useful information regarding MP3 headers, ID3 tags and the sort and how I would read/use these in PHP.

All help appreciated as I think I'm being a google dumbass :/

TIA,

mbcx9rvt

xeimm

4:43 am on Mar 30, 2004 (gmt 0)

10+ Year Member



up~

nalin

5:03 am on Mar 30, 2004 (gmt 0)

10+ Year Member



Not quite php but perhaps of some help:
mp3info [ibiblio.org] from a unix/linux bash command line (or a windows version with a bolded disclaimer) seems it would fit the bill if you used an exec() or perhaps passthru().
You might want to seach on something like "id3 bash" or "id3 command line" for similar programs, I am sure that there are any number of open source solutions that would work...

mbcx9rvt

5:13 am on Mar 30, 2004 (gmt 0)

10+ Year Member



Ah yeah sorry, I should point out that I am on a Windows platform. I'm having some joy in finding some info on id3 tags, but ideas on how to read and use them evade me still. Thanks for the tip

moltar

5:30 am on Mar 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check out MP3::ID3v1Tag [search.cpan.org] Perl module. Maybe that can help you.

Also just did a simple google search and this is what I got: PHP Class: ID3 Tag Reader [codingtheweb.partners.phpclasses.org]

mbcx9rvt

6:18 am on Mar 30, 2004 (gmt 0)

10+ Year Member



Unfortunately I don't have the option to run perl scripts at the moment. So the first idea is out of the window, sadly. I also came up with that link from google, but you have to sign up for the site, and all the code is in portuguese (along with the comments). I may be being pedantic, but I like to know what I'm doing.

To be honest, I'd rather someone point me in the direction of some useful PHP functions. I am now vaguely aware (after some research) that mp3 ID3 tags are stored as either the first few bytes or the last few bytes of an mp3 file, and combining this with fread() I should be able to do some stuff. Just wondered if there was anyone on here that has done something similar before and could push me in the right direction!

Thanks for the help so far. WebmasterWorld always supplies fast responses! God love it!

mbcx9rvt

moltar

6:23 am on Mar 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't even need to run Perl code. Just look at the code. It's similar to PHP.

mbcx9rvt

6:45 am on Mar 30, 2004 (gmt 0)

10+ Year Member



Well I've come up with this [leknor.com] so far. It seems quite useful - if a little complex. I've had a quick look at that perl module you mentioned, it does have some elements of perl in it, and I genuinely have no clue about perl what-so-ever.

I'm sure I'll crack it once I understand what's going on with the actual ID3 tags themselves. I reckon that's where I'm getting flummoxed.

Once again thanks for the help so far guys :)

mbcx9rvt

mgm_03

5:50 am on Mar 31, 2004 (gmt 0)

10+ Year Member




don't know if this will help...

[id3.org...]

last time i posted a URL, it was edited out..?