-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Add support for custom stream queries for media_extractor #8538
Conversation
Could you add a config schema for this component please? Apart from that, this looks good. Will test later. |
Still getting |
Is it possible to send any stream to Sonos from HA using media_player.play_media service? |
I've done it before with a stream of PC audio, so it is possible, just not easy. |
Could you provide service data? |
Same as your example. |
But what was the value of "media_content_type" with working example? |
Ah, I mean the stream was setup outside of hass. |
Looks like sonos support only MP3, AAC and WMA for that kind of streaming. And unfortunately youtube does not support these formats.( https://sonos.custhelp.com/app/answers/detail/a_id/80/~/supported-audio-formats |
Gotcha, it's a shame we can't add support for transcoding without serving the stream through hass. |
Can you check your sonos devices with this url - https://soundcloud.com/bruttoband/brutto-11 and audio/mp3: bestaudio[ext=mp3] |
Can anyone rerun this build as it failed because of ConnectionResetError |
@minchik restarted the build for you.
|
As expected it depends on whether the owner of the media contains supported streams for your device |
Thanks! 🐊 |
@minchik can you update the docs for this please? Provide a link to https://github.com/rg3/youtube-dl#format-selection |
ok |
…ractor (home-assistant#8538) * Add support for different stream formats * Encapsulate logic inside MediaExtractor class * Add CONFIG_SCHEMA * Fix for cases when youtube-dl returns content of playlist as list
Description:
This PR adds support for custom stream queries per device and media type to media_extractor.
Example entry for
configuration.yaml
(if applicable):Default query if no settings provided is best.
User can override default value or set custom query per device and media type.
Examples:
More about format queries https://github.com/rg3/youtube-dl/blob/master/README.md#format-selection
BUT:
My settings:
My chromecast device (Sony Bravia with Android TV) does not support these media content types https://home-assistant.io/components/media_player/#service-media_playerplay_media
It supports media_content_type attributes like:
My service call data is:
Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable ([example][ex-requir]).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass