-
-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathbuild-ffmpeg-nvidia.sh
More file actions
executable file
·39 lines (32 loc) · 916 Bytes
/
Copy pathbuild-ffmpeg-nvidia.sh
File metadata and controls
executable file
·39 lines (32 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
# This script is intended for bare-metal installations.
# It builds ffmpeg and NVENC drivers from source.
apt-get remove -y ffmpeg
apt-get update
apt-get install -y \
sudo curl wget \
autoconf libtool libdrm-dev xorg xorg-dev openbox \
libx11-dev libgl1-mesa-glx libgl1-mesa-dev \
xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev \
libxkbcommon-x11-dev libxcb-dri3-dev \
cmake git nasm build-essential \
libx264-dev \
libffmpeg-nvenc-dev clang
git clone --branch sdk/11.1 https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
sudo make install
cd ..
git clone --depth 1 --branch n5.1.3 https://github.com/FFmpeg/FFmpeg
cd FFmpeg
./configure \
--enable-nonfree \
--enable-gpl \
--enable-libx264 \
--enable-nvenc \
--enable-ffnvcodec \
--enable-cuda-llvm
make -j"$(nproc)"
sudo make install
sudo ldconfig
cd ..