I recently noticed that 1440p videos will be listed as 1080p in VLC's Video tab.
This seems particularly odd to me given the fact that VLC will prove itself wrong when you open the Information menu for one of these video files.
Why on earth is there any inconsistency?
Expected behavior
All videos should be listed as their actual resolution.
Actual behavior
Videos are often listed with resolutions that aren't correct.
Steps to reproduce
Put any 1440p video into VLC's library.
Observe strange behavior.
Screenshots
Context
App version
3.5.2 2022-09-19
Android version
11
Device model
OnePlus 8 Pro
(Running non-stock HavocOS)
App mode
Smartphone
Designs
Child items
0
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Yeah, adding things to the list would resolve this specific situation, but I believe that is honestly the wrong move to solve the general issue.
In my opinion, there should not be a list at all.
Plain and simple.
Your algorithm does not take into account vertical videos.
Your algorithm does not take into account videos with a 4:3 aspect ratio.
Your algorithm does not accurately report nonstandard resolutions.
To be perfectly frank, I find your current implementation to be reductionist, dishonest, and unhelpful. I'm honestly disappointed you're not just returning the exact precise correct answer every time.
If I had my way with the code, this is what I would do.
(And I apologize that I don't know Kotlin. This is written in Java. I trust you should be able to translate this as needed.)
I'm sorry you didn't believe me. Please try to understand, what you're saying is not true. Your current method does not work with vertical video or 4:3 or non-standard resolutions. I have collected proof, and I will provide it to you here.
Vertical Videos
First, I have a file called FailCase001.mkv. This is a vertical video, 1080x1920. This video should be classified as 1080p. Your code incorrectly labels it as SD.
To be sure, I uploaded this video to YouTube. YouTube correctly identified it as a 1080p video. This proves that your algorithm does not take into account vertical videos.
4:3 Aspect Ratio
Second, I have a file called FailCase002.mkv. This is a 4:3 video from Meow Wolf on YouTube, 1440x1080. This video should be classified as 1080p. Your code incorrectly labels it as 720p.
YouTube once again gets this one correct. YouTube identifies this video as 1080p. This proves that your algorithm does not take into account videos with a 4:3 aspect ratio.
Non-standard Resolutions
Third, I have a file called FailCase003.mp4. This video has a non-standard video resolution, because it is a screen recording from an iPad. This video was a recorded lecture from my Statistics professor. This video's dimensions are 1656x1246. This video should be classified as 1246p. It could also be classified as 1080p, which is a slight round-down. 1246 is larger than 1080, so this video should at minimum be classified as 1080p. But your code incorrectly goes too low, and labels it as 720p. This proves that your algorithm does not take into account videos with non-standard resolutions.
Conclusion
Your current code consistently produces incorrect and inaccurate results. Your current code should be removed, and it should be replaced with a new approach that is not based on a list of hardcoded values.
The goal is not to show the exact video resolution. The information screen is meant to do that. This small piece of UI is here to just show a quick easily understandable hint for the video quality.
To be quickly processed, the value set has to be small. To be easily understandable, the values have to be from common knowledge.
You took YouTube as a reference, so let's do the same:
It fulfills both of our requirements: small set, easily understandable.
Now, the context between YouTube and VLC is a bit different:
we do not propose to change the resolution dynamically, so only one value will be shown
the area we have to show the information in is really small. In the grid for example, it should not be larger than 5 characters
Resolution for 1080x1920 is 1080pResolution for 1920x1080 is 1080pResolution for 1440x1080 is 1080pResolution for 1080x1440 is 1080pResolution for 1656x1246 is 1080pResolution for 1246x1656 is 1080pResolution for 640x480 is SDResolution for 480x640 is SDResolution for 720x1200 is 720pResolution for 1200x720 is 720pResolution for 3840x2160 is 4KResolution for 2160x3840 is 4KResolution for 7680x4320 is 8KResolution for 4320x7680 is 8K
Conclusion
I think the new version is better.
I am not against adding new values as soon as it's easily understandable, belongs to a well known standard, is short enough to fit in the cards and the entry set is not too large
Thank you. I think your new version is much better.
I now have only one final request. This gets back to my original reason for opening this issue.
I would like to request that you add 1440p to the list.
I'm glad you and I agree that YouTube's list of resolutions (and YouTube's method of resolution classification) are acceptable as a sort of standard. As you can see in your own screenshot, YouTube recognizes 1440p as a distinct resolution class, sitting in-between 1080p and 4k.
I happen to use 1440p quite often. I produce 1440p videos regularly. 1440p happens to be the minimum resolution that, when uploaded to YouTube, will guarantee higher-quality codecs (VP9 and AV1) upon processing. Heck, my even my phone's display resolution is 1440x3168.
So I think it would be appropriate to include 1440p as a distinct classification in generateResolutionClass().