roblatour / Cast

open source command line program for casting from Windows
MIT License
19 stars 2 forks source link

Add support for .m3u and .aac URLs #2

Closed Silun closed 6 days ago

Silun commented 10 months ago

I came across your neat project while searching for ways to control my Nest Audios directly. Seems very nice, works like a charm! 👍

However, when I tried casting via either one of these commands:

cast -device "Nest Audios" -url "https://avw.mdr.de/streams/284320-0_aac_high.m3u" and cast -device "Nest Audios" -url "https://mdr-284320-0.sslcast.mdr.de/mdr/284320/0/aac/high/stream.aac"

I get the following error:

Warning: url value must end with: ".mp3", ".m3u8", ".mp4", or ".wav"; switch will be ignored
Warning: there was no -text, -file, -url, or -dir switch, so there is nothing to cast

I know the .aac stream can be cast because I have written a python script to feed URLs to my Nest Audios, and they play it just fine. Could you add .aac and maybe .m4a to the URL whitelist? I am not sure how much work .m3u support would be, but it would be greatly appreciated as well, since a lot of stations do not use .m3u8 yet.

Edit: To save you a Google search, .m4a is just .mp4 that contains only audio. Same exact thing, different extension. So basically just an alias.

roblatour commented 10 months ago

Sorry, I just gave both a try and neither would work. Cast uses a component the supports chrome case v2; unfortunately that component has not been updated in several years. It doesn't seem to recognize either format.

Silun commented 10 months ago

Oh, how surprising. I am using the pychromecast package for Python to send the .aac URL and it just works. That's a shame, then.