PeerTube plugin to enable H264 NVENC and HEVC NVENC (experimental) https://nicecrew.tv
Go to file
2023-05-06 16:54:41 +02:00
src change from JS to TS, adapt to allow software decode 2023-05-06 16:54:41 +02:00
.gitignore change from JS to TS, adapt to allow software decode 2023-05-06 16:54:41 +02:00
LICENSE Add LICENSE 2021-04-07 08:26:24 +00:00
package-lock.json change from JS to TS, adapt to allow software decode 2023-05-06 16:54:41 +02:00
package.json change from JS to TS, adapt to allow software decode 2023-05-06 16:54:41 +02:00
README.md Update readme with up to date Dockerfile and docker-compose.yml 2023-04-27 09:16:34 +02:00

Hardware h264 encoding using vaapi

This plugin is a work in progress and use features not (yet) available in current version of Peertube. You can use this fork: https://github.com/TheoLeCalvar/PeerTube

For more information on vaapi and hardware acceleration:

Building a compatible docker image

Official docker images do not ship with required libraries for hardware transcode. You can build your own image with the following Dockerfile:

ARG VERSION=v4.2.0
FROM chocobozzz/peertube:${VERSION}-bullseye


# install dependencies for vaapi
RUN 	   apt update \
	&& apt install -y --no-install-recommends wget apt-transport-https \
	&& echo "deb http://deb.debian.org/debian/ $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) non-free" | tee /etc/apt/sources.list.d/non-free.list \
	&& apt update \
	&& apt install -y --no-install-recommends vainfo i965-va-driver-shaders \
	&& apt install -y --no-install-recommends python3 \
	&& rm /var/lib/apt/lists/* -fR

If you are using a recent Intel CPU (generation 8 and newer), replace i965-va-driver-shaders by intel-media-va-driver-non-free.

Running the docker image

In order to access the GPU inside docker, the docker-compose.yml should be adapted as follow. Note that you must find the id of the render group on your machine. You can use grep render /etc/group | cut -d':' -f3 to find the id.

version: "2"

services:
  peertube:
    # replace image key with
    build:
      context: .
      args:
        VERSION: v5.0.1
    # usual peertube configuration
    # ...

    # add these keys
    group_add:
      - <replace with the id of the render group>
    devices:
      # VAAPI Devices
      - /dev/dri:/dev/dri