PDA

View Full Version : MP3 sort order tagging



2004-01-26, 18:24
> Are you looking for a Windows GUI to do this or a
> program command-line to do so?

I would be happy with either. I generally rip and tag my MP3 files on a Windows machine, but my slimserver runs on a Linux box. So either Windows or Linux would be fine.

Victor Brilon
2004-01-26, 18:39
If I understand the id3v2 spec properly, all the Txxx tags are simply
user defined text frames. So something like this *should* work:


#!/usr/bin/perl -w
use MP3::Tag;
my $mp3 = MP3::Tag->new("my.mp3");
$mp3->get_tags;
my $id3v2 = $mp3->{ID3v2} || die "No id3 for $_\n";
$id3v2->add_frame('TSOA','Some Description',"Yout text for tag");
$id3v2->add_frame('TSOP','Some Description',"Your text for tag");
$id3v2->add_frame('TSOT','Some Description',"Your text for tag");
$id3v2->write_tag() || die "Can't write tag: $!\n";
$mp3->close;

I don't know what actually belongs as the value in that tag, but that
code should allow you to put whatever you need in the frame.

Victor

trmp3 (AT) hoghill (DOT) net wrote:
>>Are you looking for a Windows GUI to do this or a
>>program command-line to do so?
>
>
> I would be happy with either. I generally rip and tag my MP3 files on a Windows machine, but my slimserver runs on a Linux box. So either Windows or Linux would be fine.
>

Scott Haug
2004-01-26, 19:52
Monday, January 26, 2004, 5:39:12 PM, Victor wrote:

VB> If I understand the id3v2 spec properly, all the Txxx tags are simply
VB> user defined text frames. So something like this *should* work:

VB> #!/usr/bin/perl -w
VB> use MP3::Tag;
VB> my $mp3 = MP3::Tag->new("my.mp3");
VB> $mp3->get_tags;
VB> my $id3v2 = $mp3->{ID3v2} || die "No id3 for $_\n";
VB> $id3v2->add_frame('TSOA','Some Description',"Yout text for tag");
VB> $id3v2->add_frame('TSOP','Some Description',"Your text for tag");
VB> $id3v2->add_frame('TSOT','Some Description',"Your text for tag");
VB> $id3v2->write_tag() || die "Can't write tag: $!\n";
VB> $mp3->close;

Actually, all T*** frames /except/ TXXX are "well-defined." Only the
TXXX frame itself is user-defined. TXXX supports exactly two text
strings: a description and a value. All other text frames support 1
or more strings that are the value(s) for that specific text frame.
Some frames it only makes sense to have a single string (such as TSOA,
TSOP, and TSOT). Thus, the 'description' parameter to the add_frame is
superfluous at best.

That said, TSOA, TSOP, and TSOT are valid frames in id3v2.4, but not
in id3v2.3. And according to http://tagged.sourceforge.net/, MP3::Tag
does not support id3v2.4 tags. So even if you could add such frames to
an id3v2.3 tag with MP3::Tag, it's unlikely you could expect any
application to actually support them.

-Scott

Victor Brilon
2004-01-26, 20:32
Scott Haug wrote:
> That said, TSOA, TSOP, and TSOT are valid frames in id3v2.4, but not
> in id3v2.3. And according to http://tagged.sourceforge.net/, MP3::Tag
> does not support id3v2.4 tags. So even if you could add such frames to
> an id3v2.3 tag with MP3::Tag, it's unlikely you could expect any
> application to actually support them.

Ah! Very interesting. Thanks for the clarification. I hadn't noticed
that those tags required v2.4.

Victor

michael
2004-01-26, 21:22
Scott Haug <scott (AT) houseofhaug (DOT) net> writes:
....
> That said, TSOA, TSOP, and TSOT are valid frames in id3v2.4, but not
> in id3v2.3. And according to http://tagged.sourceforge.net/, MP3::Tag
> does not support id3v2.4 tags. So even if you could add such frames to
> an id3v2.3 tag with MP3::Tag, it's unlikely you could expect any
> application to actually support them.

wow. I knew that support for 2.4 was still minimal (in randomly
selected applications) but I sure thought that slimserver was one of
the few things that did support them. When I went back to double check
just before writing this, I find that MP3::Info (and other parts of
slimserver) contain a lot of code towards reading 2.4 tags, but when
it really comes down to it, 2.4 tags are ignored. I suppose that
explains why TSOP tags are ignored in slimserver as well.

The silly part is that 2.3 and 2.4 tags are very similar. (compared to
the difference between 2.2 and 2.3 for example.) Adding support for
2.4 to a system that already supports 2.3 should be simple. (I haven't
actually tried doing this, but from reading the specs it seems like
supporting 2.3 means you already have 98% of what you'll need for
2.4.)

sigh...

-michael
--
"Do not meddle in the affairs of sysadmins,
for they are subtle and have the root password."

dean
2004-01-27, 09:16
SlimServer does support ID3v2.4, including the TSOP tag.

Do you have a specific file that's not working?

On Jan 26, 2004, at 8:22 PM, michael wrote:

> Scott Haug <scott (AT) houseofhaug (DOT) net> writes:
> ...
>> That said, TSOA, TSOP, and TSOT are valid frames in id3v2.4, but not
>> in id3v2.3. And according to http://tagged.sourceforge.net/, MP3::Tag
>> does not support id3v2.4 tags. So even if you could add such frames to
>> an id3v2.3 tag with MP3::Tag, it's unlikely you could expect any
>> application to actually support them.
>
> wow. I knew that support for 2.4 was still minimal (in randomly
> selected applications) but I sure thought that slimserver was one of
> the few things that did support them. When I went back to double check
> just before writing this, I find that MP3::Info (and other parts of
> slimserver) contain a lot of code towards reading 2.4 tags, but when
> it really comes down to it, 2.4 tags are ignored. I suppose that
> explains why TSOP tags are ignored in slimserver as well.
>
> The silly part is that 2.3 and 2.4 tags are very similar. (compared to
> the difference between 2.2 and 2.3 for example.) Adding support for
> 2.4 to a system that already supports 2.3 should be simple. (I haven't
> actually tried doing this, but from reading the specs it seems like
> supporting 2.3 means you already have 98% of what you'll need for
> 2.4.)
>
> sigh...
>
> -michael
> --
> "Do not meddle in the affairs of sysadmins,
> for they are subtle and have the root password."
>
>

michael
2004-01-27, 12:50
dean blackketter <dean (AT) slimdevices (DOT) com> writes:
> SlimServer does support ID3v2.4, including the TSOP tag.
>
> Do you have a specific file that's not working?

oh, it seems that I have 13,521 of them.

If I set the v1 tag to something obviously different than the v2.4 tag
on any of them, it becomes immediately apparent that the v2.4 tag is
being ignored.

Playing with MP3::Info by hand confirms that it's not returning
anything useful from v2.4 tags but works fine with a v2.3 tagged track
I was able to dig up.

Digging into MP3::Info a bit further, it seems there is not logic that
explicitly ignores v2.4 tags, but there are some changes that need to
be made here and there for it to work. Unless this bit of code is far
more crafty than I can grok (entirely possible) I'm seeing some rather
glaring errors in some parts of the code that just happen to cancel
each other out just often enough for it to appear that it works in
most cases. Some of which lead me to believe that it may not be an
issue of version number so much as pieces of the extended header that
are confusing it.

Anyway, give me a couple of days and I'll have a better analysis, and
possibly even some patch bits.
Meanwhile, if anyone is familiar with this piece of the code and wants
to discuss what's going on here, please don't hesitate to speak up.

Thanks,

-michael
--
"I can't give you brains, but I can give you a diploma."
-The Wizard of OZ

dean
2004-01-27, 14:13
Can you send me one of the files in question so I can test here?

-dean

On Jan 27, 2004, at 11:50 AM, michael wrote:

> dean blackketter <dean (AT) slimdevices (DOT) com> writes:
>> SlimServer does support ID3v2.4, including the TSOP tag.
>>
>> Do you have a specific file that's not working?
>
> oh, it seems that I have 13,521 of them.
>
> If I set the v1 tag to something obviously different than the v2.4 tag
> on any of them, it becomes immediately apparent that the v2.4 tag is
> being ignored.
>
> Playing with MP3::Info by hand confirms that it's not returning
> anything useful from v2.4 tags but works fine with a v2.3 tagged track
> I was able to dig up.
>
> Digging into MP3::Info a bit further, it seems there is not logic that
> explicitly ignores v2.4 tags, but there are some changes that need to
> be made here and there for it to work. Unless this bit of code is far
> more crafty than I can grok (entirely possible) I'm seeing some rather
> glaring errors in some parts of the code that just happen to cancel
> each other out just often enough for it to appear that it works in
> most cases. Some of which lead me to believe that it may not be an
> issue of version number so much as pieces of the extended header that
> are confusing it.
>
> Anyway, give me a couple of days and I'll have a better analysis, and
> possibly even some patch bits.
> Meanwhile, if anyone is familiar with this piece of the code and wants
> to discuss what's going on here, please don't hesitate to speak up.
>
> Thanks,
>
> -michael
> --
> "I can't give you brains, but I can give you a diploma."
> -The Wizard of OZ
>
>
>