[vorbis] Questions about libvorbisenc

Michael Smith msmith at labyrinth.net.au
Tue Feb 26 02:46:58 PST 2002



At 10:17 AM 2/26/02 +0100, you wrote:
>Many thanks for you help Michael,
>
>>From the encoder_example.c source, I have added ogg support in my
>application.
>And it works very well .... 
>
>But I have two questions :
>- You say that I can track information like in oggenc ... Well, I have read
>its sources but It is not very clear for me...
>When I study  update_statistics_full ... It seems to be call for each file
>.....And it far from clear for me ...
>Sorry I am not a very good programmer .....
>Would it be possible to have an easy example to track information like the
>encoding progression for one file ?

Brief description:

When you open the input file, you need to find out how long it is (in
seconds, or in samples - either is easy).

For figuring out how far through the file you are, then, you just need
to track how many samples you've encoded (where 'encoding' in this context
means submitting to libvorbis to encode). The percent done is then
samples_submitted/total_samples.

Figuring out the encoding rate (and estimating time remaining, as oggenc
does) requires timing code. You need to find out the time you start
(using gettimeofday() on unix systems, for example), then at intervals
during encode, you should update this: find out the current time, 
then you can figure out the rate by: amount encoded so far (seconds)
divided by time taken.

<p>>
>- When I see the .ogg that are created, I note that for the same original
>wave file, they have not the same size ... Do am I wrong ?

Are you setting different comment tags? How much difference are you seeing?

Michael

<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-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list