Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.09k stars 1.51k forks source link

Better resolution label for videos with different video aspect #6047

Closed Chocobozzz closed 3 months ago

Chocobozzz commented 11 months ago

Describe the problem to be solved

If the video has 21/9 aspect, we display 818p resolution label instead of 1080p because PeerTube considers the height as resolution label (so 1920p / (21/9) ~= 818p)

Describe the solution you would like

Should be easier for users to see 1080p, even if it's not the real video height.

Might be interesting to see how vimeo or youtube handle this kind of use case.

vid-bin commented 9 months ago

Sure, this sounds good to me!

AlexJade23 commented 9 months ago

In order to help people use the most accurate resolution, would it be possible to replace the resolution by a label of the type of screen ? For example, do you use a Phone, a Tablet, a TV, a HomeCinema, or a Cinema, and to make it correspond to Phone up to 480p (DVD), Tablet up to 720p (HD Ready), TV up to 1080p (Full HD), HomeCinema up to 2160 (UHD4K) and Cinema over 2160

Chocobozzz commented 3 months ago

Implemented in https://github.com/Chocobozzz/PeerTube/commit/21215122a8f5b8222133843c14de3e901fda01ee

@AlexJade23 I preferred to keep the 1080p etc. labels as other video platforms (youtube, vimeo...) also use this convention. But don't hesitate to create another issue for this. Adding an admin config can be interesting for some use cases.