id3.rb - ID3 Library for Ruby
by Tilo Sloboda <myfirstname.mylastname @ google_email>
Now On GitHub!
Fork the source code on GitHub: https://github.com/tilo/ID3
Feedback Needed
Currently I would like to get feedback on the interface, classes, methods provided by the ID3-library.
Please send me email and let me know what you think..
Introduction
The aim of this ID3 library for Ruby is to do a full native Ruby
implementation of ID3 version 1.x and version 2.x , without any use of
binary libraries, which other implementations need to have installed
separately. e.g. other implementations just act as a
wrapper around a binary library - I beleive that this is not as
portable as a Ruby library should be.
Another aim of this implementation is to provide the user with a
uniform API, which tries to hide the details of the different ID3 standards,
therefore making it (hopefully) easier to use.
Supported Versions
ID3 v1.0 , v1.1 , v2.2.x , v2.3.x and v2.4.x
ID3 Library Overview
The library provides the Module ID3 , which provides some module methods, as well as three simple classes to the user:
AudioFile, Tag1 and Tag2, to handle files which contain ID3-tags.
The ID3-standards are overloaded with specially coded frames, which are different for each of the binary frames1.This
library does not attempt to fully decode each and every frame type, but
rather deals with the main frame types, such as text and web-frames,
and in case of the binary frames hands the contents of the frames to
the user verbatim. If the user chooses to modify or write any of
those binary frames, the user is expected to know what s/he is doing,
and how to code/de-code the binary contents, otherwise expect:
"garbage in --> crash!" of the application which tries to make
sense of such frames later.. However, if an ID3-tag contains
binary frames, the user can expect that those are handed verbatim to
the user and that it is safe to write them back 'as is' to a
new/modified ID3-tag of the same audio file. In some cases the user may
choose to delete some of the binary frames, that should be possible
without problems.
Downloads
Known Problems
Some ID3v2 frames may appear more than once in an ID3-tag! e.g.
TXXX and WXXX. I haven't come across any actual examples for this,
therefore didn't see the necessity to implement this.
Currently there is no support for this. If you come across such
cases, please let me know..
Documentation
The main id3.rb documentation is here.
I complied a comparison between the different ID3-versions, I hope it's helpful.
Disclaimer / Author's Rant
Please feel free to send me "constructive feedback"
anytime. If you're missing functionality, or you think
something should be done different, please let me know! I'm always open
for suggestions. Thank you!
IMHO the ID3 version2.x standards are pretty pretty messy... they are
bloated and overloaded with useless frame-types and
side-effects... The worst is ID3 v2.4.0! I haven't
seen any actual v2.4.x tags yet, if you have examples, please send them
to me. I suspect that the reason why I didn't find any v2.4.x tags
anywhere is because the "2.4.x standard" is just too complicated, so
nobody is using it.. proove me wrong and email examples to me ;-)
Last not least: Please don't complain about the "quality" of the
ID3-standard to me.. I'm certainly most sympathetic with your pain, but
not the right person to complain to.. ;-)
License
Freely available under the terms of the OpenSource "Artistic License" in combination with the Addendum A (below)
In case you did not get a copy of the license along with the software,
it is also available at:
http://www.unixgods.org/~tilo/artistic-license.html
Addendum A. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR USELESS OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF THE COPYRIGHT HOLDERS OR OTHER PARTY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
_________
1: who came up with all those special frame types? Cheez! KISS! (Keep It Simple, Stupid!)