Categories
Ubuntu

Install FFMPEG NVIDIA GPU in Ubuntu 24.10

Running FFMPEG with NVIDIA is blazing fast! Here is a quick way on how to install and make it run on NVIDIA and Ubuntu. First of all, if you have Ubuntu 24.10, you need to downgrade to 24.04. The reason because several libraries is not ready on the latest Ubuntu version.

Here is the steps

  1. Install required packages
sudo apt-get install build-essential yasm cmake libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev
sudo apt-get update -qq && sudo apt-get -y install \
  autoconf \
  automake \
  build-essential \
  cmake \
  git-core \
  libass-dev \
  libfreetype6-dev \
  libgnutls28-dev \
  libmp3lame-dev \
  libsdl2-dev \
  libtool \
  libva-dev \
  libvdpau-dev \
  libvorbis-dev \
  libxcb1-dev \
  libxcb-shm0-dev \
  libxcb-xfixes0-dev \
  meson \
  ninja-build \
  pkg-config \
  texinfo \
  wget \
  yasm \
  zlib1g-dev

2. Install FFMPEG needed libraries

sudo apt-get install nasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libopus-dev libdav1d-dev

3. Install NVCC version 12

https://developer.nvidia.com/cuda-downloads

4. Compile and Install

cd ~/Downloads/

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git

cd nv-codec-headers && sudo make install && cd -
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/

./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared

make -j 8

sudo make install

Done!

Leave a Reply

Your email address will not be published. Required fields are marked *