PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

importing vids between 1080p => 2159p are reset to 1080p

Open spirillen opened this issue 1 year ago โ€ข 13 comments

Describe the problem to be solved

If you upload a video that is more than 1080p but not 2160p, it is only hosted as a 1080p,

Here is 3 examples. The first one stick to 2160p as supposed, number 2 and tree are downsized to 1080p

  1. https://www.youtube.com/watch?v=5DuZkK_trYY
  2. https://www.youtube.com/watch?v=D2KE2a5qo0g
  3. https://www.youtube.com/watch?v=iqYK79jCssA

Describe the solution you would like

shouldn't the video then be hosted as a 2160Ip video?

spirillen avatar Apr 23 '24 06:04 spirillen

OH, when trying to import then via videos/upload#import-url number two and tree was downsixed to 480p

spirillen avatar Apr 23 '24 06:04 spirillen

Screenshots to show the situation

image

image

image

spirillen avatar Apr 23 '24 07:04 spirillen

HI,

Have you enabled the "original resolution transcoding" option (https://docs.joinpeertube.org/admin/configuration#resolutions)?

Chocobozzz avatar Apr 25 '24 09:04 Chocobozzz

HI,

Have you enabled the "original resolution transcoding" option (https://docs.joinpeertube.org/admin/configuration#resolutions)?

No, as I have experienced significant bad results by doing it.

spirillen avatar Apr 25 '24 10:04 spirillen

No, as I have experienced significant bad results by doing it.

What do you mean by "bad results"?

Chocobozzz avatar Apr 26 '24 06:04 Chocobozzz

Some really corny videos. Another thing I come to think of, I should have mentioned previously, is why should you want to re-encode a already correctly formatted video?

My suggestion then become to also read the width of the imported video, as the high differ depending on the video scale 16:9|10:9|4:3 etc, but as the width is as little a constant... ie. as above links, I suggest to build the rule to say if bigger than, then accept it as equal next size

Example

3240x1556 would be accepted as 3841x2160 as it is bigger than 1920x1080

spirillen avatar Apr 27 '24 00:04 spirillen

What do you mean by corny videos?

SimplyCorbett avatar May 04 '24 22:05 SimplyCorbett

seriously bad quality, think of a video clip recorded on mobile phone from the 90's; now scaled up and down 50 times, getting the picture.. or rather you won't :smirk:

spirillen avatar May 04 '24 23:05 spirillen

seriously bad quality, think of a video clip recorded on mobile phone from the 90's; now scaled up and down 50 times, getting the picture.. or rather you won't ๐Ÿ˜

You understand that peertube was designed to run on cheap VPS in the 2 core range correct? It's designed for everyone to run.

If you want better video quality you need to use custom transcoding settings. I recommend the transcoding-profile-debug plugin.

Your CPU usage is going to skyrocket and your server needs to be able to support the new hardware requirements.

I too wish the design of peertube explained this better and had quality options built right into it. I also wish the remote runners were designed with custom transcoding settings in mind.

It does not however.

Anywho, my point is peertube -can- give you good quality videos if you tweak a few things. Good luck.

SimplyCorbett avatar May 05 '24 01:05 SimplyCorbett

Some really corny videos. Another thing I come to think of, I should have mentioned previously, is why should you want to re-encode a already correctly formatted video?

Because videos are encoded in HLS which is the core of peertube and what makes P2P work.

Peertube is not YouTube.

SimplyCorbett avatar May 05 '24 01:05 SimplyCorbett

Peertube is not YouTube.

Thanks god, I hope not :smile:

I recommend the transcoding-profile-debug plugin.

Do you have a link to the documentation for this? and yes, the box have a bit more than 2 vCore's :wink:

spirillen avatar May 05 '24 14:05 spirillen

Peertube is not YouTube.

Thanks god, I hope not ๐Ÿ˜„

I recommend the transcoding-profile-debug plugin.

Do you have a link to the documentation for this? and yes, the box have a bit more than 2 vCore's ๐Ÿ˜‰

https://pastebin.com/TdVBPUfd

SimplyCorbett avatar May 05 '24 15:05 SimplyCorbett

I would also take a good look at the source code for yt-dlp downloads and make sure itโ€™s downloading and prioritizing the highest quality version available. Iโ€™ve had to change that in the past on prior versions.

Iโ€™m planning on messing around with peertube again soon my site has been on pause for a while now.

Edit:

@spirillen https://github.com/Chocobozzz/PeerTube/blob/develop/server/core/helpers/youtube-dl/youtube-dl-cli.ts lines 86-104.

SimplyCorbett avatar May 06 '24 17:05 SimplyCorbett

Enabling original resolution transcoding option should fix this issue.

If you notice bad transcoding quality please create a dedicated issue so we can investigate :)

Chocobozzz avatar May 16 '24 08:05 Chocobozzz