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 > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd February 2025, 07:32   #1  |  Link
frobber
Registered User
 
frobber's Avatar
 
Join Date: Sep 2023
Posts: 24
Using mediainfo, how should I calculate video bit rate?

I'm writing some code that needs to parse the output of mediainfo, to get the video bit rate.

I'm asking mediainfo for JSON, and getting over 100 tracks (there seem to be lots of extras on this DVD).

To simplify, I look for the IFO with the longest duration and work from there (assuming that's the "main" title).

The IFO itself has an "OverallBitRate" but the value is very small, e.g. "29". There are several VOBs associated with this IFO, but each one has a slightly different "OverallBitRate", and there are some super-short tracks that have a very different bit rate (e.g., 400 ms duration, with a bit rate that's 1/3 of the other VOBs). Some have a "BitRate" and some have a "BitRate_Maximum", so I'm a little confused by all these different values.

Is there some kind of rule for how this should be calculated ?

TIA !

Last edited by frobber; 3rd February 2025 at 08:23.
frobber is offline   Reply With Quote
Old 3rd February 2025, 16:30   #2  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,917
PGCDemux, ffprobe.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 4th February 2025, 00:11   #3  |  Link
frobber
Registered User
 
frobber's Avatar
 
Join Date: Sep 2023
Posts: 24
Thanks. Unfortunately, PGCDemux only runs on Windows, and for my use case it is too slow to demux every DVD for this.

I just tried ffprobe, and AFAICT it will only read VOB files, and then it reports the same info, i.e., different bit rates, depending on the VOB.

So, I feel mediainfo is still the way to go.... but how to calculate the bit rate?

Last edited by frobber; 4th February 2025 at 02:12.
frobber is offline   Reply With Quote
Old 4th February 2025, 18:59   #4  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,461
Quote:
Originally Posted by frobber View Post
how to calculate the bit rate?
Average, weighted by duration.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 5th February 2025, 01:03   #5  |  Link
frobber
Registered User
 
frobber's Avatar
 
Join Date: Sep 2023
Posts: 24
Quote:
Originally Posted by Asmodian View Post
Average, weighted by duration.
Thanks. What do you mean "weighted by"? Sorry, I don't follow.

FWIW, examining the mediainfo more closely, I see now that only the General sections have an OverallBitRate, and only some of the Video sections have a BitRate. It looks like OverallBitRate actually expresses both Audio and Video, because it appears even where then is no BitRate information recorded for a Video section.
frobber is offline   Reply With Quote
Old 5th February 2025, 03:06   #6  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 8,396
stream size or Bits/(pixel*frame) rest is simple math.
huhn is offline   Reply With Quote
Reply

Tags
mediainfo

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 09:54.


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