[HOW TO] Make your movie files smaller while keeping quality

D

dvdcatalyst

Guest
Original article is located here: http://www.tools4movies.com/2012/05/tip-how-to-make-your-video-files-smaller/



On a regular basis, people ask me why video files end up being so large, and how they can make them smaller so they can store more videos on devices such as the Amazon Kindle Fire, Apple iPad and the Galaxy Tab 10, all of which have limited storage space available and do not have a way to expand the memory by means of memory cards.

In DVD Catalyst Newsletter 52, http://www.tools4movies.com/2012/04/dvd-catalyst-newsletter-52/ I wrote something small about this topic, but I am hoping that this article will be of a bit more help to you. Some parts of the newsletter will be merged into this article, so there is no need to read back through that.

Before I start with the different techniques you can use to make your movies smaller, let me explain a bit more about what video and conversion actually is.
As a child, you might have played with the corner of a notepad, drawing an image on each page, one slightly different from the next, and afterwards, flipping the pages fast made it look like a small cartoon.





Video, like movies and TV shows, is nothing more than a collection of pictures shown in rapid succession. Making use of the limitations of the human eye, these images are changed at such a speed that we see this as motion.





steps.jpg



Similar as taking pictures on a digital camera, each individual picture of a movie, called a frame, takes up space. A picture consists of a lot of individual dots, and in order to show the picture in its full glory, the color for each of these little dots needs to be stored in the file. The larger the picture (resolution) the more pixels, and the larger the actual file.

In order to make the pictures smaller, there are different picture formats, such as BMP, JPEG, GIF, PNG, TGA etc. Each of these formats uses different techniques to read (and store) the pixel information in a file. These formats offer different compression levels and even amount of colors, in order to store the data. Some formats store the color information for pixels in larger blocks, others use formula’s to store the data, and of course this results in smaller files than the formats that store each pixel individually, but it also means that some pixels do not contain the exact color information of the original, but something close to it.

Similar as with images, there are different compression formats for video. DVDs use MPEG2, AVI files often use DIVX or XVID, and most MP4 files, such as the ones you can get from online stores like iTunes, contain AVC video.
Each of these formats have their advantages and disadvantages. MPEG2 (DVDs), was created when the technology was not yet at the high performance parts we have now, and as a result it offers a low compression technique that works well on older hardware. AVC, the newest compression format, was created only recently, and as of such, it relies on a lot more “power” than MPEG2, but in return, it offers a lot better compression.

Video compression in general works by storing differences between frames. So-called key-frames are images stored in their full glory, and then for a number of successive images, only the differences between the key-frame are stored. The bigger the difference between the key-frame and the following image (like fast-action scenes) the more data is required to store those differences, resulting in a larger file.

 
Bitrate and Resolution:

The main thing that affects the filesize is the video quality setting, or video bitrate.
In order to store the differences between frames, there has to be enough data available. By using a low video quality setting, there might not be enough to store these differences, which will result in a lower quality video.

low-bitrate-vs-high-bitrate-compare-300x95.jpg

The above screenshot shows screenshots of a video (The Avengers Trailer) converted at 1280x720 resolution, using 2 different quality settings. The right side, encoded using 5000Kbps, looks absolutely stunning, but for a 2 hour movie you are looking at a file of about 4500MB in size. The left side, the same movie converted using the same resolution, but at only 500Kbps.
Now the movie will only take up about 500MB of space, but you can clearly see the difference in quality between the two videos.
The 500Kbps was clearly not enough to actually store the information needed to recreate the image.
The visual video quality is directly tied to this and the screen resolution. The higher the resolution of your videos, the more data is required to store information for the individual pixels. By lowering the screen resolution of your video file, you will get a better representation of your original video if you are using a low video bitrate setting.

Now take this image.
The center image is encoded using a lower screen resolution, 640x480, but still at the 500Kbps I used in the previous screenshot. Because of the lower resolution, there are less pixels that need data to determine their color information, so the lower resolution image actually looks a bit better that the higher-resolution image using the same settings (left side). Even when the lower-resolution video is upscaled to the same higher 1280x720 resolution (right side) it still looks considerably better than the blocky mess we had before.



Of course it doesn't look as great as the one done at 5000Kbps (left side) but it is still watchable, even
though it is only about 1/10th of the filesize, thus nearly 10x as many videos on the same amount of memory.
So the first trick to use to make your videos smaller is by adjusting the screen size as well as the video quality setting.
While this doesn't have any special calculations behind it, a basic rule of thumb you can use, as a minimum, the same video bitrate setting as the width of your video.




320x240, about 380MB for a 2 hour movie.




640x480, about 660MB for a 2 hour movie.


1280x720 at 1280Kbps (right) and 5000Kbps (left).

So far, we have learned that the video quality is greatly affected by the amount of data you specify to use (Bitrate/Kbps) and the amount of pixels (screen resolution) share that data. The higher the resolution, the more data is required, and by not using enough data, the video does not look as good.
By reducing the amount of pixels (lowering the screen resolution) along with the video quality (Kbps) setting, we can keep the video sharp(ish) and reduce the file size a bit as well.
 
If we take the default NOOK color profile and only reduce the screen size a bit, to say 640x480, we end up with this:
(original) 854x480, 800Kbps:


(modified) 640x480,800Kbps:

I scaled the videos to the same size when I made the screenshots, because that is how it is played on an actual device, and as you can tell from the lines in the zoom-image, the lower-resolution video, even though it is scaled up a bit, actually looks better than the higher resolution video converted using the same quality settings.
Earlier I mentioned that, as a simple rule of thumb, you can use the width of the video as the quality setting to get acceptable results.
640x480, 640Kbps:

If you look at the images, and compare them with the default NOOK color settings, they are nearly identical. But, because we used a lower video quality setting for the conversion, the filesize did end up being less. The default NOOK color file was 857MB, the file size for the video above, the one converted at 640Kbps, was only 694MB, 160MB, or about 20% less in size, while it still looks virtually the same when you watch the video on your device.

If we go lower:

480x360, 800Kbps (same quality setting as the standard NOOK color profile, and thus similar in file-size)


480x360, 480Kbps (the simple rule of thumb), resulting in 564MB (instead of 857MB, 35% smaller):


Now if we combine the screen-size adjustment with a decent CRF value of 24, we get this:

854x480, crf 24, 917MB:


640x480, crf24, 588MB:


480x272, crf24, 417MB:


320x240, crf24, 275MB:


Of course, the lower the resolution, the more detail is lost, but if you use a reasonable adjustment in screen resolution, you can save a fair amount of space while still maintaining a good quality video. Of course, as you can tell from the last screenshots, going too low will result in a noticable quality-loss, but, if you really want to store 4x as many movies on your device, it is possible.
Personally, a small resolution change, going from something like 854x480 to 640x480 will give me enough (300MB in this case) room at a good quality.
 
Back
Top