Skip to content

Commit 057af69

Browse files
committed
update vaapi
1 parent ca9cb1f commit 057af69

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
- name: Checkout code
1616
uses: actions/checkout@v2
1717

18+
- name: install libva-drm2
19+
run: |
20+
apt update
21+
apt install -y libva-drm2
22+
1823
- name: build ffmpeg
1924
run: |
2025
while sleep 300; do echo "=====[ $SECONDS seconds still running ]====="; done &

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ $ sudo docker run --gpus all ffmpeg-cuda -hwaccel cuvid -c:v h264_cuvid -i https
172172

173173
If you want to enable CUDA, please refer to [these](#Cuda-installation) and install the SDK.
174174

175+
If you want to enable Vaapi, please refer to [these](#Vaapi-installation) and install the driver.
176+
175177
```bash
176178
$ ./build-ffmpeg --build
177179
```

build-ffmpeg

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,11 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
590590

591591
# Vaapi doesn't work well with static links ffmpeg.
592592
if [ -z "$LDEXEFLAGS" ]; then
593-
if library_exists "libdrm" ; then
593+
if library_exists "libva" ; then
594594
if build "libpciaccess"; then
595595
download "https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/archive/libpciaccess-0.16/libpciaccess-libpciaccess-0.16.tar.bz2" "libpciaccess-0.16.tar.bz2"
596596
execute autoreconf --force --verbose --install
597-
execute ./configure --prefix="${WORKSPACE}" --disable-static --enable-shared CFLAGS=-fPIC
597+
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static CFLAGS=-fPIC
598598
execute make -j $MJOBS
599599
execute make install
600600
build_done "libpciaccess"
@@ -617,14 +617,6 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
617617
execute make install
618618
build_done "libva"
619619
fi
620-
621-
if build "intel-vaapi-driver"; then
622-
download "https://github.com/intel/intel-vaapi-driver/releases/download/2.4.1/intel-vaapi-driver-2.4.1.tar.bz2"
623-
execute ./configure --prefix="${WORKSPACE}" --disable-static --enable-shared
624-
execute make -j $MJOBS
625-
execute make install
626-
build_done "intel-vaapi-driver"
627-
fi
628620
CONFIGURE_OPTIONS+=("--enable-vaapi")
629621
fi
630622
fi

cuda-centos.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ FROM nvidia/cuda:11.1-devel-centos${VER} AS build
44

55
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
66

7-
RUN yum groupinstall -y "Development Tools" \
8-
&& yum install -y kernel-devel kernel-headers curl python3 vaapi-driver-i965 \
7+
RUN yum group install -y "Development Tools" \
8+
&& yum install -y curl python3 libva \
99
&& rm -rf /var/cache/yum/* \
1010
&& yum clean all
1111

cuda-ubuntu.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM nvidia/cuda:11.1-devel-ubuntu${VER} AS build
55
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
66

77
RUN apt-get update \
8-
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates python3 i965-va-driver \
8+
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates python3 libva-drm2 \
99
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
1010
&& update-ca-certificates
1111

0 commit comments

Comments
 (0)