| Code Block |
|---|
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y lsb-release
cat <<EOF >/etc/apt/sources.list
deb http://debian.volia.net/debian $(lsb_release -sc) main contrib non-free
deb-src http://debian.volia.net/debian $(lsb_release -sc) main contrib non-free
deb http://mirror.mirohost.net/debian-security $(lsb_release -sc)-security main contrib non-free non-free-firmware
deb-src http://mirror.mirohost.net/debian-security $(lsb_release -sc)-security main contrib non-free
deb http://debian.netforce.hosting/debian $(lsb_release -sc)-updates main contrib non-free non-free-firmware
deb-src http://debian.netforce.hosting/debian $(lsb_release -sc)-updates main contrib non-free
EOF
cd ~
apt-get update
apt-get install -y sudo vim git wget exiftool vainfo intel-media-va-driver-non-free ffmpeg
wget -O /tmp/jellyfin-ffmpeg.deb https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v8.1.3-1/jellyfin-ffmpeg8_8.1.3-1-$(lsb_release -sc)_amd64.deb
apt-get install -y /tmp/jellyfin-ffmpeg.deb && rm /tmp/jellyfin-ffmpeg.deb
groupadd -g 993 render
groupadd -g 109 render2
usermod -a -G video www-data
usermod -a -G render www-data
usermod -a -G render2 www-data
# Prepare build libde265 and libhief
apt-get install -y build-essential autoconf libtool
apt-get build-dep -y imagemagick libmagickcore-dev libde265 libheif
# Get sources of libde265 and libhief
cd /usr/src/
git clone --depth 1 --branch v1.1.3 https://github.com/strukturag/libde265.git
git clone --depth 1 --branch v1.23.7 https://github.com/strukturag/libheif.git
# libde265
cd libde265/
mkdir build
cd build
cmake ..
make
make install
# libhief
cd /usr/src/libheif/
mkdir build
cd build
cmake --preset=release ..
make -j 6
make install
# ImageMagic 7
cd /usr/src/
git clone --depth 1 --branch 7.1.2-32 https://github.com/ImageMagick/ImageMagick.git ImageMagick-7
cd ImageMagick-7*
./configure --with-heic=yes
make -j 6
make install
ldconfig
# imagic-php
cd /usr/src/
wget http://pecl.php.net/get/imagick-3.8.1.tgz
tar -xvzf imagick-3.8.1.tgz
cd imagick-*/
phpize
./configure
make -j 6
make install
#some tuning
echo "LimitRequestBody 0" > /etc/apache2/conf-enabled/apache-limits.conf
sed -i '/memory_limit/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/upload_max_filesize/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/post_max_size/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/max_execution_time/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/max_input_time/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/max_file_uploads/d' /usr/local/etc/php/conf.d/nextcloud.ini
echo "memory_limit=15G" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "upload_max_filesize=100G" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "post_max_size=100G" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "max_execution_time = 3600" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "max_input_time = 3600" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "max_file_uploads = 1000" >>/usr/local/etc/php/conf.d/nextcloud.ini
service apache2 reload
# some checks
echo "--------------------------------------- PHP Imagick ---------------------------"
php -r 'phpinfo();' |grep ImageMagick
echo "--------------------------------------- Imagick -------------------------------"
convert -version
echo "--------------------------------------- VAinfo --------------------------------"
vainfo
echo "--------------------------------------- ffmpeg --------------------------------"
ffmpeg -codecs |grep -e 265 -e 264
echo "--------------------------------------- ffmpeg-Jellyfin -----------------------"
/usr/lib/jellyfin-ffmpeg/ffmpeg -codecs|grep -e 265 -e 264
|
Page History
Overview
Content Tools