i doent seem that getid3 likes ogg-vorbis very much. or rather ogg-vorbis doesnt like id3v1. this
the "update metadata" feature is nice. i refer to the fact that the
audio module will take metadata such as title and author from the node publising form and write
it to the .mp3s metadata. is there a way to get this to
work with ogg-vorbis, maybe using vorbiscomment?

CommentFileSizeAuthor
#9 audio_ogg.patch3.12 KBmfb
#3 audio.ogg_.patch2.99 KBmfb

Comments

drewish’s picture

Version: 4.7.x-1.x-dev » 5.x-0.1

does vorbis work with id3v2? if you'd like to do some research into it, we're using the getid3 library. i know that they've got ogg support but don't know how to get it to "play nice" with mp3 and ogg.

mfb’s picture

ogg vorbis has arbitrary comment fields which can be used for metadata:
http://www.xiph.org/vorbis/doc/v-comment.html
getid3 can read and write the comments so it should be straightforward..
http://getid3.org/source/module.audio.ogg.phps
http://getid3.org/source/write.vorbiscomment.phps
It should be straightforward to support ogg vorbis, flac and speex all in one patch..

mfb’s picture

StatusFileSize
new2.99 KB

Here's a patch to support ogg files by default.

Note, vorbiscomment binary (part of the vorbis-tools package) may be required by getid3 to actually get this working.

Note, when I click to "play" the audio file in my browser (running ubuntu with flash installed), my browser crashes.

mfb’s picture

Version: 5.x-0.1 » 5.x-1.x-dev
Status: Active » Needs review

Attempting to play an mp3 also causes my browser to crash :(
So, i'd say this code is ready for review.

drewish’s picture

mfb are you using the flash player?

mfb’s picture

I'm having general issues with flash and XSPF players. But whatever issue that is, isn't related to this ogg vorbis feature request..

drewish’s picture

yeah totally, i was just going to comment that flash 9 is still hella unstable, that and as far as i know flash won't play ogg files.

drewish’s picture

Status: Needs review » Needs work

i'm not sure i like the assignment of tagformats inside audio_write_id3tags(), it might be better to have some code in _audio_getid3_save_to_file() that selects the tagformats based on the extension... or, i wonder if getid3 is smart enough to select the formats based on the file type... need to look into that.

mfb’s picture

Status: Needs work » Needs review
StatusFileSize
new3.12 KB

For some reason getid3 tries to write all the requested tagformats, and spits out errors if any of them don't apply.

I moved the logic into _audio_getid3_save_to_file.

drewish’s picture

marked http://drupal.org/node/120595 as a duplicate

mfb’s picture

What do you think about this patch.. too inelegant?

drewish’s picture

Status: Needs review » Fixed

sorry, it'd totally fell off my radar. the thing i noticed while looking at your patch is that audio_write_id3tags() is never called with a value for the $pics parameter, meaning that the images are never written back to the file. i'll go ahead and commit this now and open a new issue for the image saving.

Anonymous’s picture

Status: Fixed » Closed (fixed)