Skip to content

PeerTube fork with AV1 transcoding support using runners.

License

Notifications You must be signed in to change notification settings

ilfarpro/PeerTube-AV1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15,508 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

About

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.

Deployment guide

  1. Deploy Peertube

    You may follow official installation instructions, but make sure to use newest ilfarpro/peertube image or other version of it. Vistit image repository to see all available tags.

    Once you done with this, make changes described below.

  2. 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.
  1. 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 bash

Issue 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 --url has no / at the end, otherwise it will throw errors.
  • You can get registration token and learn more about using runners from Peertube Documentation.

License

Logo

CC BY-SA 4.0, by Framasoft

Code

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/.

About

PeerTube fork with AV1 transcoding support using runners.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.1%
  • HTML 6.2%
  • SCSS 2.8%
  • Shell 0.3%
  • Handlebars 0.3%
  • JavaScript 0.3%