PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

Ditch originals that do not match any of the transcoding options

Open kyrahabattoir opened this issue 7 years ago • 3 comments

I'm trying to maximize space on my instance by making it full "potatovision" (360p only) unfortunately, if you upload a 1080p video, while it will be transcoded to 360p, the 1080p original appears to be kept too.

Is there a way to get rid of those large files?

kyrahabattoir avatar Sep 08 '18 13:09 kyrahabattoir

Did you find solution for it?

filmaidykai avatar Nov 06 '18 16:11 filmaidykai

Same here I wonder how can I stop for example the 2k and 4k video uploads? I am fine with having them in HD and Full HD but not in those ridiculous resolutions.

tio-trom avatar Jun 01 '22 10:06 tio-trom

Do you know if there is a way to perform this operation manually?

I see this feature request has been there for almost 4 years. If I don't find a solution soon, I will have to limit the size of certain accounts that are consuming the "90%" of the used storage capacity while they provide just the "10%" of the content. Increasing the storage capacity is an option, but it's a shame to use those resources considering there are a lot of space wasted by absurdly huge resolution files.

Thanks.

alejandrocobo avatar Jul 04 '22 07:07 alejandrocobo

@Chocobozzz you mentioned this in the live streaming feature request but maybe the behavior should be different between VOD and live streaming.

I'm trying to make sense of this option here, especially since it implies a behavior change in Peertube. Currently for VOD I checked 1080p+720p and I'm also glad it keeps the original resolution when I upload a 2160p source so it means the default behavior is similar to transcoding.bound_to_enabled_resolution: false?

But what does it imply for live?

From what other stream service do, they always compress live streams in a number of presets, so that would mean Live would always behave like transcoding.bound_to_enabled_resolution: true so we can strictly cap the CPU load for lives.

Maybe the UI for Live settings should look like :

✅ Transcoding enabled for live streams Live resolutions to generate

  • Source
  • 144p
  • 240p ...

It means that if you send a 1080p source stream for instance and "1080p" is checked, you can have both a source 1080 and a transcoded 1080 quality. It's best to do it this way because the source stream can be very big (>=10Mbps) and then the clients have a choice between both qualities depending on their own bandwidth.

(also Source may not be desirable to keep in every case, let say you send a 10+Mbps source, the server's bandwidth may be not enough to send it back to all clients)

fenarinarsa avatar Aug 05 '22 15:08 fenarinarsa

There would be 2 independent settings so yon you can enable this option for VOD but not for lives.

Chocobozzz avatar Aug 08 '22 06:08 Chocobozzz

We added 2 settings to specify if you want to transcode the original resolution or automatically remove it (for VOD and lives):

  • https://github.com/Chocobozzz/PeerTube/blob/develop/config/default.yaml#L407
  • https://github.com/Chocobozzz/PeerTube/blob/develop/config/default.yaml#L503

Chocobozzz avatar Aug 10 '22 14:08 Chocobozzz

It means you can select the resolutions you accept on your platform and ditch any other resolution. Did I get this implementation right?

tio-trom avatar Aug 11 '22 21:08 tio-trom

It means you can select the resolutions you accept on your platform and ditch any other resolution. Did I get this implementation right?

If you enable transcoding, your instance will transcode the video only in the resolution enabled in your transcoding option and will remove the input/uploaded file. So you choose which resolution will be available on your instance. But your users will still be able to upload bigger resolutions. See https://github.com/Chocobozzz/PeerTube/issues/3814 for the issue to prevent them to upload these kind of files.

Chocobozzz avatar Aug 12 '22 07:08 Chocobozzz

Sounds perfect to me! Thank you so much!

tio-trom avatar Aug 12 '22 12:08 tio-trom