Red Hat系列的发行版影音软件都很差,所以我就自己编译。
我看电影用mpv。我最初的做法是这样的:
先一些基础包,
dnf install libass-devel mesa-libGLES-devel libwebp-devel libtheora-devel libvpx-devel libvorbis-devel yasm pulseaudio-libs-devel libvdpau-devel alsa-lib-devel libguess-devel libXScrnSaver-devel libv4l-devel libuuid-devel libbs2b-devel ladspa-devel perl-Math-BigRat.noarch luajit-devel libbluray-devel enca-devel opus-devel mesa-libGL-devel libXrandr-devel libXinerama-devel libXv-devel openssl-devel samba-devel nasm SDL2-devel freetype-devel fontconfig-devel pulseaudio-libs-devel libarchive-devel libsmbclient-devel libcdio-devel mesa-libgbm-devel nv-codec-headers.noarch openjpeg2-devel.x86_64 speex-devel.x86_64 gtk4-devel.x86_64
然后编译fdk-aac/lsmash/mp3/gpac/x264/x265:
fdk-aac:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/fdk-aac.html
./configure --libdir=/usr/lib64 --sysconfdir=/etc --prefix=/usr CXXFLAGS="-std=c++98 -ggdb3 -O3 -mtune=native"
lsmash:
https://github.com/l-smash/l-smash/releases
./configure --libdir=/usr/lib64 --prefix=/usr
mp3:
https://downloads.sourceforge.net/lame/lame-3.100.tar.gz
./configure --prefix=/usr --libdir=/usr/lib64 --enable-mp3x --enable-mp3rtp --disable-static
gpac:
https://github.com/gpac/gpac/archive/refs/tags/v2.2.1.tar.gz
x264:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/x264.html
./configure --libdir=/usr/lib64 --prefix=/usr --enable-static --enable-pic
x265:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/x265.html
mkdir bld
cd bld
cmake -DENABLE_PIC=ON -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=lib64 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_SHARED=OFF ../source
然后安装
https://github.com/FFmpeg/nv-codec-headers, 编译ffmpeg并启用nvenc/nvdec,然后编译mpv
--
FROM 107.139.34.*