Installing and configuring FFmpeg on Debian/AlmaLinux

Installing and Configuring FFmpeg on Debian/AlmaLinux

FFmpeg is a powerful open-source framework for handling multimedia files, including recording, converting, and streaming audio and video. Here’s how to install and configure FFmpeg on Debian and AlmaLinux systems.

Installing FFmpeg on Debian

  1. Update Package Lists

    First, update the package lists to ensure you get the latest versions available:

    bash
    sudo apt update
  2. Install FFmpeg

    Install FFmpeg using the following command:

    bash
    sudo apt install ffmpeg
  3. Verify Installation

    After installation, you can verify that FFmpeg is correctly installed by checking its version:

    bash
    ffmpeg -version

Installing FFmpeg on AlmaLinux

  1. Update Package Lists

    Update your package lists to make sure you have the latest information:

    bash
    sudo dnf update
  2. Install EPEL Repository

    Install the EPEL (Extra Packages for Enterprise Linux) repository, which provides additional packages:

    bash
    sudo dnf install epel-release
  3. Install RPM Fusion Repository

    Install the RPM Fusion repository to access additional software packages:

    bash
    sudo dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
  4. Install FFmpeg

    Install FFmpeg and its development libraries:

    bash
    sudo dnf install ffmpeg ffmpeg-devel
  5. Verify Installation

    Check the installation by running:

    bash
    ffmpeg -version

Configuring FFmpeg

Once installed, FFmpeg can be used for various multimedia tasks. Here are some basic commands to get you started:

  • Convert a Video File

    Convert an MP4 video to AVI format:

    bash
    ffmpeg -i input.mp4 output.avi
  • Extract Audio from Video

    Extract audio from an MP4 file and save it as an MP3:

    bash
    ffmpeg -i input.mp4 -q:a 0 -map a output.mp3
  • Resize a Video

    Resize a video to 1280x720 resolution:

    bash
    ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4
  • Create a GIF from a Video

    Create a GIF from an MP4 video:

    bash
    ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" -gifflags +transdiff -y output.gif
  • Stream Video with FFmpeg

    Stream a video to a server using RTMP:

    bash
    ffmpeg -re -i input.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -vf "scale=1280:720" -g 50 -c:a aac -b:a 128k -ar 44100 -f flv rtmp://your-streaming-server/live/streamkey

These commands will help you start working with FFmpeg. For more advanced scenarios and configurations, refer to the official FFmpeg documentation.

  • vps, ffmpeg, debian, almalinux
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Корпоративная почта на базе собственного домена

Корпоративная почта на собственном домене не только придаёт профессиональный...

Установка и настройка Rclone

Rclone — это мощный инструмент командной строки для управления файлами на облачных хранилищах....

Apache vs Nginx: what’s the difference, how to Install, and which one to choose?

When choosing a web server for your project, Apache and Nginx often come into focus. Both of...

HTTP Errors: common causes and how to fix them

Error 403: ForbiddenDescription: The server understands the request but refuses to fulfill it....

Let's Encrypt without a control panel

Let's Encrypt SSL Certificates: How to Install and Set Up Free Automated Encryption Let's...

Powered by WHMCompleteSolution