Skip to content

Commit 56b656c

Browse files
authored
fix hardware video encoding and add support for intel gpus (#3)
1 parent 725f0f5 commit 56b656c

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

get-dependencies.sh

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
#!/bin/sh
22

33
set -ex
4-
5-
sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf
64
ARCH="$(uname -m)"
75

8-
if [ "$ARCH" = 'x86_64' ]; then
9-
PKG_TYPE='x86_64.pkg.tar.zst'
10-
else
11-
PKG_TYPE='aarch64.pkg.tar.xz'
12-
fi
13-
14-
LLVM_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/llvm-libs-nano-$PKG_TYPE"
15-
FFMPEG_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/ffmpeg-mini-$PKG_TYPE"
16-
LIBXML_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/libxml2-iculess-$PKG_TYPE"
17-
OPUS_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/opus-nano-$PKG_TYPE"
18-
MESA_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/mesa-mini-$PKG_TYPE"
19-
20-
echo "Installing dependencies..."
21-
echo "---------------------------------------------------------------"
226
pacman -Syu --noconfirm \
237
alsa-lib \
248
base-devel \
@@ -53,6 +37,26 @@ pacman -Syu --noconfirm \
5337
zlib \
5438
zsync
5539

40+
case "$ARCH" in
41+
'x86_64')
42+
PKG_TYPE='x86_64.pkg.tar.zst'
43+
pacman -Syu --noconfirm intel-media-driver
44+
;;
45+
'aarch64')
46+
PKG_TYPE='aarch64.pkg.tar.xz'
47+
;;
48+
''|*)
49+
echo "Unknown cpu arch: $ARCH"
50+
exit 1
51+
;;
52+
esac
53+
54+
LLVM_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/llvm-libs-nano-$PKG_TYPE"
55+
FFMPEG_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/ffmpeg-mini-$PKG_TYPE"
56+
LIBXML_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/libxml2-iculess-$PKG_TYPE"
57+
OPUS_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/opus-nano-$PKG_TYPE"
58+
MESA_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/mesa-mini-$PKG_TYPE"
59+
5660
echo "Installing debloated pckages..."
5761
echo "---------------------------------------------------------------"
5862
wget --retry-connrefused --tries=30 "$LLVM_URL" -O ./llvm-libs.pkg.tar.zst

gpu-screen-recorder-appimage.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ mkdir -p ./AppDir/share/icons/hicolor/32x32 && (
106106
./sharun -g
107107
)
108108

109+
# Make intel hardware accel work
110+
echo 'LIBVA_DRIVERS_PATH=${SHARUN_DIR}/shared/lib:${SHARUN_DIR}/shared/lib/dri' >> ./.env
111+
109112
# MAKE APPIAMGE WITH URUNTIME
110113
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime
111114
wget --retry-connrefused --tries=30 "$URUNTIME_LITE" -O ./uruntime-lite
@@ -124,7 +127,7 @@ echo "Generating AppImage..."
124127
-i ./AppDir -o ./gpu-screen-recorder-"$VERSION"-anylinux-"$ARCH".AppImage
125128

126129
UPINFO="$(echo "$UPINFO" | sed 's#.AppImage.zsync#*.AppBundle.zsync#g')"
127-
wget -O ./pelf "https://github.com/xplshn/pelf/releases/latest/download/pelf_$ARCH"
130+
wget -O ./pelf "https://github.com/xplshn/pelf/releases/latest/download/pelf_$ARCH"
128131
chmod +x ./pelf
129132
echo "Generating [dwfs]AppBundle..."
130133
./pelf --add-appdir ./AppDir \

0 commit comments

Comments
 (0)