VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. 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?
    Quote Quote  
  2. Member SaSi's Avatar
    Join Date
    Jan 2003
    Location
    Hellas
    Search Comp PM
    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!