Install FFmpeg on Raspberry Pi

Install FFmpeg on Raspberry Pi

FFmpeg is an open-source collection of tools for processing video and audio files. It allows to convert video and audio files from one format into another, resize videos, stream audio and video, and perform various other actions with media files.

This tutorial shows how to install FFmpeg on Raspberry Pi.

Install FFmpeg

Connect to Raspberry Pi via SSH. Execute the following commands to update the package lists and install FFmpeg:

sudo apt update
sudo apt install -y ffmpeg

When installation is finished, we can check version of FFmpeg:

ffmpeg -version

We can also check what encoders and decoders are available:

ffmpeg -encoders
ffmpeg -decoders

Testing FFmpeg

For testing, download sample video file from the Internet:

wget -O test.mp4 https://raw.githubusercontent.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4

Now run the ffmpeg command to convert MP4 video file format to MKV:

ffmpeg -i test.mp4 out.mkv

Uninstall FFmpeg

If you wish to completely remove FFmpeg and related dependencies, execute the following command:

sudo apt purge --autoremove -y ffmpeg

Leave a Comment

Cancel reply

Your email address will not be published.