Media compression
Hi Everyone!
Today I watched a few videos about video compression, video format, codecs and containers and I found them extremely helpful, so I would like to share my thoughts about them.
There are 2 ways to compress a video which is spatial compression (intra-frame)or temporal compression (inter-frame). Spatial compression is applied only to individual video frames. To compress a video frame it is the same process that is used to compress a still image like a JPEG. When JPEG is created, colour information of the image reduces in the process called chroma subsampling. Then the image is split in sections of 8x8 pixels called macroblocks. Then the file size is reduced. For MPEG (motionJPEG) it's more complicated.
Temporal compression works by reducing redundancy, like JPEG the MPEG standard breaks a video frame into 8x8 pixel macroblocks and each macro block receives instructions on what to do with pixels they already have. There are instructions for staying exactly the same for moving, rotating, etc. Video frames with instructions like this are called key frames and use half as much data as an iframe which is pretty much just JPEG.
There are B frames which are predictions or interpolations between I and P frames. B frames use a quarter as much data as an iframe so they save a lot of space. Bitrate is the amount of data or bits that are used every second, if a video has low bitrate it will be low resolution and low quality. If it has high bitrate it will be high quality.
Most music is compressed in Mp3 or M4a format and although these formats reduce file size they also reduce quality.
The file extension is actually a representation of what's called the container. A container for a video file is the part that contains all of the other files needed to play back a specific video. These files include the video stream, audio stream and metadata. This works with the video stream telling the player what needs to appear on screen, while audio tells the player which sound to play and meta data which means "data about data" includes all other information.
Codec creates an encoded video or audio stream, making it smaller and easier to manage. The player then decodes it based on the rules set by that codec. Video file formats are standardized rules for storing the containers, codecs, metadata and sometimes even folder structure of video files, so that it's easier to support them in large numbers of different devices. Since the very first digital video format became popular new formats have been developed every year in an attempt to take their place. Aiming for improvement in image quality, file size, video playback and special features.
That's all for now, Bye Everyone!
sources:
https://www.youtube.com/watch?v=qbGQBT2Vwvc
https://www.youtube.com/watch?v=2Ds7EcJ2Ia4
https://www.youtube.com/watch?v=MmecPiKClHk
https://www.youtube.com/watch?v=XvoW-bwIeyY
https://www.youtube.com/watch?v=u4P0LOofEFs
https://www.youtube.com/watch?v=JR4KHfqw-oE
Comments
Post a Comment