-
-
Save pulsejet/4d81c1356703b2c8ba19c1ca9e6f6e50 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get remove -y libva ffmpeg | |
sudo apt-get install -y \ | |
autoconf libtool libdrm-dev xorg xorg-dev openbox \ | |
libx11-dev libgl1-mesa-glx libgl1-mesa-dev \ | |
xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev \ | |
libxkbcommon-x11-dev libxcb-dri3-dev \ | |
vim cmake git nasm build-essential | |
mkdir qsvbuild | |
cd qsvbuild | |
git clone --depth 1 --branch 2.17.0 https://github.com/intel/libva | |
cd libva | |
./autogen.sh | |
make | |
sudo make install | |
sudo ldconfig | |
cd .. | |
git clone --depth 1 --branch intel-gmmlib-22.3.4 https://github.com/intel/gmmlib | |
cd gmmlib | |
mkdir build && cd build | |
cmake .. | |
make -j"$(nproc)" | |
sudo make install | |
sudo ldconfig | |
cd ../.. | |
git clone --depth 1 --branch intel-media-22.6.6 https://github.com/intel/media-driver | |
mkdir -p build_media | |
cd build_media | |
cmake ../media-driver | |
make -j"$(nproc)" | |
sudo make install | |
sudo ldconfig | |
cd .. | |
git clone --depth 1 --branch n6.0 https://github.com/FFmpeg/FFmpeg | |
cd FFmpeg | |
./configure --enable-nonfree | |
make -j"$(nproc)" | |
sudo make install | |
sudo ldconfig | |
cd .. | |
cd .. | |
rm -rf qsvbuild | |
rm -rf /var/lib/apt/lists/* |
Running this exact Dockerfile:
FROM nextcloud:25
# Enable QSV support
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get install -y sudo curl git && \
rm -rf /var/lib/apt/lists/*
RUN curl https://gist.githubusercontent.com/pulsejet/4d81c1356703b2c8ba19c1ca9e6f6e50/raw/qsv-docker.sh | bash
results in a keyboard layout prompt during the build that can only be bypassed by including:
# Set DEBCONF_NONINTERACTIVE_SEEN to true
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
The final Dockerfile looks like this:
FROM nextcloud:25
# Set DEBCONF_NONINTERACTIVE_SEEN to true
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Enable QSV support
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get install -y sudo curl git && \
rm -rf /var/lib/apt/lists/*
RUN curl https://gist.githubusercontent.com/pulsejet/4d81c1356703b2c8ba19c1ca9e6f6e50/raw/qsv-docker.sh | bash
When I run with the latest version on Nextcloud:
FROM nextcloud:latest
# Enable QSV support
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get install -y sudo curl git && \
rm -rf /var/lib/apt/lists/*
RUN curl https://gist.githubusercontent.com/pulsejet/4d81c1356703b2c8ba19c1ca9e6f6e50/raw/qsv-docker.sh | bash
Within Memories Admin I see:
File Support:
ffmpeg preview binary not found. Thumbnail generation may not work for videos.
Video Streaming:
ffmpeg binary not found.
ffprobe binary not found.
So this is not intended to work with newer versions of Nextcloud or am I missing something?
@ChildLearningClub if you're using docker, I recommend using an external transcoder. The Dockerfile for go-vod
takes care of this issue directly.
A RUN
would create a separate layer IIRC. So all you need is ENV DEBIAN_FRONTEND=noninteractive
before the curl
okay, thank you @pulsejet
Thanks @lmgarret, updated.