Support copy codecs in peertube runner #5663

Open
opened 2026-02-22 11:52:11 -05:00 by deekerman · 0 comments
Owner

Originally created by @ilfarpro on GitHub (Aug 7, 2024).

Describe the current behavior

I'm sorry. this could be not a bug or maybe just not implemented yet...

When I use Peertube without runner it can do job optimize-to-web-video and next to it new-resolution-to-hls job with "copyCodecs": true option. Peertube runner can't do that for some reason. It leads to significant increase in time because runner should encode original resolution 2 times:

  1. to optimize video to web (highest resolution)
  2. encode highest resolution again

Please take a look at screenshosts to see more.

This is how Peertube without runner behaves. It can copy codecs and save a ton of time.
no-double-transcoding

But Peertube runner encodes 2 times the same resolution and it takes 2x time.
double encoding

Maybe it's related to this line of code.
github.com/Chocobozzz/PeerTube@da992cbcab/apps/peertube-runner/src/server/process/shared/process-vod.ts (L118)

Steps to reproduce

  1. Install latest peertube runner
  2. Uload a video
  3. Transcode that video :)

Describe the expected behavior

I expect peertube runner to copy codecs for highest resolution when it does it's HLS version. Peertube already can do that, let's make runner be able to do it too, please 🙏

Additional information

  • PeerTube instance:
    • Version: 6.2.1
    • NodeJS version: v20.16.0
    • Ffmpeg version: 7.0.1
Originally created by @ilfarpro on GitHub (Aug 7, 2024). ### Describe the current behavior I'm sorry. this could be not a bug or maybe just not implemented yet... When I use Peertube without runner it can do job `optimize-to-web-video` and next to it `new-resolution-to-hls` job with `"copyCodecs": true` option. Peertube runner can't do that for some reason. It leads to significant increase in time because runner should encode original resolution 2 times: 1. to optimize video to web (highest resolution) 2. encode highest resolution again Please take a look at screenshosts to see more. This is how Peertube without runner behaves. It can copy codecs and save a ton of time. ![no-double-transcoding](https://github.com/user-attachments/assets/97405679-a000-4643-88e2-f1503ddb8466) But Peertube runner encodes 2 times the same resolution and it takes 2x time. ![double encoding](https://github.com/user-attachments/assets/219cf838-bbf5-4df0-b433-c478ccc4432c) Maybe it's related to this line of code. https://github.com/Chocobozzz/PeerTube/blob/da992cbcab4e0d669ab507a8431600747a94e35e/apps/peertube-runner/src/server/process/shared/process-vod.ts#L118 ### Steps to reproduce 1. Install latest peertube runner 2. Uload a video 3. Transcode that video :) ### Describe the expected behavior I expect peertube runner to copy codecs for highest resolution when it does it's HLS version. Peertube already can do that, let's make runner be able to do it too, please 🙏 ### Additional information * PeerTube instance: * Version: 6.2.1 * NodeJS version: v20.16.0 * Ffmpeg version: 7.0.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PeerTube#5663
No description provided.