FFmpeg: The complete open-source solution for processing video and audio files
Sun May 10 5:50 pm EDT 2026xtmci@atomicmail.io
Table of Contents
- Installing FFmpeg on Windows 11
- How to increase the volume level of an audio file
- How to create a sine wave mp3 file
- How to convert a WAV file to an MP3 format
- Creating a single solid color video with an audio track
- Hiding the build-information banner
- How to close ffplay automatically
Installing FFmpeg on Windows 11
To install the FFmpeg, go to its official website and download the latest version of the installer file. Its name should be something like this:
ffmpeg-2026-04-30-git-cc3ca17127-essentials_build.7z
Extract the downloaded file with 7-Zip. Change the name of the extracted folder to ffmpeg and move the folder to your system's root directory.
To run ffmpeg commands without entering their full path names, you should add C:\ffmpeg\bin folder to the PATH environment variable. The following command will do the trick for you:
setx PATH "%PATH%;C:\ffmpeg\bin"
To verify the installation, try printing the version information of the FFmpeg:
ffmpeg -version
How to increase the volume level of an audio file
Use the volume audio filter. The following command increases the volume of input file by 20 decibels:
ffmpeg -i input.mp3 -filter:a "volume=20dB" output.mp3
-iSpecifies the input file.-filter:aApplies the following audio filter to the output file.volume=The audio filter.
How to create a sine wave mp3 file
Use the sine source filter as a virtual audio input. The following command generates 5 second mp3 file with a 440 Hz tone:
ffmpeg -f lavfi -i "sine=frequency=440:sample_rate=48000" -t 5 output.mp3
-f lavfiTells FFmpeg to use thelibavfilter.-iUsually, specifies an input file. In this specific case, it specifies thesinesource filter as a virtual input.frequency=440Sets the sound tone to 440 Hz.sample_rate=48000Sets the audio sample rate, measured in Hz.-tSets the duration of the output file in seconds.
How to convert a WAV file to an MP3 format
Use FFmpeg with some basic options. The following command converts an WAV file to a new stereo MP3 file.
ffmpeg -i input.wav -b:a 128k -ac 2 output.mp3
-iSpecifies an input file.-b:aSet a bitrate. Common bitrates include 128, 192, and 320, measured inkbps.-acSets the number of channels. Setting-ac 2results in a stereo output.
Creating a single solid color video with an audio track
Use the color source filter as a virtual video input. For example, the following command generate a video with a solid navy color background and an audio track:
ffmpeg -f lavfi -i color=c=navy:s=1920x1080:r=10 -i input.mp3 -c:v libx264 -c:a copy -shortest output.mp4
The breakdown of options follows:
-f lavfiTells FFmpeg to use thelibavfilter.-iSpecifies thecolorsource filter as a virtual video input.c=navySets the color with common color names such as red, green, or blue. You can also use hex codes like#FF0000.s=1920x1080Specifies the video resolution measured ashorizontal x verticalpixels.r=10Sets the frame rate of the video, measured in frames per second (FPS).- Another
-ispecifies the input audio file. -c:vSpecifies the codec for encoding the video stream.libx264means H.264/MPEG-4 codec.-c:a copySpecifies an audio codec, in general. In this specific case, it tells FFmpeg just to copy the audio stream without encoding it.-shortestTells FFmpeg to stop processing when the shortest input ends. In other words, it sets the length of output to the length of the shortest input.
Hiding the build-information banner
Add the -hide_banner switch to your ffmpeg command:
ffmpeg -hide_banner -i input.wav output.mp3
-hide_bannerSuppresses the output of FFmpeg build information and copyright notice on a command startup.
How to close ffplay automatically
By default, ffplay remains open when a media file finishes playing. To close it automatically, use the -autoexit switch:
ffplay -autoexit sample.mp4