![]() |
Read ID3 tag from a MP3 file
Here's the code to read ID3 tage from a MP3 file
PHP Code:
|
Re: Read ID3 tag from a MP3 file
I am not that expert in PHP but I think this is nice peace of code. but when I run the code with different mp3 files I get the message
MP3 file does not have any ID3 tag! Can you tell me what the ID3 tag is all about and how I can have a file that have ID3 tag. Thanks Shabbir Bhimani |
Re: Read ID3 tag from a MP3 file
After the birth of the MP3 file format, there remained a problem, which was inclusion of textual information i.e. some information about the audio file.At that time a person named Eric Kemp alias NamkraD suggested a fixed-size 128 byte tag inside a MP3 file which would include would include title, artist, album, year, genre and a comment field. And this person himself implemented his idea and people welcomed it with open arms. Not much later Michael Mutschler, extended this tag which is called ID3 tag. He named his version ID3 v1.1. The current version of ID3 is v2.2.
You can read more about ID3 here http://www.id3.org/intro.html Most of the CD ripping softwares include a custom or a default ID3 tag, but just in case your MP3 file does have an ID3 tag there are a plethora of software which will do it for you. The most famous, simple and easily available being Winamp, which has an in-built ID3 editor. In the Winamp playlist window just right-click on the playlist item whose ID3 tag you want edit, and select File Info, and you'll get a dialog box where you can input all the info about the song. Some ID3 editors: http://www.handyarchive.com/Audio/MP...ag-Editor.html http://www.handyarchive.com/Audio/Mu...ag-Editor.html Enjoy, Pradeep. |
Re: Read ID3 tag from a MP3 file
Quote:
Quote:
|
Re: Read ID3 tag from a MP3 file
thank you for the code.
This helped me greatly. However I am now trying to loop through a directory and get the id3 tag of each file in that directory. Here's my code Code:
<HTML>Code:
filename: /private/var/root/Media/iTunes_Control/Music/F00. |
Re: Read ID3 tag from a MP3 file
You are trying to use fseek without opening the file.
|
Re: Read ID3 tag from a MP3 file
shaiss,
Did you get this working? I am trying to do the exact same thing you are. |
Re: Read ID3 tag from a MP3 file
I had run this on Windows, it worked perfectly!
|
Re: Read ID3 tag from a MP3 file
Any idea how to get the length of the audio using your basic code?
|
Re: Read ID3 tag from a MP3 file
You can Get Mp3 Tags without fully downloading the File.WE download file in chunks ,WE extract first and last 64 kb of the file Using ID3 PHP library and CURL.
I have created a function that will do that Download id3 library and include it in your script . PHP Code:
hxxp://designaeon.com/read-mp3-tags-without-downloading-it/ |
| All times are GMT +5.5. The time now is 22:54. |