Video Compression Using FFmpeg
I like to shoot a lot of videos whenever possible. I think that moments are best captured, when you can look back through the whole timeline rather than a single frozen frame. Over the course of time, the amount of space required for storing videos files have grown exponentially. Our modern smartphone can now shoot up to 8K video footage, which is insane.
I mostly shoot my videos at 1080p 24fps or 60fps, based on the situation. File storage has been a growing concern to me, since I only have 1 TB of external storage, which has to accumulate my games, movies, music, documents and also my personal video files.
Saving Hero, FFmpeg
FFmpeg is a free and open-source software, for handling video, audio, and other multimedia files and streams. It’s a God sent product for anyone who works with video files. It’s basically a video editor, but in command line.
I have been using FFmpeg, ever since I started using Linux. I first started off withe basic x264 compression for my videos, which indeed saved a lot of storage space. The modern video codecs have experienced a lot of changes, starting with introduction of new codecs, VP9 and AV1. Mostly used by YouTube for their video streaming encoding.
Personally, I have upgraded to x265, which provides higher video compression compared to x264. The only noticeable difference, is the computing time required by x265 is greater than x264. Previously, I used to downscale my video files to 720p, to save even more storage save, but the help of x265 codec I have stopped doing that.
I have made a bunch of FFmpeg bash scripts, so if anyone wanted to have a look at them, they are on my GitHub Page
Conclusion
When it comes to video compression, a lot of things matter in order to achieve the file size which you want by not compromising on the video quality. So far, I have noticed that the video codec and the CRF values, play a vital role when it comes to compression.
In the future, I might play around with the other video codecs, to see what they have to offer in terms of video compression.
In no means, I’m an expert in FFmpeg. I still don’t know what some arguments do to a video file. But, I can always refer back to the FFmpeg documentation, whenever a need arises.
This is the Day 13 of 100DaysToOffload challenge (Round Two)