This is a fork of PeerTube with a modified runner and job queue. These changes enable HLS transcoding with SVT-AV1 and provide an H.264 fallback for web videos.
-
Deploy Peertube
You may follow official installation instructions, but make sure to use newest
ilfarpro/peertubeimage or other version of it. Vistit image repository to see all available tags.Once you done with this, make changes described below.
-
Recommended Transcoding settings
- Enable legacy web-video transcoding to provide fallback in case someone watches videos from iPhone prior to version 16 (or 15 Pro) since Apple doesn't provide software decoder yet.
- Disable audio splitting.
- Turn on remote runners for VOD transcoding.
- Deploy remote-runner using custom docker image
# docker-compose.yaml
---
services:
peertube-runner-av1:
image: ilfarpro/peertube-runner-av1-hq:0.3.9-testing
container_name: peertube-runner-av1
restart: always
volumes:
# make sure to create empty config file before run docker compose up command
- '/home/username/peertube-runner/config.toml:/root/.config/peertube-runner-nodejs/default/config.toml'Image based on linuxserver/docker-ffmpeg and runner transcoding profile code changed to support high quality and CPU intensive SVT-AV1 transcoding. Fallback H264 transcoding profile also has low preset and CRF which is also CPU intensive.
If you want to modify transcoding settings, make changes to PeerTube-AV1/packages/ffmpeg/src/ffmpeg-default-transcoding-profile.ts.
For example, you may want to use higher encoding preset, change CRF and disable variance boost to get smaller size videos at the cost of quality.
Register runner
Connect to container shell
sudo docker exec -it peertube-runner-av1 bashIssue runner registration command from /root folder (it will open there by default)
node_modules/peertube-runner-av1-hq/dist/peertube-runner.js register --url https://example.com --runner-name AV1-runner-1 --registration-token ptrrt-...- Make sure
--urlhas no/at the end, otherwise it will throw errors. - You can get registration token and learn more about using runners from Peertube Documentation.
Copyright (C) 2015-2024 PeerTube Contributors (see CREDITS.md)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.