-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathffmpeg-mini.sh
82 lines (76 loc) · 1.35 KB
/
ffmpeg-mini.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh
set -ex
sudo pacman -S --noconfirm \
aom \
glslang \
gsm \
jack \
libass \
libavc1394 \
libbluray \
libbs2b \
libdvdnav \
libdvdread \
libiec61883 \
libjxl \
libmodplug \
libopenmpt \
libplacebo \
libraw1394 \
libsoxr \
libssh \
libtheora \
libva \
libvdpau \
libvpx \
libwebp \
ocl-icd \
onevpl \
opencore-amr \
rav1e \
rubberband \
sdl2 \
snappy \
speex \
srt \
v4l-utils \
vapoursynth \
vid.stab \
vulkan-icd-loader \
x264 \
xvidcore \
zeromq \
zimg
ARCH="$(uname -m)"
case "${ARCH}" in
"x86_64")
EXT="zst"
sudo pacman -S --noconfirm svt-av1 vmaf
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/ffmpeg.git ffmpeg
cd ./ffmpeg
;;
"aarch64")
EXT="xz"
git clone --depth 1 https://github.com/archlinuxarm/PKGBUILDs.git PKGBUILDs
mv ./PKGBUILDs/extra/ffmpeg ./
cd ./ffmpeg
sed -i "s/x86_64/${ARCH}/" ./PKGBUILD
;;
*)
echo "Unsupported Arch: '${ARCH}'"
exit 1
;;
esac
# remove x265 support and AV1 encoding support
sed -i -e '/x265/d' \
-e '/librav1e/d' \
-e '/--enable-libsvtav1/d' \
-e '/--enable-vapoursynth/d' ./PKGBUILD
cat ./PKGBUILD
makepkg -f --skippgpcheck
ls -la
rm -f ./ffmpeg-docs-*.pkg.tar.* ./ffmpeg-debug-*.pkg.tar.*
mv ./ffmpeg-*.pkg.tar.${EXT} ../ffmpeg-mini-${ARCH}.pkg.tar.${EXT}
cd ..
rm -rf ./ffmpeg
echo "All done!"