Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video bitrate and file size calculation

Folks,

I am trying to understand the relationship between video bitrate, image size, codec, and the file size. For example, if I have a movie that has an image of 1920*1080 pixels, the bitrate is 24 MBPS, the length is 2 hours and the codec used is H.264, how can I approximate the file size?

We can ignore audio for the moment.

Any pointer would be appreciated.

Regards,
Peter

like image 646
Peter Avatar asked Jan 19 '12 18:01

Peter


2 Answers

You have the bitrate and the length, so you can simply multiply them together:

24 MBPS * 2 hours * 60 minutes / hour * 60 seconds / minute = 172,800 MB

If MB in your case is "Megabits" and not "MegaBytes", then divide by 8 to get 21,600 MegaBytes or ~21.6 GB.

like image 146
user1118321 Avatar answered Oct 04 '22 02:10

user1118321


I did it in a different way. I figured out how to calculate the bitrate per size of picture to always get the best for a 2 hour movie.

frames per sec. -30

res.width -1920

res.height -1080

Gop size -12

frame/sec by Gopsize (30/12=2,5)

pixels in 1 frame (1920*1080=2.073.600)

pixels in frame/sec (2.073.600*30=62.208.000)

bitrate max needed (62.208.000/2,5=24.883.200) -24000 - 24Mb/s

bitrate with 70% loses (24.883.200/0,7=17.418.240) - 17000 - 17Mb/s For 720i with loses 70% and will give a size of file equalling 10Gb

for losses of 40% give 4Gb and screens with a res of 720-480 and an aspect ratio of 3/4, this will give size 3,7Gb for 70% and 1,4Gb for 40%

like image 37
maxim Avatar answered Oct 04 '22 02:10

maxim