If you are looking for a library to help you out with video compression and processing, FFmpeg is certainly the best open-source library you’d find out there. It can be used for blurring, color conversion, rotation, extraction of frames. As well as offer an interface to various video codecs like H.264/AVC, HEVC, AV1.
Here in this tutorial, I’ll discuss briefly what FFmprg really is and how you can install it on windows. On top of it, there are a few basic commands for FFmpeg to get you started.
What is FFMPEG?
FFmpeg is a free and open-source software project consisting of different libraries and programs for handling video, audio, and other multimedia files and streams. FFMPEG is a command-line tool used for processing video and audio files. It is widely used for format transcoding, basic editing (trimming and concatenation), video scaling, and video post-production effects.
How To Install FFMPEG on Windows?
Installing FFMPEG on windows is quite easy, Once the installation process is done we will elaborate on how to set up environment variables in windows for FFMPEG. To install it on your windows machine you need to follow a step-by-step guide as described below.
Before downloading FFMPEG build you must have an app that can decompress files ending with the .7z file extension, such as WinRAR, you must install it before you can continue.
Step 1 – Go to https://ffmpeg.org/download.html and Select the windows icon.
Step 2 – On Clicking the windows icon you will see 2 different options one is Windows build from gyan.dev and other is Windows build by BtbN to download from you can choose anyone. In this article we will follow the first option. Click on Windows build from gyan.dev, It will take you to a page that contains FFMPEG build for windows.
On this page you can see 4 different builds, each build has a specific purpose.
- git full is built from the latest master branch with a large set of libraries.
- git essentials is built from the latest master branch with commonly used libraries.
- release full is built from the latest release branch with a large set of libraries.
- release essentials is built from the latest release branch with a large set of libraries.
Step 3 – To download the latest stable version scroll down to release and click on https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z , It will start downloading the latest stable release full version in compressed format.
Step 4 – Once the download is finished you can extract the build in the downloads folder and rename the folder to ffmpeg.
Step 5 – Now cut the folder from downloads and paste it into the C drive on your PC.
Now you have FFMPEG installed in your machine. To make it work you need to set its path to environment variables. To set up the path follow below steps:
Step 6 – Search for system variables in windows search, Click on edit system environment variables. It will open a pop up window, in the bottom right corner you will see an option of environment variables, click on it.
Step 7 – Select the Path Variable under “User variables for (your name)” and click edit. It will open up a pop up with a list of paths.
Step 8 – Click on the New button from the right navigation bar in the pop up and add it will show you a new line at the bottom of the path list. Type C:\ffmpeg\bin and click ok.
Now you can see the FFmpeg path in the path list at the end. Click Ok to save your changes. You have now installed FFMPEG and set proper environment variables. To confirm the installation open the command prompt and enter ffmpeg -version.
Some Basic Commands of FFMPEG :
· Convert video from one format to another
ffmpeg -i youtube.flv -c:v libx264 filename.mp4
· Convert a video into an animated GIF
ffmpeg -i video.mp4 -vf scale=500:-1 -t 10 -r 10 image.gif
· Extract image frames from a video
ffmpeg -ss 00:00:15 -i video.mp4 -vf scale=800:-1 -vframes 1 image.jpg
· Convert Video into Images
ffmpeg -i movie.mp4 -r 0.25 frames_%04d.png
· Rotate a video
ffmpeg -i input.mp4 -filter:v ‘transpose=2,transpose=2’ rotated-video.mp4
Conclusion
FFmpeg is a great tool for anyone genuinely interested in video compression and processing. Being an open-source tool it gives you endless capabilities as you can make changes to the source to your requirements.
Supercharge Your Business with Videos
At VdoCipher we maintain the strongest content protection for videos. We also deliver the best viewer experience with brand friendly customisations. We'd love to hear from you, and help boost your video streaming business.
Hi. I’m Shubham. I make jokes when I’m uncomfortable.