---
title: "How to Install FFmpeg on Ubuntu"
url: "https://ploi.io/documentation/server/how-to-install-ffmpeg-on-ubuntu"
published: "2024-01-25"
last_updated: "2026-06-15"
---

# How to Install FFmpeg on Ubuntu

In this guide, we'll walk you through the steps to install FFmpeg on your Ubuntu server. FFmpeg is a powerful multimedia framework that allows you to manage audio and video files in various formats. It's particularly useful for video conversions, streaming, and processing.

Pre-requisites
--------------

- A server managed by Ploi.
- SSH access to your server.
- Basic knowledge of command-line operations.

Step-by-step guide
------------------

### 1. SSH into your server

Connect to your server via SSH:

```
ssh user@your_server_ip
```

Replace `user` with your username and `your_server_ip` with your server's IP address.

### 2. Update your server

Update your server's package list:

```
sudo apt update && sudo apt upgrade -y
```

### 3. Install FFmpeg

```
sudo apt install ffmpeg -y
```

### 4. Verify the installation

```
ffmpeg -version
```

### 5. Using FFmpeg

Convert and process audio and video files. For example:

```
ffmpeg -i input.mp4 output.avi
```

Replace `input.mp4` with your source file and `output.avi` with the desired output file.

Integrating with Laravel packages
---------------------------------

### Using spatie/laravel-medialibrary

After installing FFmpeg, you can use it with [Spatie's Laravel MediaLibrary](https://github.com/spatie/laravel-medialibrary) for handling media in a Laravel application. This package can leverage FFmpeg to convert videos to different formats or generate thumbnails.

### Using protonemedia/laravel-ffmpeg

For more advanced video processing in Laravel, integrate FFmpeg with [ProtoneMedia's Laravel FFmpeg](https://github.com/protonemedia/laravel-ffmpeg). This package provides a fluent interface to FFmpeg and allows for complex video and audio processing directly within a Laravel application.