Video bitrate and descriptive adjectives calculation
 


Calculations of video and audio playback speed based on the information from the header of AVI
formula_01
·FramesPerSec - video frame rate [frame/second]  
·dwRate - rate from the AVIStreamHeader of video stream [frame/second]  
·dwScale - scale from the AVIStreamHeader of video stream [---]  
formula_02
·BlocksPerSec - audio data rate [block/second]  
·dwRate - rate from the AVIStreamHeader of audio stream [block/second]  
·dwScale - scale from the AVIStreamHeader of audio stream [---]  
Calculations of video and audio bitrates based on the information from the header of AVI
formula_03
·SizeOfAudio - total size of audio information (byte)  
·CountOfAudioStreams - number of audio streams (---)  
·nAvgBytesPerSec - average video bitrate (byte/second)  
·dwLength - length of audio (block)  
·BlocksPerSec - audio block rate (block/second)  
formula_04
·SizeOfHeaders - size of auxiliary information in "movi" chunk (assume audio video interleaving is - VAVAVA┼ or VA1A2VA1A2┼ in case of several audio stream)  
·dwTotalFrames - total amount of video frames (assume audio and video has the same length)  
·BytesPerFrameHeader - number of bytes for frame header in "movi" chunk (8 byte/frame)  
·CountOfAudioStreams - quantity of audio streams (---)  
formula_05
·SizeOfVideo - total size of video stream (byte)  
·MoviChunkSize - size of "movi" chunk (byte)  
·SizeOfAudio - total size of all audio streams (byte)  
formula_06
·AudioKilobitsPerSec - average audio bitrate (kilobit/second)  
·nAvgBytesPerSec - average audio bitrate (byte/second)  
formula_07
·VideoKilobitsPerSec - average video bitrate (kilobit/second)  
·SizeOfVideo - total size of video stream (byte)  
·FramesPerSec - video frame rate (frame/second)  
·dwTotalFrames - total number of frames (frame)  

The accurate calculations of video and audio bitrates based on
parsing of "idx1" section of AVI
formula_08
·SizeOfVideo - total size of video (byte)  
·CountOfIndexEntries - total number of elements in idx1 chunk (---)  
·ckid - data type of element in "movi" chunk (00dc - first stream, compressed video) (---)  
·dwChunkLength - length of element in "movi" chunk (byte)  
formula_09
·SizeOfAudio - total size of audio (byte)  
·CountOfIndexEntries - total number of elements in idx1 chunk (---)  
·ckid - data type of element in "movi" chunk (0xwb - all audio streams) (---)  
·dwChunkLength - length of element in "movi" chunk (byte)  
formula_10
·VideoKilobitsPerSec - average video bitrate (kilobit/second)  
·SizeOfVideo - total size of video (byte)  
·FramesPerSec - video framerate (frame/second)  
·dwTotalFrames - total number of frames (frame)  
formula_11
·AudioKilobitsPerSec - average audio bitrate (kilobit/second)  
·SizeOfAudio - total size of audio (byte)  
·BlocksPerSec - audio block rate (block/second)  
·dwTotalBlocks - total number of blocks (block)  

The calculation of descriptive adjectives of video stream

formula_12
·EffBitsPerPixel - number of bits of compressed data per pixel (bit/pixel)  
·VideoKilobitsPerSec - average video bitrate (kilobit/second)  
·dwWidth - width of video frame (pixel)  
·dwHeight - height of video frame (pixel)  
·FramesPerSec - video frame rate (frame/second)  
formula_13
·VideoCompression - compression of video (%)  
·EffBitsPerPixel - number of bits of compressed data per pixel (bit/pixel)  
·BitsPerPixel - number of bits of uncompressed data per pixel (real color depth) (bit/pixel)  
formula_14
·PowerOfVideoCompression - power of video compression (---)  
·BitsPerPixel - number of bits of uncompressed data per pixel (real color depth) (bit/pixel)  
·EffBitsPerPixel - number of bits of compressed data per pixel (bit/pixel)  
formula_15
·QualityOfVideo - effective quality of video (bit/frame 3§4) - assume video frame is scaled to 3x4 display without disproportions (black strips may appear).  
·dwWidth - width of video frame (pixel)  
·dwHeight - height of video frame (pixel)  
·VideoKilobitsPerSec - average video bitrate (kilobit/second)  
·FramesPerSec - video frame rate (frame/second)  

Alexander A. Sorkin aka Kibi
Author e-mail: avitags@mail.ru
abcAVI Tag Editor home: http://abcavi.kibi.ru