Hi, I have recently implemented encoding/decoding to/from OggVorbis in my app, with the code being based upon the Libvorbisenc sample code supplied with the SDK. It all works very well indeed (encoding from a PCM file, then playback), except that no matter the length of the source PCM file, the last (approx) 4 seconds of audio is always missing from the Ogg file. I am trying to find some documentation that details some of the functions used (e.g. vorbis_analysis(), vorbis_bitrate_addblock(), vorbis_bitrate_flushpacket(), ogg_stream_packetin() etc.) as I am sure its just some sort of flushing problem, but I'm not having much luck. So does anyone know the cause of my problem, or where I can find some documentation. <p>Thnx, Dave <p>The information contained in this email and any subsequent correspondence is private and intended solely for the intended recipient(s). For those other than the recipient any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on such information is prohibited and may be unlawful. <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> It all works very well indeed (encoding from a PCM file, then playback), > except that no matter the length of the source PCM file, the last (approx) 4 > seconds of audio is always missing from the Ogg file. > > I am trying to find some documentation that details some of the functions > used (e.g. vorbis_analysis(), vorbis_bitrate_addblock(), > vorbis_bitrate_flushpacket(), ogg_stream_packetin() etc.) as I am sure its > just some sort of flushing problem, but I'm not having much luck.Are you flushing the last page? Does the example code work as is, or is is it also broken? Can you paste your code? jack. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Jack, The problem is I don't really know how to flush the last page. Calling ogg_stream_flush at the end seemed to be the logical thing to do but made no difference, neither did calling vorbis_bitrate_flushpacket. I haven't tested the example code yet, but my code virtually identical anyway (certainly in structure). <p><p>-----Original Message----- From: Jack Moffitt [mailto:jack@xiph.org] Sent: 20 May 2004 18:11 To: 'vorbis-dev@xiph.org' Subject: Re: [vorbis-dev] Encoding questions <p>> It all works very well indeed (encoding from a PCM file, then playback),> except that no matter the length of the source PCM file, the last (approx)4> seconds of audio is always missing from the Ogg file. > > I am trying to find some documentation that details some of the functions > used (e.g. vorbis_analysis(), vorbis_bitrate_addblock(), > vorbis_bitrate_flushpacket(), ogg_stream_packetin() etc.) as I am sure its > just some sort of flushing problem, but I'm not having much luck.Are you flushing the last page? Does the example code work as is, or is is it also broken? Can you paste your code? jack. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered. <p>The information contained in this email and any subsequent correspondence is private and intended solely for the intended recipient(s). For those other than the recipient any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on such information is prohibited and may be unlawful. <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Bravo! That's exactly what it was, many thanks. One other question - which Windows OS's are Libvorbisfile and Libvorbisenc compatible with? In particular, are they compatible with NT? <p>-----Original Message----- From: Ralph Giles [mailto:giles@xiph.org] Sent: 20 May 2004 19:16 To: vorbis-dev@xiph.org Subject: Re: [vorbis-dev] Encoding questions <p>On Thu, May 20, 2004 at 06:24:33PM +0100, David Hailey wrote:> The problem is I don't really know how to flush the last page. Calling > ogg_stream_flush at the end seemed to be the logical thing to do but madeno> difference, neither did calling vorbis_bitrate_flushpacket.Could it be that you're not remembering to call vorbis_analysis_wrote(&vd,0) at the end? Sending a '0' tells the encoder there's no more data and it should finalize. -r --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered. <p>The information contained in this email and any subsequent correspondence is private and intended solely for the intended recipient(s). For those other than the recipient any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on such information is prohibited and may be unlawful. <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.