Skip to content

Commit 02154b0

Browse files
ryanwclark1wader
authored andcommitted
Added Hardware Decoding with VAAPI and QSV
LibVA - implementation for VAAPI LibVPL - Intel Video Processing Library
1 parent cab74fb commit 02154b0

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

Dockerfile

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ RUN apk add --no-cache $APK_OPTS \
4848
xz-dev xz-static \
4949
python3 py3-packaging \
5050
linux-headers \
51-
curl
51+
curl \
52+
libdrm-dev
5253

5354
# linux-headers need by rtmpdump
5455
# python3 py3-packaging needed by glib
55-
56+
5657
# -O3 makes sure we compile with optimization. setting CFLAGS/CXXFLAGS seems to override
5758
# default automake cflags.
5859
# -static-libgcc is needed to make gcc not include gcc_s as "as-needed" shared library which
@@ -1044,6 +1045,51 @@ RUN \
10441045
--enable-static && \
10451046
make -j$(nproc) install
10461047

1048+
# requires libdrm
1049+
# bump: libva /LIBVA_VERSION=([\d.]+)/ https://github.com/intel/libva.git|^2
1050+
# bump: libva after ./hashupdate Dockerfile LIBVA $LATEST
1051+
# bump: libva link "Changelog" https://github.com/intel/libva/blob/master/NEWS
1052+
ARG LIBVA_VERSION=2.22.0
1053+
ARG LIBVA_URL="https://github.com/intel/libva/archive/refs/tags/${LIBVA_VERSION}.tar.gz"
1054+
ARG LIBVA_SHA256=467c418c2640a178c6baad5be2e00d569842123763b80507721ab87eb7af8735
1055+
RUN \
1056+
wget $WGET_OPTS -O libva.tar.gz "$LIBVA_URL" && \
1057+
echo "$LIBVA_SHA256 libva.tar.gz" | sha256sum -c - && \
1058+
tar $TAR_OPTS libva.tar.gz && cd libva-* && \
1059+
meson setup build \
1060+
-Dbuildtype=release \
1061+
-Ddefault_library=static \
1062+
-Ddisable_drm=false \
1063+
-Dwith_x11=no \
1064+
-Dwith_glx=no \
1065+
-Dwith_wayland=no \
1066+
-Dwith_win32=no \
1067+
-Dwith_legacy=[] \
1068+
-Denable_docs=false && \
1069+
ninja -j$(nproc) -vC build install
1070+
1071+
# bump: libvpl /LIBVPL_VERSION=([\d.]+)/ https://github.com/intel/libvpl.git|^2
1072+
# bump: libvpl after ./hashupdate Dockerfile LIBVPL $LATEST
1073+
# bump: libvpl link "Changelog" https://github.com/intel/libvpl/blob/main/CHANGELOG.md
1074+
ARG LIBVPL_VERSION=2.13.0
1075+
ARG LIBVPL_URL="https://github.com/intel/libvpl/archive/refs/tags/v${LIBVPL_VERSION}.tar.gz"
1076+
ARG LIBVPL_SHA256=1c740e2b58f7853f56b618bdb7d4a7e5d37f8c1a9b30105a0b79ba80873e1cbd
1077+
RUN \
1078+
wget $WGET_OPTS -O libvpl.tar.gz "$LIBVPL_URL" && \
1079+
echo "$LIBVPL_SHA256 libvpl.tar.gz" | sha256sum -c - && \
1080+
tar $TAR_OPTS libvpl.tar.gz && cd libvpl-* && \
1081+
cmake -B build \
1082+
-G"Unix Makefiles" \
1083+
-DCMAKE_BUILD_TYPE=Release \
1084+
-DCMAKE_VERBOSE_MAKEFILE=ON \
1085+
-DCMAKE_INSTALL_LIBDIR=lib \
1086+
-DCMAKE_INSTALL_PREFIX=/usr/local \
1087+
-DBUILD_SHARED_LIBS=OFF \
1088+
-DBUILD_TESTS=OFF \
1089+
-DENABLE_WARNING_AS_ERROR=ON && \
1090+
cmake --build build -j$(nproc) && \
1091+
cmake --install build
1092+
10471093
# bump: ffmpeg /FFMPEG_VERSION=([\d.]+)/ https://github.com/FFmpeg/FFmpeg.git|*
10481094
# bump: ffmpeg after ./hashupdate Dockerfile FFMPEG $LATEST
10491095
# bump: ffmpeg link "Changelog" https://github.com/FFmpeg/FFmpeg/blob/n$LATEST/Changelog
@@ -1133,6 +1179,7 @@ RUN \
11331179
--enable-libzmq \
11341180
--enable-openssl \
11351181
--enable-libjxl \
1182+
--enable-libvpl \
11361183
|| (cat ffbuild/config.log ; false) \
11371184
&& make -j$(nproc) install
11381185

@@ -1192,10 +1239,12 @@ RUN \
11921239
libtheora: env.THEORA_VERSION, \
11931240
libtwolame: env.TWOLAME_VERSION, \
11941241
libuavs3d: env.UAVS3D_COMMIT, \
1242+
libva: env.LIBVA_VERSION, \
11951243
libvidstab: env.VIDSTAB_VERSION, \
11961244
libvmaf: env.VMAF_VERSION, \
11971245
libvo_amrwbenc: env.LIBVO_AMRWBENC_VERSION, \
11981246
libvorbis: env.VORBIS_VERSION, \
1247+
libvpl: env.LIBVPL_VERSION, \
11991248
libvpx: env.VPX_VERSION, \
12001249
libwebp: env.LIBWEBP_VERSION, \
12011250
libx264: env.X264_VERSION, \

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ alias ffprobe='docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" --ent
7373
- [libtheora](https://github.com/xiph/theora)
7474
- [libtwolame](https://github.com/njh/twolame)
7575
- [libuavs3d](https://github.com/uavs3/uavs3d)
76+
- [libva](https://github.com/intel/libva)
7677
- [libvidstab](https://github.com/georgmartius/vid.stab)
7778
- [libvmaf](https://github.com/Netflix/vmaf)
7879
- [libvo-amrwbenc](https://github.com/mstorsjo/vo-amrwbenc)
7980
- [libvorbis](https://github.com/xiph/vorbis)
81+
- [libvpl](https://github.com/intel/libvpl)
8082
- [libvpx](https://github.com/webmproject/libvpx)
8183
- [libwebp](https://chromium.googlesource.com/webm/libwebp)
8284
- [libx264](https://www.videolan.org/developers/x264.html)

0 commit comments

Comments
 (0)