Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ogg vorbis comment Reader\Writer new project (Read 60924 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ogg vorbis comment Reader\Writer new project

New to the forum so if topic a repeat please forgive me.

I have started a programming project to write a programme that will read and write ogg vorbis comments. The programme will be open source and in the public domain when finished. I am looking at this to have the same programme run on Mac, Linux(32 and 64) and windows(32 and 64)

Noticed on the forum some comments about padding and other subjects. I have two questions.

1. Should padding be included? It does make writing the programme a little easier and does not affect quality and means when writing new comment information there is no need to write the whole file again. The problem is how much padding.

2. After being asked 'What are they singing?' many times would it be good to add a comment 'LYRICS' to hold the Lyrics to the song being played?

If there are several people wanting LYRICS comments in then I will plan to do it.

Remember this comment may not be recognised by some players and may not allways be displayed.

Re: ogg vorbis comment Reader\Writer new project

Reply #1
Ok

vorbis comment reading and writing done including cover art embedded in the ogg file.

Supporting a small ogg player I am programming.

There are however 21 types of image that can be stored.

Image Types
0 - Other
1 - 32x32 pixels 'file icon' (PNG only)
2 - Other file icon
3 - Cover (front)
4 - Cover (back)
5 - Leaflet page
6 - Media (e.g. label side of CD)
7 - Lead artist/lead performer/soloist
8 - Artist/performer
9 - Conductor
10 - Band/Orchestra
11 - Composer
12 - Lyricist/text writer
13 - Recording Location
14 - During recording
15 - During performance
16 - Movie/video screen capture
17 - A bright coloured fish
18 - Illustration
19 - Band/artist logotype
20 - Publisher/Studio logotype

Don't ask me what Bright coloured fish is!

So first a question to all is it worth supporting all these types?

My preferred solution to artwork is to have a separate file for each picture in the same folder as the ogg file.

This can be done relatively simply by adding a tag IMAGELINKS which would contain the filenames of each picture associated with the ogg file. This should not upset any ogg players but can be supported easily.

Would anyone like to see that develop?

collectordave

Re: ogg vorbis comment Reader\Writer new project

Reply #2
The image type is largely information, so your only real overhead for supporting them all is the user interface.  Have you seen the Ogg Vorbis logo?
https://xiph.org/vorbis/

Plenty of players can display images from the same folder, or a different defined folder, as the audio.  That's not reinventing the wheel.  Good players allow the user to decide which image they wish to use by preference.

Re: ogg vorbis comment Reader\Writer new project

Reply #3
Hi

Thanks for the reply.

I have found that the image type is important such as type 3 album art front cover. Media monkey displays that image type by default allthough it does allow you to see the other images.

I am supporting 4 types now and will probably add the rest as I go further down the line.

Be good to get it tested on other players.

collectordave

Re: ogg vorbis comment Reader\Writer new project

Reply #4
Well you need an image type, even if you hard-code them all to 3.  Since you have to set it, it seems like a small step to set it to a sensible value.

Re: ogg vorbis comment Reader\Writer new project

Reply #5
Hi

I allready do set it to the sensible values outlined above. I have also found a small descriptive text embedded in images but in the several hundred ogg files checked so far it is not set.

As all are stored as METADATA_BLOCK_PICTURE the type number is the only way to tell which picture is stored.

I have seen that a lot of ogg files seem to have all pictures set to the same type value though.

I also now store LYRICS with each ogg file.

The oggvorbis logo I now see what the bright coloured fish type is.

I cannot find anything in the xiph spec for storing links to images external to the ogg file so this must be unique to each player.

No problem will add that to the player not the vorbis comment.

Re: ogg vorbis comment Reader\Writer new project

Reply #6
Instead of embedded picture data, a url string can be stored.  This indicates the location of an image file.  It can be a remote or local file.  I haven't seen this used much.  It is supposed to be an absolute url (eg. file://), not relative, which would restrict its usefulness.

The description text field is a standard part of the original FLAC image block, variable length, but again not always used.

 

Re: ogg vorbis comment Reader\Writer new project

Reply #7
Flac uses the same vorbis comment block just a little smaller.

I can easily store a url for an image but cannot find in the specification the comment to store this as standard such as, META_DATA_IMAGE

Does anyone know?

Also looking at mbid and other url's so lookup on web possible. Not sure if other players support these I will provide support for these through a personal music database attached to the player tagger.

CD