Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th May 2002, 05:42   #1  |  Link
chris25fr
Registered User
 
Join Date: Jan 2002
Posts: 44
bitrate of a sound ogg in a ogm

i have an ogm file with a ogg sound .

I forgot the bitrate of the sound (ogg)

it is possible to know the bitrate please ?

thinks
chris25fr is offline   Reply With Quote
Old 9th May 2002, 01:02   #2  |  Link
mustaneekeri
Registered User
 
Join Date: Nov 2001
Posts: 149
If u know the difference between filesize (audioless and with audio) and length of the clip u can determine br. but it is anyway variable, or did u use CBR?
mustaneekeri is offline   Reply With Quote
Old 9th May 2002, 02:33   #3  |  Link
chris25fr
Registered User
 
Join Date: Jan 2002
Posts: 44
it is ogg vorbis ( vbr) and i don't know the size without the sound .
So ,it is difficult.
chris25fr is offline   Reply With Quote
Old 9th May 2002, 03:15   #4  |  Link
gnoshi
Registered User
 
Join Date: Feb 2002
Posts: 29
What happens if you drag the file into winamp and/or equivalent...? If it is capable of playing the audio stream and ignoring the video stream, it should be able to give you the bitrate.

Otherwise, you could use graphedit to demux the vorbis track from the ogm file, and remux it into an ogg file all its own and then open that in winamp. Slow and convoluted, but should do the required task.

Otherwise, no ideas sorry.

gnoshi
gnoshi is offline   Reply With Quote
Old 10th May 2002, 01:37   #5  |  Link
chris25fr
Registered User
 
Join Date: Jan 2002
Posts: 44
it's an *.ogm so winamp can't read it .

It is possible to use graphedit and i know how do it but it's too heavy .


But thinks for your answer .
chris25fr is offline   Reply With Quote
Old 10th May 2002, 04:08   #6  |  Link
kthulhu
Registered User
 
kthulhu's Avatar
 
Join Date: May 2002
Location: Buenos Aires, Argentina
Posts: 9
The vorbis header packet has bitrate data. I'm not sure about this, haven't tested it, but maybe if you render the file in graphedit one of the filters will show that info...

I'm making some tests with libogg. I started building a demux/explore tool for ogg. The "vorbis" stream data and coments on other streams is the only thing it handles now. If you want I can fix it up a bit so you can check that.

Or I can tell you were to look in the file with a hexeditor.
kthulhu is offline   Reply With Quote
Old 10th May 2002, 05:16   #7  |  Link
ChristianHJW
Guest
 
Posts: n/a
Re: bitrate of a sound ogg in a ogm

Quote:
Originally posted by chris25fr
it is possible to know the bitrate please ?
Vorbis is normally encoded in quality mode with q settings, not bitrate settings ... final bitrate will be depending on source material sound complexity ...
  Reply With Quote
Old 10th May 2002, 16:08   #8  |  Link
chris25fr
Registered User
 
Join Date: Jan 2002
Posts: 44
i don't understand very well .

I used HeadAC3he to do the ogg. i wonder if there is a tool to know the Q or the average bitrate of the sound But it seems too early .

thinks
chris25fr is offline   Reply With Quote
Old 10th May 2002, 16:30   #9  |  Link
MaTTeR
AC3 5.1 Addict
 
MaTTeR's Avatar
 
Join Date: Nov 2001
Location: Big Blue Nation_USA
Posts: 2,036
@chris25fr

You are confusing terms here. Ogg is a container somewhat like AVI is. Vorbis is the audio codec you used.

Christian is right, we don't use bitrate modes with Vorbis like you are use to using with MP3. If you used HeadAC3he to transcode your AC3 to to Vorbis then for a given Q level it will also display the expect bitrate(ie. Q2 will average around 96kbps).
__________________
Need AC3 & SPDIF setup info?
MaTTeR is offline   Reply With Quote
Old 11th May 2002, 00:37   #10  |  Link
chris25fr
Registered User
 
Join Date: Jan 2002
Posts: 44
i'm french so excuse me for my english .



ps:i know that ogm is a container . no problem

in fact,i done a ogg vorbis with HeadAC3he .then i mixed it with an avi with graphedit(before oggmux exists) . Now ,i have an ogm file . But i forgot the bitrate or the Q of the sound. So my question,is it possible to know the bitrate or the q of the sound .Without demux with graphedit.

i suppose that q1 ~- something ,etc,etc

bye

Last edited by chris25fr; 11th May 2002 at 00:53.
chris25fr is offline   Reply With Quote
Old 11th May 2002, 05:54   #11  |  Link
kthulhu
Registered User
 
kthulhu's Avatar
 
Join Date: May 2002
Location: Buenos Aires, Argentina
Posts: 9
Open the file with a hexeditor... or herviewer.. or similar tool. Each page in an ogg stream starts with "OggS". The first pages only contain a header packet.

So... You have to look for the first page of the audio stream. Probably the second one in the file. Some bytes after the "OggS" you will see a "video", for video :-) , "vorbis" for audio or "text" for subtitles. You could find other types of streams, but you are looking for the "vorbis" stream.

So... Look for the second "OggS" and look for the word "vorbis" a few bytes after it. You should find this in the first bytes of the file... first 100 bytes more or less.

After the "vorbis" string skip 9 bytes. The you will find 3 double words: max bitrate, nominal bitrate and min bitrate. These values are placed there by the encoder, max and min will be -1 (FFFFFFFF), at least its -1 in all ogms I've seen.

The nominal bitrate is what you are looking for. An aproximation, of course, because you actually placed a Q value in the encoder and the Q value is what it actually used during encoding.
kthulhu is offline   Reply With Quote
Old 11th May 2002, 06:19   #12  |  Link
kthulhu
Registered User
 
kthulhu's Avatar
 
Join Date: May 2002
Location: Buenos Aires, Argentina
Posts: 9
I just compiled a version of a test I am making. As I just said, its more of a test that an actual tool, but it should be able to get the info you are looking for.

Get it from:

http://www.kadath.com.ar/oggexplore/
kthulhu is offline   Reply With Quote
Old 11th May 2002, 10:54   #13  |  Link
chris25fr
Registered User
 
Join Date: Jan 2002
Posts: 44
think you very much for yours answers. very cool .

i'm going to try your tool and reply after . I'm curious so i will try an hexeditor too .

bye kthulhu

Last edited by chris25fr; 11th May 2002 at 11:01.
chris25fr is offline   Reply With Quote
Old 13th May 2002, 01:52   #14  |  Link
LotionBoy
Registered User
 
Join Date: Oct 2001
Location: NYC
Posts: 224
I'm getting -1 as the bitrate on every audio stream I try. :-(

LotionBoy
LotionBoy is offline   Reply With Quote
Old 15th May 2002, 10:42   #15  |  Link
QuoVadis
Guest
 
Posts: n/a
@LotionBoy: You can try a beta download of NBS Catalogue @: www.cip.uni-trier.de/may/Files/Beta-Update.zip

Like kthulhu I used the average bitrate in my parser, the min/max bitrates are ignored. If you encounter problems with sone ogm's, please send me the header data.

@kthulhu: I've got another problem with my parser. I cannot find a fps field nowhere in the header data. The only way I figured out was determining the # of frames by scanning the video-packets (well, atm only the last valid video stream packet) then loading the file into DirectShow and query the length in ms and calculate the fps. Do you know a better way?

QuoVadis
  Reply With Quote
Old 15th May 2002, 11:50   #16  |  Link
BlackSun
CoreCodec
 
BlackSun's Avatar
 
Join Date: Oct 2001
Location: Toulouse
Posts: 726
Quote:
Originally posted by kthulhu
Open the file with a hexeditor... or herviewer.. or similar tool. Each page in an ogg stream starts with "OggS". The first pages only contain a header packet.

So... You have to look for the first page of the audio stream. Probably the second one in the file. Some bytes after the "OggS" you will see a "video", for video :-) , "vorbis" for audio or "text" for subtitles. You could find other types of streams, but you are looking for the "vorbis" stream.

So... Look for the second "OggS" and look for the word "vorbis" a few bytes after it. You should find this in the first bytes of the file... first 100 bytes more or less.

After the "vorbis" string skip 9 bytes. The you will find 3 double words: max bitrate, nominal bitrate and min bitrate. These values are placed there by the encoder, max and min will be -1 (FFFFFFFF), at least its -1 in all ogms I've seen.

The nominal bitrate is what you are looking for. An aproximation, of course, because you actually placed a Q value in the encoder and the Q value is what it actually used during encoding.
Do you have the specs ? I am interested
__________________
BlackSun
The Concentric Circles of Audio and Video
BlackSun is offline   Reply With Quote
Old 15th May 2002, 11:58   #17  |  Link
QuoVadis
Guest
 
Posts: n/a
@BlackSun: Maybe this will help you. It only works with ogm's with an audio stream. My ogm parser is mainly based on this source with some improvements.

http://timsara.freeservers.com/ogg/oggparser01.src.zip
  Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.