Wednesday, October 24, 2018

Compressions, Encoding and Decoding

For the signal to get sent from the camera to the your own servers for transmission, the data needs to be compressed. Encoding works along side this. In an earlier post we spoke about bandwidth which plays a key part in this section. 

As I explained earlier the data is broken up into different sections when it leaves the transmitter on the back of the camera. But for this to be sent over cellular data it needs to be encoded and compressed.

What is compression?

"Compression is a reversible conversion (encoding) of data that contains fewer bits. This allows a more efficient storage and transmission of the data. The inverse process is called decompression (decoding). Software and hardware that can encode and decode are called decoders. Both combined form a codec and should not be confused with the terms data container or compression algorithms." (Mitrovic, 2018)


But before we go any deeper we need to know what the difference between Intraframes and Interframes. 

Intraframe codecs are used on still images to compress them as it only uses the data in that frame to do it. To use this for videos would take along time, this is where Interframe codecs comes in. When filming the standard is there are 25 frames per second and to compress every frame individually would take a while. Inter frames look at a few frames at a time and compresses them together. These frames are alway decided beforehand to avoid confusion, this known has the GOP (group of pictures). To make compression more efficient it now uses both of these so it looks at the frames around but also individual ones as well. (Wolfcrow.com, 2018)

Because each frame is normally slightly different then the last within the GOP, except in a scene change. Three different types of frames are used to predict the image.

I-frames:

This follows a cut or a minor change in detail which means it has to reference only whats in that frame which means the compression isn't great.

Predicted Frames - P Frames:

The last from is the p frames as we have most of the information already from previous frames. It can be predicted from an earlier P or I frame. Compression is a lot less because other information is already stored. 

Bidirectional frames - B Frame:

This is the middle frame, it looks at the first and last frame for data, for it to do this there needs to be a delay in the broadcast. 




To link what was said earlier P and B frames are inter coded frames and I frames are intra coded frames. 

 Once each frame has enough data to guess what it is, in terms of colours and movement. This means it doesn't need all of the pixels within frame. When this is broadcasted it will take less time and bandwidth as there is less data.(Mitrovic, 2018)

  As I have said before when doing cellular broadcasting you need to make sure you have the correct size bandwidth. There are ways to make this easier. For example, when filming a news story not much is moving, there aren't any hard cuts and the colours are more blocky and don't change. This will be easy to compress as it will be easy to guess what's coming next. Where as if you have a lot of moving images, hard cuts and colour then it will struggle to compress it.
This could cause artifacts, glitches in the video. One artefact is called macro blocking where parts of the image temporarily turns into solid blocks. This is mistaken for pixilating, which is slang word for the term. (Garden, Video and Technology, 2018)

  




    

No comments:

Post a Comment