Why You Shouldn't Use Microsoft Windows11.


LMDE5 - Linux Mint Debian Edition.

LMDE5 -...

Why Should I Not Use Windows10?

Here are a...

FFMPEG - Command-Line-Based Processing For Video And Audio Files


FFMPEG - Command-Line-Based Processing For Video And Audio Files.

FFmpeg is a vast software suite of libraries and programs for handling video, audio, and other multimedia files and streams. The core is the FFmpeg program itself is written in C and Assembler, designed for command-line-based processing of video and audio files.

Widely used for format transcoding, recording, basic editing (trimming and concatenation), video scaling, video post-production effects, and standards compliance (SMPTE, ITU). FFmpeg includes libavcodec, an audio/video codec library used by many commercial and free software products, libavformat (Lavf),[6] an audio/video container mux and demux library, and the core ffmpeg command line program for transcoding multimedia files.

The first version was released in December, 2000.

FFmpeg is a powerful CLI - based tool, that can do almost anything you can imagine with multimedia files.

License: LGPL 2.1+, GPL 2+
IMPORTANT: Unredistributable if compiled with NVIDIA Performance Primitives.

Version: 7:4.3.4-0+deb11u1 available in Debian 11 "Bullseye" repository.

For LMDE5 users, you can use the Software Manager to install the program.

How to install via a terminal window:

sudo apt-get install ffmpeg

Press Enter, done.

Note: I have removed how to build from source.

How to use FFMpeg:

Basic conversion of an audio file, lets say it is an mp3 file you want to convert to the .ogg-format, would look like this:

ffmpeg -i input.mp3 output.ogg

Press Enter.

Now change the input name to the file-name you want to convert and the output to the same, just with a different ending.

Press Enter, done.

With the .webm format you don't have to specify stream or container type, because FFMPEG will determine it for you automatically. But, depending on your container of choice, this won't always work.

Now the same command issued above also works with video-files:

ffmpeg -i input.avi output.mv4

Press Enter, done.

Matroska for example, is designed to handle almost any stream you care to put in them, whether they're valid or not. This means that it may result in a file with the same codecs as the input-file.

If you want to select which codec is used for the output-file in a Matroska file, then you can select the codecs required by simply using the -c flag.

Audio example:

ffmpeg -i input.mp3 -c:a libvorbis output.ogg

Video example:

ffmpeg -i input.mp4 -c:v vp9 -c:a libvorbis output.mkv

This will make a Matroska container with a VP9 video stream and a Vorbis audio stream, which is an open and royalty-free video coding format developed by Google.

Sometimes, the file you have is partially correct with only one single stream in the wrong format. It can be time consuming to re-encode it, thus use FFmpeg to help you out with this situation:

ffmpeg -i input.avi -c:v copy -c:a flac output.mkv

The above command copies the video stream from input.avi into output.mkv.

Change a container:

ffmpeg -i input.avi -c:av copy output.mkv

Set the quality of each stream:

The easy way is to change the bitrate, which can result in a different quality, however sometimes it only changes the file size.

To set the bitrate of each stream, you use the -b flag like this:

ffmpeg -i input.avi -c:a copy -c:v vp9 -b:v 1M output.mkv

Another way is to adjust the frame rate of the video using the -r option:

ffmpeg -i input.avi -c:a copy -c:v vp9 -r 30 output.mkv

A new Matroska is created with audio stream copied over and the video stream's frame rate forced to 30 frames per second, thus not using the frame rate from the input.

Adjust the dimensions of your video:

ffmpeg -i input.mkv -c:a copy -s hd720 output.mkv

This changes the video to 1280x720 in the output, but it is possible to set the width and height manually.

Change width and height manually:

ffmpeg -i input.mkv -c:a copy -s 1280x720 output.mkv

This gives you the exact same output as hd720 output.mkv.

However setting these values higher than the source will not improve the quality.

Like I said it is CLI-based, so converting a file to for example .mp4 might look like this and take some time.

It supports many other formats like:


MPEG-1 Part 2, H.261 (Px64),[26] H.262/MPEG-2 Part 2, H.263,[26] MPEG-4 Part 2, H.264/MPEG-4 AVC, HEVC/H.265[20] (MPEG-H Part 2), Motion JPEG, IEC DV video and CD+G. AV1, SMPTE 314M (a.k.a. DVCAM and DVCPRO), SMPTE 370M (a.k.a. DVCPRO HD), VC-1 (a.k.a. WMV3), VC-2 (a.k.a. Dirac Pro), VC-3 (a.k.a. AVID DNxHD), Animated GIF, AVS Video,Microsoft RLE, Microsoft Video 1, Cinepak, Indeo (v2, v3 and v5),[26] Microsoft MPEG-4 v1, v2 and v3, Windows Media Video (WMV1, WMV2, WMV3/VC-1), WMV Screen and Mimic codec,RTV 2.1 (Intel Indeo 2), RealVideo Fractal Codec (a.k.a. Iterated Systems ClearVideo), 1, 2, 3 and 4.

Cinepak (Apple Compact Video), ProRes, Sorenson 3 Codec, QuickTime Animation (Apple Animation), QuickTime Graphics (Apple Graphics), Apple Video, Apple Intermediate Codec and Pixlet, Screen video, Screen video 2, Sorenson Spark and VP6, Theora, Duck TrueMotion 1, Duck TrueMotion 2, Duck TrueMotion 2.0 Real Time, VP3, VP5,[26] VP6,[26] VP7, VP8, VP9 and animated WebP, Smacker video and Bink video.

TXD, Silicon Graphics RLE 8-bit video, Silicon Graphics MVC1/2, IBM UltiMotion, Avid 1:1x, Avid Meridien, Avid DNxHD and DNxHR, Autodesk Animator Studio Codec and FLIC,HQ, HQA, HQX and Lossless, SpeedHQ, APNG, Matrox Uncompressed SD (M101) / HD (M102), ATI VCR1/VCR2, ASUS V1/V2 codec.

Learn more at the developers website.

Debian Tracker

Developers website


Support Us By Donating A Small Amount

If you find this site helpful, please consider donating a small amount.
Please use our contact us form and we will give you the relevant information to make a donation.
We accept BitCoin and ZCash at the moment.

Games For Linux

Windows has always been the preferred platform for gaming, but after STEAM's interest in Linux more game developers are making their games natively available for Linux.


All information on this website is published in good faith and for general educational purposes and for use in safe testing environments only. While linuxexperten.com strives to make the information on this site as accurate as possible, linuxexperten.com does not warrant its completeness, reliability and accuracy.

We are not responsible for any losses or damages associated with the use of our website. While we strive to provide only links to useful websites, we have no control over the content of these sites and links to other sites do not constitute a recommendation for all content contained on these websites.


Site Information

This is a professional review site that receives compensation from the companies whose products reviewed. Each service or product are thoroughly tested and given high marks if considered to be the very best. Independently owned and the opinions expressed here are no one elses.


Limited Time Offers

NordVPN + 3 Months