leosongwei / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
0 stars 0 forks source link

write vorbiscomments (flac/ogg) in a human-readable style #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, mutagen writes the tags to flac and ogg files in an unspecified
order. If there are more than about three tags, it is increasingly
difficult for the human eye to vgrep them.

$ metaflac --extract-tags-to=- 03*flac
replaygain_reference_loudness=89.0 dB
genre=Jazz
composer=Cecil Taylor
performer:drums=Andrew Cyrille
tracknumber=3/5
album=Unit Structures
replaygain_album_gain=-1.22 dB
title=Enter, Evening
version=alternate take
artistsort=Taylor
performer:bass clarinet=Ken McIntyre
replaygain_album_peak=0.93322754
performer:alto saxophone=Jimmy Lyons
performer:alto saxophone=Ken McIntyre
date=1966
performer:double bass=Henry Grimes
performer:double bass=Alan Silva
performer:trumpet=Eddie Gale Stevens, Jr.
performer:oboe=Ken McIntyre
performer:piano=Cecil Taylor
artist=Cecil Taylor
replaygain_track_peak=0.71014404
performer:bells=Cecil Taylor
replaygain_track_gain=-0.81 dB

[Can you quickly see whether there's an ARTISTSORT tag in there or not?]

Note that some simple players display the tags in that exact order:
$ ogg123 test.ogg

Audio Device:   Advanced Linux Sound Architecture (ALSA) output

Playing: test.ogg
Ogg Vorbis stream: 2 channel, 44100 Hz
Replaygain_reference_loudness: 89.0 dB
Genre: Jazz
Composer: Cecil Taylor
Performer:drums: Andrew Cyrille
Track number: 3/5
Album: Unit Structures
<snip>
ReplayGain (Track): -0.81 dB
Time: 00:05,40 [10:06,27] of 10:11,67  (110,6 kbps)  Output Buffer  66,7%

Good luck in finding the track title from that.

I propose two things to improve the situation:
1) Write the tag part in uppercase. "ALBUM=Unit Structures" gives a better
visual distinction as to where the tag ends and value begins. It is
probably better to leave the "role" part in "PERFORMER:ROLE" lowercase.
2) Sort the tags, with the "important" tags (TITLE, ARTIST, ALBUM) being
first, the programmatic tags (REPLAYGAIN_*) being last, the rest alphabetically

Original issue reported on code.google.com by hha...@gmail.com on 6 Jan 2010 at 10:50

GoogleCodeExporter commented 9 years ago
TAGS THAT SHOUT AT YOU ARE CRAP AND WON'T BE CONSIDERED.

Mutagen exposes a list-like interface to VComments as well as the dict-like
interface. If you want a particular order, use the list-like interface. I might 
be
persuaded to do a straight ASCII value sort of the key names, but trying to 
figure
out "important" tags and "programmatic tags" leads to madness.

Original comment by joe.wreschnig@gmail.com on 6 Jan 2010 at 4:41

GoogleCodeExporter commented 9 years ago
I am not using mutagen to read the tags. I am using other programs to read the 
tags.
Mutagen writes them in an odd order. It certainly seems more beneficial to fix
mutagen than twenty other programs, many of which are simply enumerating the 
tags in
the order stored in the file.

Original comment by hha...@gmail.com on 6 Jan 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Then use Mutagen to write the tags in the order you want.

Original comment by joe.wreschnig@gmail.com on 7 Jan 2010 at 4:27

GoogleCodeExporter commented 9 years ago
Mind you, I am not asking for mutagen to return or display the tags as 
uppercase --
just that it stores the tags in uppercase (in the binary file). All the 
programs and
documentation I've seen *do* write them in uppercase. Why diverge?

Original comment by hha...@gmail.com on 7 Jan 2010 at 6:42

GoogleCodeExporter commented 9 years ago
I'M NOT SURE WHY OTHER PROGRAMS DO THAT. IT SEEMS STUPID. LOWERCASE LATIN 
CHARACTERS
ARE EASIER TO READ BECAUSE THE EYE CAN DIFFERENTIATE THEM FASTER. LOWERCASE 
ALSO HAS
LESS OFFENSIVE CONNOTATIONS ON THE REST OF THE INTERNET. FINALLY, IF WE ARE 
GOING TO
DISPLAY THEM IN LOWERCASE, WHY NORMALIZE THEM TO UPPERCASE?

Original comment by joe.wreschnig@gmail.com on 7 Jan 2010 at 10:47

GoogleCodeExporter commented 9 years ago
Fine. I should've known you were an arse from your first comment, and not 
bothered.

Original comment by hha...@gmail.com on 8 Jan 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Joe W. wie er singt und lacht.

Original comment by patchcla...@gmail.com on 13 Apr 2010 at 8:19

GoogleCodeExporter commented 9 years ago
Wow.

Original comment by mats.pet...@gmail.com on 29 May 2013 at 7:34

GoogleCodeExporter commented 9 years ago
The major problem is that the tags will be *stored* in lowercase as well. The 
"standard" way is to use uppercase for the field names in Vorbis comments.

Original comment by mats.pet...@gmail.com on 29 May 2013 at 7:40