safemode
2001-Sep-22 17:31 UTC
[vorbis] retrieving "instant" bitrate without vo_open?
ok, I'm aware that vo_open cant be used at the same time as other functions such as ogg_sync_wrote, ogg_sync_pageout, ogg_stream_pagein, ogg_stream_packetout and vorbis_synthesis_headerin. In order to get information from the bitstream i've been using this method because it's fast and doesn't require decoding of the stream. But, i can only retrieve the average bitrate of the ogg stream with the vorbis_info struct. I tried using vo_open but could only retrieve garbage values and it's because i basically dont know how to use it to do the same thing i'm doing here. All i need to do is traverse the entire bitstream, take each packet and look at it's individual bitrate. Can i do this without vo_open or is there a way to use vo_open and the ogg functions i've listed above ? I'm not aware of any way to set the vorbis_file struct to the current packet without at least using vo_open and doing that ruins the ogg functions in my tests. --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
safemode
2001-Sep-22 17:48 UTC
[vorbis] retrieving "instant" bitrate without vo_open?
Bah heh. I meant ov_open of course. sorry bout that. On Saturday 22 September 2001 20:31, you wrote:> ok, I'm aware that vo_open cant be used at the same time as other functions > such as ogg_sync_wrote, ogg_sync_pageout, ogg_stream_pagein, > ogg_stream_packetout and vorbis_synthesis_headerin. In order to get > information from the bitstream i've been using this method because it's > fast and doesn't require decoding of the stream. But, i can only retrieve > the average bitrate of the ogg stream with the vorbis_info struct. I tried > using vo_open but could only retrieve garbage values and it's because i > basically dont know how to use it to do the same thing i'm doing here. > > All i need to do is traverse the entire bitstream, take each packet and > look at it's individual bitrate. Can i do this without vo_open or is there > a way to use vo_open and the ogg functions i've listed above ? I'm not > aware of any way to set the vorbis_file struct to the current packet > without at least using vo_open and doing that ruins the ogg functions in my > tests. > > --- >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@xiph.org' > containing only the word 'unsubscribe' in the body. No subject is needed. > Unsubscribe messages sent to the list will be ignored/filtered.--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
volsung@asu.edu
2001-Sep-22 18:23 UTC
[vorbis] retrieving "instant" bitrate without vo_open?
On Sat, 22 Sep 2001, safemode wrote:> All i need to do is traverse the entire bitstream, take each packet and look > at it's individual bitrate. Can i do this without vo_open or is there a way > to use vo_open and the ogg functions i've listed above ? I'm not aware of > any way to set the vorbis_file struct to the current packet without at least > using vo_open and doing that ruins the ogg functions in my tests.You might want to take the code from ogginfo (in the vorbis-tools package). It does exactly what you describe, but throws away each vorbis packet after it is extracted from the Ogg bitstream. Insert your bitrate checking code where you see the comment: /* Normally we would do decode here, but we're just checking packet integrity */ --- Stan Seibert --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Michael Smith
2001-Sep-22 19:24 UTC
[vorbis] retrieving "instant" bitrate without vo_open?
At 08:31 PM 9/22/01 -0400, you wrote:>ok, I'm aware that vo_open cant be used at the same time as other functions >such as ogg_sync_wrote, ogg_sync_pageout, ogg_stream_pagein, >ogg_stream_packetout and vorbis_synthesis_headerin. In order to get >information from the bitstream i've been using this method because it's fast >and doesn't require decoding of the stream. But, i can only retrieve the >average bitrate of the ogg stream with the vorbis_info struct. I tried using >vo_open but could only retrieve garbage values and it's because i basically >dont know how to use it to do the same thing i'm doing here. > >All i need to do is traverse the entire bitstream, take each packet and look >at it's individual bitrate. Can i do this without vo_open or is there a way >to use vo_open and the ogg functions i've listed above ? I'm not aware of >any way to set the vorbis_file struct to the current packet without at least >using vo_open and doing that ruins the ogg functions in my tests.Why do you want to look at the bitrate of each individual packet? You can certainly do all of what you want without using vorbisfile. I'm not sure exactly what it is you want to do, though. If you only want to make things work faster, try looking at ov_test(), and ov_test_open(). That might be an easier way to do it. Michael --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.