There’s a piece of software program working behind YouTube, VLC, Chrome, Plex, and Kodi. It has been round since 2000, prices completely nothing, and will substitute at the very least three subscriptions sitting in your bank card assertion proper now. Whereas it’s the engine that powers the fashionable web, most individuals have by no means typed its identify.
That device is FFmpeg, a free, open-source command-line framework that handles just about any audio or video process a human or machine might dream up. Technically, it’s a large assortment of libraries — comparable to libavcodec and libavformat — that allow these well-known apps to “perceive” and play virtually any file format in existence. Sure, there’s a studying curve. Sure, it lives in a terminal window with no pleasant buttons. However when you get previous that, what you unlock is one thing absurd in the very best method.
On Home windows, the method of putting in it’s barely extra handbook than a regular installer; you obtain a pre-built binary from the official FFmpeg web site at ffmpeg.org (which can usually level you to trusted group builds like gyan.dev), extract the folder, and add its “bin” subfolder to your system’s PATH surroundings variables so you possibly can name it from any folder. On macOS, the quickest route is Homebrew: simply run it brew set up ffmpeg in your Terminal, and it handles every thing else. If you happen to’re a Linux consumer on Debian or Ubuntu, you possibly can run sudo apt set up ffmpeg and be performed in seconds.
As soon as it’s put in, each command on this article goes into your terminal of alternative: Command Immediate or PowerShell on Home windows, Terminal on macOS, and whichever shell you like on Linux. You sort the command, press Enter, and FFmpeg will get to work, utilizing your laptop’s CPU or GPU to course of media with professional-grade precision. That’s all there may be to it.
With that out of the best way, here’s what it could do that you just may be actively paying for elsewhere.
Associated
I can convert actually something with these free FFmpeg-powered apps
Harness the ability of FFmpeg with out touching a command line.
FFmpeg can compress your movies so effectively
You’ll query each converter you might have ever paid for
When you’ve got ever dragged a bloated video file into an app like Movavi or paid for a cloud compressor with a month-to-month price, take a breath. Whereas there are many user-friendly methods to compress a video and cut back the file dimension, FFmpeg offers you professional-grade management totally free. To unlock this energy, it’s important to assume like a chef following a recipe relatively than a consumer clicking a button. Each instruction follows a easy “sentence” construction: you name the chef (ffmpeg), present the elements (utilizing -i to establish your enter file), give the cooking directions (like -c:v libx265 to shrink the video), and identify the completed plate (your output file).
What that truly means in observe is that you would be able to take a 4GB trip video, run it by way of FFmpeg utilizing the H.265 (HEVC) encoder, and are available out the opposite aspect with a file that’s roughly half the dimensions and almost equivalent in visible high quality. The magic command appears to be like like this:
ffmpeg -i enter.mp4 -c:v libx265 -crf 28 output.mp4. The -crf flag (Fixed Price Issue) controls high quality on a scale from 0 to 51. Whereas 0 is mathematically lossless and 51 is extraordinarily compressed, values between 24 and 30 hit the candy spot for many content material, balancing file dimension and readability completely.
As soon as your command is about, you press Enter and let FFmpeg work its magic. Paid instruments cost you for this characteristic with a prettier interface, however FFmpeg simply does it.
Earlier than you run that command, be sure to are in the proper folder. Since my terminal on Home windows says PS C:UsersOluwademilade>, my video file must be sitting straight in my Person folder. The video I used for example within the screenshot above is on my Desktop, so I ran this command first to maneuver to that folder: cd Desktop
You may convert totally different file varieties
For video and audio alike
There’s a complete ecosystem of apps, some free to attempt to some paid, that exist purely to transform video and audio recordsdata between codecs. fre:ac, dBpoweramp, and Handbrake are in style for good purpose, however none of them provide one thing FFmpeg doesn’t. The distinction is that FFmpeg by no means caps your library dimension, by no means provides a watermark to your output, and by no means asks on your bank card.
If you happen to do not wish to use an online device to transform media recordsdata to different codecs on-line, FFmpeg helps a variety of multimedia codecs domestically. If you happen to’re changing a lossless WAV file to a compact, high-quality FLAC or to a streaming-friendly MP3, the usual recipes for these are:
ffmpeg -i enter.wav -c:a flac output.flac ffmpeg -i enter.wav -c:a libmp3lame -b:a 320k output.mp3 Nonetheless, the case for utilizing FFmpeg is arguably even stronger for video recordsdata. Excessive-resolution video is the largest “storage hog” on any laborious drive. Whereas paid converters would possibly provide a easy slider for “high quality,” FFmpeg offers you professional-grade management to shrink large 4K recordsdata into environment friendly H.265 codecs with out shedding crisp element. It additionally performs “remuxing,” which is the digital equal of adjusting a file’s garments with out touching its physique. If you happen to continuously must convert an MKV to MP4 in Home windows, you possibly can bypass heavy encoding apps and simply use the command:
ffmpeg -i enter.mkv -c copy output.mp4 On this case, FFmpeg is just shifting the video knowledge into a brand new container relatively than rebuilding it.
Clear up noisy audio
Like a finances model of Adobe Audition
Adobe Audition’s noise discount instruments are actually good. They’re additionally hooked up to a Inventive Cloud subscription. iZotope RX, the skilled audio restore suite, will run you a whole lot of {dollars}. Whereas Audacity helps podcast audio creation and enhancing, FFmpeg presents native audio filters that carry out related duties straight from the command line. FFmpeg features a noise discount filter referred to as afftdn that allows you to set the noise discount in dB (0.01 to 97), set a noise ground, and allow automated noise ground monitoring. For a fast cleanup of background hiss on a recorded voice, this command applies the FFT denoising filter:
ffmpeg -i enter.mp3 -af “afftdn=nf=-25” output.mp3 It won’t substitute knowledgeable mastering session, however should you’re after cleansing up your podcasts, assembly recordings, or making an attempt to reinforce the sound high quality of your voice recordings to take away a fan buzzing behind your microphone, it’s a utterly free and helpful repair. The filter additionally helps impulsive noise removing, spectral compression, and dynamic vary management, options that usually include a hefty price ticket elsewhere.
The case for FFmpeg is simply as robust should you’re a video creator. Excessive-resolution video typically suffers from “digital noise” or grain, particularly in low-light photographs. As an alternative of paying for costly denoising plugins, you should use FFmpeg’s hqdn3d or nlmeans filters to wash up grainy footage and considerably enhance compression effectivity. For instance, a easy command like ffmpeg -i enter.mp4 -vf “hqdn3d=1.5:1.5:6:6” output.mp4 can easy out distracting visible artifacts, making your movies look extra skilled for zero additional price.
Stamp your model on each video
With out paying a watermarking service to do it
Watermarking instruments are inclined to fall into two camps: low-cost apps that produce ugly, poorly positioned overlays, and polished providers that cost per video or per 30 days. FFmpeg skips each of these by providing you with pixel-level management over the place your emblem or textual content sits, how clear it’s, and the way lengthy it stays on display screen.
To position a picture watermark within the bottom-right nook with 10-pixel padding, the command is:
ffmpeg -i enter.mp4 -i emblem.png -filter_complex “overlay=W-w-10:H-h-10” output.mp4 For a clear textual content watermark, the drawtext filter permits for customized fonts and opacity:
ffmpeg -i enter.mp4 -vf “drawtext=textual content=”Your Model”:fontsize=24:fontcolor=white@0.5:x=10:y=10″ output.mp4
On Home windows, the drawtext filter typically wants the precise path to the font file (e.g., fontfile=”C:/Home windows/Fonts/arial.ttf”) to work accurately. Additionally, in contrast to easy format adjustments, watermarking requires re-encoding the video as a result of it bodily adjustments the pixels. Utilizing -c:v libx264 -crf 20 alongside your watermark ensures professional-quality output.
FFmpeg’s distinctive capabilities embody including watermarks to video recordsdata, and that sentence undersells it significantly. You may animate the watermark throughout the body, time it to look solely throughout particular segments, or chain it right into a batch script so each video in a folder will get branded in a single cross.
Pull the audio out of any video file
No person has to know you used a free device
When you’ve got ever puzzled how you can extract audio from an MP4 or YouTube video with out shedding constancy, right here is how you can do it whereas holding it in its unique, untouched format:
ffmpeg -i enter.mp4 -vn -c:a duplicate output.m4a The -vn flag drops the video stream completely. The -c:a duplicate flag tells FFmpeg to not re-encode the audio, which implies zero high quality loss and really quick processing because the audio knowledge is just lifted out of the container and positioned into a brand new one. If you happen to want a selected format like MP3 for higher compatibility, the command adjustments barely to:
ffmpeg -i enter.mp4 -vn -c:a libmp3lame -b:a 192k output.mp3
Time to cancel these conversion subscriptions
FFmpeg works on Home windows, Mac, and Linux, so whether or not you’re on a piece machine or a private one, the instructions and outcomes are the identical. So why not hearth it up, and get to work?

