I'm trying to create bitrate calculation sub-routine in VB 6:
MovieLength = MovieLength / 25# ' (PAL)
AudioSize = (((192000# / 8#) * MovieLength) / 1024#) / 1024#
VideoBrate = ((4454.4 - AudioSize) / MovieLength) * 1024#
MovieLength = the amount of frames
AudioSize is the size of the audio file in MB (192kps, im pretty sure that this is OK)
VideoBrate: This is where im going wrong, any help please?![]()
![]()
![]()
+ Reply to Thread
Results 1 to 2 of 2
-
-
Your calculations look a bit strange:
MovieLength = MovieLength / 25
It looks like MovieLength in the right part of the equation refers to frames and MovieLength in the left part refers to seconds.
AudioSize is hardcoded for 192Kbps. Typical value, I don't argue, but for a bitrate calculator it should be a user field.
The calculation for AudioSize appears, otherwise, correct.
For VideoBRate I am at a loss. The bitrate calculator should provide a bitrate value for the video so that it fits to some value. You have chosen the DVD size in Mbytes.
4454.4 - AudioSize gives a value in MBytes.
You then divide this value by MovieLength, which should be a seconds value, giving a result in Mb / sec.
It is correct to multiply this by 1024 to reach a Kb/s value (kBytes / sec).
What you are missing is a multiplication by 8 to reach a kbits/sec value.The more I learn, the more I come to realize how little it is I know.
Similar Threads
-
Mpg : Mpeg video size and bitrate calculation
By Bonie81 in forum ProgrammingReplies: 2Last Post: 21st Jun 2011, 22:38 -
Need some info on bitrate calculation
By heman28 in forum Authoring (DVD)Replies: 4Last Post: 28th Apr 2008, 18:18 -
video bitrate calculation
By nivek_nayr in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 11Last Post: 12th Feb 2008, 21:30 -
overscan calculation
By cd090580 in forum Newbie / General discussionsReplies: 2Last Post: 2nd Jan 2008, 07:14 -
Newbie needs bitrate calculation advice to convert my 1st PAL to NTSC
By queen_anne in forum Video ConversionReplies: 35Last Post: 20th May 2007, 21:48