Hi all, I am trying to append some image to my ogg file but it results to corruption of the file, as there is no real way of including images in the OGG, I just tried to append the image at the end. any suggestions how can I realize this without getting corrupted file? What happens is that the time of the song grows in my player(vlc/winamp) etc... and when I try to edit the tags with my tag editor I got the following error: "corrupted last page header not found" ty in advance and sorry I don't know how this mailing list or email work! I am new to this :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/ogg-dev/attachments/20061022/6d6c8d74/attachment.htm
On Sun, Oct 22, 2006 at 02:49:07AM +0200, A.David David wrote:> Hi all, I am trying to append some image to my ogg file > but it results to corruption of the file, as there is no real way of > including images > in the OGG, I just tried to append the image at the end.Yes, that will look like corruption to any reader. The spec-compliant way to do this is to put the image in a separate ogg stream and multiplex it with the audio. See http://wiki.xiph.org/OggMNG for how to do this with PNG and jpeg images. Unfortunately, vorbisfile based audio player won't play such files. This is a limitation of libvorbis. You can also abuse the comment header for this. Just add a comment like "COVERART=<binary image blob>". The vorbis_commen_*() api discourages this by only letting you pass C strings, so you'd have to manipulate the vorbis_comment struct directly. Finally, if it's just album cover art, you might consider: put each album in a separate directory, with the cover art, etc. as separate files next to the audio. If you're on a unix-like os, then you can use something like the .directory metadata file from the freedesktop.org Desktop Entry Specification to point to the album art and it will show up in some players as well as the file browser. HTH, -r
A.David David wrote:> Hi all, I am trying to append some image to my ogg file > but it results to corruption of the file, as there is no real way of > including images > in the OGG, I just tried to append the image at the end. > > any suggestions how can I realize this without getting corrupted file? > > What happens is that the time of the song grows in my player(vlc/winamp) > etc... > and when I try to edit the tags with my tag editor I got the following > error: > > "corrupted last page header not found" >What's the application? Maybe look at <http://wiki.xiph.org/index.php/OggMNG>. Many players will have difficulty with streams that aren't Vorbis I, but just cat-ing a jpeg onto the end of an audio file seems particularly perverse. (There's no real way of including chickens in lightbulbs either) -- imalone
On Sun, Oct 22, 2006 at 07:15:56AM -0700, Ralph Giles wrote:> On Sun, Oct 22, 2006 at 02:49:07AM +0200, A.David David wrote: > > > Hi all, I am trying to append some image to my ogg file > > but it results to corruption of the file, as there is no real way of > > including images > > in the OGG, I just tried to append the image at the end. > > Yes, that will look like corruption to any reader. > > The spec-compliant way to do this is to put the image in a separate ogg > stream and multiplex it with the audio. See http://wiki.xiph.org/OggMNG > for how to do this with PNG and jpeg images. Unfortunately, vorbisfile > based audio player won't play such files. This is a limitation of > libvorbis.Tahseen Mohammad recently worked on a version of libvorbisfile which could handle such files; that branch is at: http://svn.xiph.org/branches/vorbis-tahseen/ it would be good to see if we can work towards that work being merged into the libvorbis trunk. The first step is to have some more people trying it out in their applications and giving feedback :-) cheers, Conrad.