Cap AVC profile level at 4.1 in stream master playlist#41592
Cap AVC profile level at 4.1 in stream master playlist#41592hunterjm merged 2 commits intohome-assistant:devfrom
Conversation
I believe I actually defaulted the playlist returned to be the master playlist everywhere. |
Yup it was changed that way..but when I made the PR to the frontend to only use ExoPlayer for H.265, I parsed the master and then just passed the regular playlist down to the 3 player types. Edit: Frontend PR with the change is here: home-assistant/frontend#7010 |
|
I see. Thanks for the PR link. I don’t think it’s used anywhere else at the moment. It might be better to add an option to the request stream method where you can ask for either the master or normal playlist instead of doing a string replace in the frontend. Then the cast and Google assistant integrations can just request the master playlist. |
|
That makes sense...I'll make a PR for that after we merge the outstanding ones. |
|
Fixes #38937 Audio and video working with this fix. Thanks for this! 👍 |
|
@uvjustin - Thanks for digging into this one! I was at a complete loss on where to even begin. Tag me when this is ready to go. |
|
@hunterjm This seems to fix #38937 and #41579 , so I think we can go ahead and merge this one. We just have to keep an eye out to see if it breaks things for some other cast users as the profile level we are reporting may now technically be incorrect. |
|
@hunterjm We can merge this now |
|
Sorry, been preoccupied with writing a new integration :) |
* Cap AVC profile level at 4.1 * Use smaller multiplier in bandwidth calculation
Proposed change
In #40483 we added master playlists to allow Google Cast devices to correctly play video streams with no audio by explicitly specifying the codecs in the master playlist. However, this seems to have caused some problems with some Google Cast devices and some cameras. Specifically, some cameras use a higher profile number than the Cast devices can officially support, and since we now specify the codec and profile explicitly, the Cast player aborts without even trying to play the stream (even though the higher profiles are not officially supported they may still be able to be played).
This PR caps the AVC profile we report in the master playlist to 4.1 which should be supported by the devices listed here: https://developers.google.com/cast/docs/media . Besides checking whether this change fixes issue #41579, we should also test whether this underreporting of the AVC profile adversely affects any cast devices. This change should only affect Cast devices and not the frontend as we are not sending the master_playlist to the players in
ha-hls-player.Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: