How to Install and Use FFmpeg on Debian 9. FFmpeg is a great tool to record, convert and stream audio and video.
This tutorial covers the steps required to install FFmpeg on Debian 9. We will use ffmpeg
Not using Debian 9? Choose a different OS:
This tutorial is tested on Google Cloud for automatic image and video processing.
Prerequisites
A Debian 9 system or server with sudo
privileges.
If you are using Google Cloud you need to have some additional requirements fulfilled.
- A running Compute Engine, see the Setting up Compute Engine Instance with Debian 9.
- Initial Debian Server Set up.
Install FFmpeg on Debian
01. Update the packages before starting.
sudo apt update
02. Install FFmpeg with the following command.
sudo apt install ffmpeg
03. Verify the installation.
ffmpeg -version
The output will be something similar to this.
Output
ffmpeg version 3.2.12-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
Now, FFmpeg is installed successfully and ready to be used.
FFmpeg Examples
In this part, we will look at some basic examples to use the ffmpeg
utility.
Basic conversion
While converting the audio and the video files ffmpeg
Convert a video file from webm
to mp4
ffmpeg -i input.webm output.mp4
Convert an audio file from ogg
to mp3
ffmpeg input.ogg output.mp3
Specifying codecs
You can also specify the codecs you want to use with -c
Convert a video file from webm
to mp4
using the libvpx
video codec and libvorbis
audio codec
ffmpeg -i input.webm -c:v libvpx -c:a libvorbis output.mp4
Convert an audio file from ogg
to mp3
encoded with the libopus
codec.
ffmpeg -i input.ogg -c:a libopus output.mp3
Conclusion
Now you have learned how to install FFmpeg on your Debian system.
Thanks for your time. If you face any problem or any feedback, just leave a comment below.
hi,
thanks for the information
it is very much useful for me
could u help me to transfer the file in root directory in cloud shell to my google drive or any other cloud drive
once again thanks for this tutorial