PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

Support copy codecs in peertube runner

Open ilfarpro opened this issue 6 months ago • 0 comments

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

ilfarpro avatar Aug 07 '24 21:08 ilfarpro