notes/RK3568/移远/系统环境配置(编译FFmpeg).md

47 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2024-04-29 22:22:30 +08:00
### 系统环境配置(编译FFmpeg)
2023-11-11 13:41:44 +08:00
#### 编译环境配置
```
apt updata
apt upgrade
2024-01-22 18:24:59 +08:00
apt -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev
2024-03-13 16:34:53 +08:00
apt -y install nasm yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev
2023-11-11 13:41:44 +08:00
```
#### 解压
```
tar -xvf ffmpeg-4.2.9.tar.xz
cd ffmpeg-4.2.9/
2024-03-13 16:34:53 +08:00
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads
2024-01-22 18:24:59 +08:00
make -j4 && make install
2023-11-11 13:41:44 +08:00
```
#### 添加环境变量
* 在 /etc/profile 文件最后一行添加
```
export PATH=/usr/local/ffmpeg/bin:$PATH
```
* 设置生效
```
source /etc/profile
```
* 在 /etc/ld.so.conf 文件最后一行添加
```
/usr/local/ffmpeg/lib/
```
* 设置生效
```
ldconfig
2024-03-13 16:34:53 +08:00
```