Calculations+(Video)

Introduction
As video ﬁles are simply a collection of bitmap images, all we need to do is calculate the size of one image (i.e. one frame) and multiply that by the number of frames in the entire video.

Calculating the file size in megabytes (Int 2)
If the original file size is given in bits, divide it by 8 to convert it into bytes Divide the file size (in bytes) it by 1024 to get the answer in kilobytes and then divide the answer by 1024 to get the answer in Megabytes. If necessary, divide the file size by 1024 again to get the answer in Gigabytes

File size in Gb = File size in bytes / 1024 / 1024 / 1024
 * Formula**

An MPEG video file file is 4,563,402,752 bytes in size. Calculate the file size in gigabytes File size = 4563402752 / 1024 / 1024 / 1024 = 4.25Gb
 * Example**

Terminology

 * The colour depth (bytes) is the number of bytes used to represent the colour of a single pixel
 * The resolution is a measure of the total number of pixels in an image
 * The frame rate (fps) is the number of frames of video displayed each second
 * The video time is the length of the video clip
 * The frame size (bytes) is the file size of a single frame: total number of pixels x colour depth per pixel (bytes)

Calculating the file size given the frame size, frame rate and video time (Higher)
File size (bytes) = frame size (bytes) x frame rate (fps) x video time (s)
 * Formula**

A video clip is captured with a resolution of 320 x 240, and using a colour depth of 16 bits. The frame rate is 25 fps, and the clip has a duration of 29 seconds. Calculate the file size of the video clip.
 * Example**

Frame size = total number of pixels x colour depth (bytes) = 320 x 240 x 2 = 153600 bytes File size (bytes) = frame size x frame rate x video time = 153600 x 25 x 29 = 111360000 bytes File size (megabytes) = 111360000 / 1024 / 1024 = 106.2Mb

Questions (Int 2)
1. A video file is 361758720 bytes in size. Calculate the size in megabytes 2. A video file is 838860800 bytes in size. Calculate the size in megabytes 3. A video file is 1342177280 bytes in size. Calculate the size in gigabytes 4. A video clip is 124928 kilobytes in size. Calculate the size in megabytes 5. A video clip is 3407872 kilobytes in size. Calculate the size in gigabytes

Question (Higher)
1. A video is captured using 24fps and 600 x 400 pixels, colour depth 24 bits. What is the file size of the video if: (a) it lasts 45 seconds (b) it lasts 1 minute 22 seconds (c) it lasts 3 minutes 50 seconds 2. Calculate the file size of a 8 minute video captured at 12fps, 800 x 600 with a colour depth 16 bits 3. Calculate the file size of a 35 second video captured at 24fps, 640 x 480 with a colour depth 24 bits 4. Calculate the file size of a 2 minute 15 second video captured at 25fps, 320 x 240 with a colour depth 16 bits