mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
ffmpeg5 and intel va driver
This commit is contained in:
parent
da637d3c8f
commit
75c2feb387
@ -46,7 +46,7 @@ RUN pip3 wheel --wheel-dir=/wheels -r requirements-wheels.txt
|
|||||||
FROM debian:11-slim
|
FROM debian:11-slim
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
ARG JELLYFIN_FFMPEG_VERSION=4.3.2-1
|
ARG JELLYFIN_FFMPEG_VERSION=5.0.1-4
|
||||||
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
|
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
# http://stackoverflow.com/questions/48162574/ddg#49462622
|
# http://stackoverflow.com/questions/48162574/ddg#49462622
|
||||||
@ -73,6 +73,8 @@ RUN apt-get -qq update \
|
|||||||
&& apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \
|
&& apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \
|
||||||
&& echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
|
&& echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
|
||||||
&& echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \
|
&& echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \
|
||||||
|
# enable non-free repo
|
||||||
|
&& sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list \
|
||||||
&& apt-get -qq update \
|
&& apt-get -qq update \
|
||||||
&& apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
&& apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
||||||
# coral drivers
|
# coral drivers
|
||||||
@ -81,10 +83,10 @@ RUN apt-get -qq update \
|
|||||||
# arch specific packages
|
# arch specific packages
|
||||||
&& if [ "${TARGETARCH}" = "amd64" ]; then \
|
&& if [ "${TARGETARCH}" = "amd64" ]; then \
|
||||||
# jellyfin-ffmpeg
|
# jellyfin-ffmpeg
|
||||||
wget -O /tmp/jellyfin.deb "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/${JELLYFIN_FFMPEG_VERSION}/jellyfin-ffmpeg_${JELLYFIN_FFMPEG_VERSION}-$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )_$( dpkg --print-architecture ).deb" \
|
wget -O jellyfin.deb "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/${JELLYFIN_FFMPEG_VERSION}/jellyfin-ffmpeg5_${JELLYFIN_FFMPEG_VERSION}-$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )_$( dpkg --print-architecture ).deb" \
|
||||||
&& apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
&& apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
||||||
mesa-va-drivers /tmp/jellyfin.deb \
|
mesa-va-drivers intel-media-va-driver-non-free ./jellyfin.deb \
|
||||||
&& rm /tmp/jellyfin.deb; else \
|
&& rm jellyfin.deb; else \
|
||||||
apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
||||||
ffmpeg; \
|
ffmpeg; \
|
||||||
fi \
|
fi \
|
||||||
|
@ -12,33 +12,21 @@ Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
hwaccel_args:
|
hwaccel_args: -c:v h264_v4l2m2m
|
||||||
- -c:v
|
|
||||||
- h264_v4l2m2m
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Intel-based CPUs (<10th Generation) via Quicksync
|
### Intel-based CPUs (<10th Generation) via Quicksync
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
hwaccel_args:
|
hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
|
||||||
- -hwaccel
|
|
||||||
- vaapi
|
|
||||||
- -hwaccel_device
|
|
||||||
- /dev/dri/renderD128
|
|
||||||
- -hwaccel_output_format
|
|
||||||
- yuv420p
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Intel-based CPUs (>=10th Generation) via Quicksync
|
### Intel-based CPUs (>=10th Generation) via Quicksync
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
hwaccel_args:
|
hwaccel_args: -hwaccel qsv -qsv_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
|
||||||
- -hwaccel
|
|
||||||
- qsv
|
|
||||||
- -qsv_device
|
|
||||||
- /dev/dri/renderD128
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver
|
### AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver
|
||||||
@ -47,11 +35,7 @@ ffmpeg:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
hwaccel_args:
|
hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
|
||||||
- -hwaccel
|
|
||||||
- vaapi
|
|
||||||
- -hwaccel_device
|
|
||||||
- /dev/dri/renderD128
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### NVIDIA GPU
|
### NVIDIA GPU
|
||||||
@ -91,13 +75,13 @@ A list of supported codecs (you can use `ffmpeg -decoders | grep cuvid` in the c
|
|||||||
V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)
|
V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, for H265 video (hevc), you'll select `hevc_cuvid`.
|
For example, for H264 video, you'll select `h264_cuvid`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
hwaccel_args:
|
hwaccel_args:
|
||||||
- -c:v
|
- -c:v
|
||||||
- hevc_cuvid
|
- h264_cuvid
|
||||||
```
|
```
|
||||||
|
|
||||||
If everything is working correctly, you should see a significant improvement in performance.
|
If everything is working correctly, you should see a significant improvement in performance.
|
||||||
|
Loading…
Reference in New Issue
Block a user