Video Codecs

jwdohert

Junior Member
Feb 20, 2005
3
0
0
I've used Xvid, DivX, etc. for years now and I've always wondered how they compress the video. I know that often times the video resolution is cut slightly to fit a video on a single cd, but what else is done? And, if you got the time, what is this about video bitrates, etc. ?
 

Bassyhead

Diamond Member
Nov 19, 2001
4,545
0
0
Simply put, compression of any kind of data, including video, basically removes redundant data and uses complex algorithms to do this. Some compressions are lossy and remove some data that will sacrifice image quality along with removing redundancy. Other compressions are lossless and only remove redundancy while preserving the original quality of the video.
 

icejunkie

Platinum Member
Oct 2, 2004
2,326
0
0
Well, why does redundancy exist in the first place? Why can't we just create lossless file formats from the getgo?
 

ghackmann

Member
Sep 11, 2002
39
0
0
Uncompressed 720p HDTV video would take (1280 x 720 pixels / frame) x (3 bytes / pixel) x (24 frames / s) = 66,355,200 bytes = 63.3 megabytes per second even before you started adding audio. If your movie was completely silent, you'd fit around 15 minutes of video on a double-layer Blu-ray disc, or about 2.5 minutes on a standard dual-layer DVD disc.

Granted, that's with no compression at all, but lossless compression would only cut the video down by 50% to 75% if you were lucky.
 

Bassyhead

Diamond Member
Nov 19, 2001
4,545
0
0
This "redundancy" that I speak of was in the video in the first place. By redundancy I mean that within a frame, lots of patterns/colors are repeated and between frames there might be similar information. Consider several frames of a video. At 24 frames/s, little may be different between many frames of the video if there isn't much going on. Instead of video data describing the contents of each frame over and over and repeating itself, it can simply describe what has changed into the next frame. One way to do this is simply describe what pixels have changed in the succeeding frame. This way, we don't need the entire set of pixels for the frame. To achieve higher compression, the compression format can choose to only decide if a pixel has changed if it is out of a certain range. Another way is to use motion compensation where the video data describes what pixels have moved into the next frame and what has stayed the same.
 

harrkev

Senior member
May 10, 2004
659
0
71
There are two types of redundancy present in a vide signal -- temporal and spatial. Temporal redundancy means that if a pixel is red, the ones near it are quite likely to also be red. Spatial redundancy means that if a pixel is red, the same pixel in the next frame is also likely to be red.

The spatial redundancy is taken care of exactly like it is in JPEG. You break the signal up into its frequency components, and throw away the ones that you are not likely to notice. The "brightness" information is also kept at its full resolution, but "color" and "saturation" values are reduced in resolution because the eye is not as sensitive to these things.

Here is how temporal redundancy is handled. Out of every nine frames, basic MPEG compression fully compresses one of them using JPEG. An additional two of these nine frames are simply stored as error differences since the last full frame. The other six frames can reference either a previous or a future full frame and encode the error. This means that if you have a static shot of a person talking, the background might not move at all, you there would be NO error for those areas. Then, you only need to encode the slight head and lip motion of the actor speaking.

Further MPEG improvements involve motion compensation. You look for a block of pixels that moves around in the frame, and also encode its location and movements. This can greatly reduce the size, but takes a LOT of processing power to look for the movement.

I hope that this helps.
 

Jeff7

Lifer
Jan 4, 2001
41,596
19
81
Well, why does redundancy exist in the first place? Why can't we just create lossless file formats from the getgo?

Lossless file formats give poorer compression ratios than lossy - makes sense too, since a lossy file format gets rid of some of the original data. ZIP a WAV file, then create an MP3 of the same thing. The ZIP will probably be bigger, but you'll get the original file back, 100%. MP3 will give you an approximation, but smaller file size.
 

icejunkie

Platinum Member
Oct 2, 2004
2,326
0
0
Originally posted by: Jeff7
Well, why does redundancy exist in the first place? Why can't we just create lossless file formats from the getgo?

Lossless file formats give poorer compression ratios than lossy - makes sense too, since a lossy file format gets rid of some of the original data. ZIP a WAV file, then create an MP3 of the same thing. The ZIP will probably be bigger, but you'll get the original file back, 100%. MP3 will give you an approximation, but smaller file size.


Thanks
 

icejunkie

Platinum Member
Oct 2, 2004
2,326
0
0
Originally posted by: harrkev
There are two types of redundancy present in a vide signal -- temporal and spatial. Temporal redundancy means that if a pixel is red, the ones near it are quite likely to also be red. Spatial redundancy means that if a pixel is red, the same pixel in the next frame is also likely to be red.

The spatial redundancy is taken care of exactly like it is in JPEG. You break the signal up into its frequency components, and throw away the ones that you are not likely to notice. The "brightness" information is also kept at its full resolution, but "color" and "saturation" values are reduced in resolution because the eye is not as sensitive to these things.

Here is how temporal redundancy is handled. Out of every nine frames, basic MPEG compression fully compresses one of them using JPEG. An additional two of these nine frames are simply stored as error differences since the last full frame. The other six frames can reference either a previous or a future full frame and encode the error. This means that if you have a static shot of a person talking, the background might not move at all, you there would be NO error for those areas. Then, you only need to encode the slight head and lip motion of the actor speaking.

Further MPEG improvements involve motion compensation. You look for a block of pixels that moves around in the frame, and also encode its location and movements. This can greatly reduce the size, but takes a LOT of processing power to look for the movement.

I hope that this helps.


Thanks for the info...
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |