-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
h264 profile and level check #68
base: master
Are you sure you want to change the base?
Conversation
312c3ca
to
2648884
Compare
2c85990
to
2c45158
Compare
Chromecast Ultra supports up to L5.2 I believe. We might need to dig up the official documentation to know exactly which version supports what. |
Yes, that is correct. I am slowly testing with different video formats just to be sure. |
Probably it is not needed to maintain both the |
2489f90
to
89ca139
Compare
True, it will make maintaining easier in the future if we just list what is supported. That is changed now along with reverting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just been reading up on the supported formats and it seems to be much more complicated than I expected. The supported formats depend on the codec. For example the Chromecast Ultra supports level 5.1 for h265 and VP9, but not for h264. For h264 only level 4.2 is supported.
I've also seen in the VideoHelp forums that mediainfo apparently can return any kind of string in the "Format_Profile" field for certain codecs. This apparently even can be set manually by the person doing encoding. For example people encoding for specific devices can put strings such as "Sony PSP" or "iPhone 6" in the profile field. This doesn't necessarily mean that we need to re-encode these files. This is probably more rare though, and I am OK with forcing a re-encode of any file that cannot be resolved into a known version string.
Another problem is that the current whitelists support the high tier with profiles 3.1, but what about the main tier, and levels 1, 2, 2.1 and 3? I assume these are also supported and don't need to be re-encoded. This means should support formats such as [email protected]
The profiles themselves can get very complex. The list of profiles for h264 is quite extensive, going from Constrained Baseline Profile to Baseline, Extended, Main and a whole range of High profiles (ref. https://en.wikipedia.org/wiki/Advanced_Video_Coding#Profiles).
With h265 the situation is simpler but it uses strings such as Main [email protected]@High
.
I think however that for practical purposes we can probably ignore the profile, it is mostly the level which is going to be important since this is limited by the performance of the decoder hardware.
So maybe we should just check the level. We can get it using a regular expression that matches on /@L(\d(.\d)?)/
, and then we can define our matrix of supported levels as follows:
# Suggested options for Chromecast Ultra.
#MAX_LEVELS=('AVC:4.2' 'HEVC:5.1', 'VP9:5.1')
default config and gitignore
89ca139
to
7557374
Compare
.sh
extension since there are only variables insideI will keep this PR as draft until I test with more videos and add more supported and unsupported profiles and levels.
Feel free to comment if you do not agree with some of my changes.