Now I would like to play some MP3 that I put into ‘/media’ folder via samba.
I can see these files if I go to Media Browser on the sidebar menu, but when I try to play them using the service in Developer Tools I got always errors.
On dev tools I set:
Good evening
Dear
My media browser audio file unable to play on my Google home mini speaker .when I click the song only getting beep sound and stop media player .but is is playing well with web browser .
May I know how can I fix this issue
When I setup automation with sound then it is playing well.
Unfortunately I can not play directly from media browser
Hello,
I will add my use case also.
THe component VLC need to have a full path of file in order to be able to play a song. As the media library path like 'media-source://media_source/local/filename.mp3' do not convert it, the VLC is not able to play songs.
My temporary workaround was to make a script that expect last part and concatenate with full path. The selection of music to play is available through an input select manually filled with the list of files by using a manual call to call service set options
- "my first song.mp3"
- "nice_group/favorite.mp3"
- ...
A button to call the script and it takes the value of input select
Is hassio broken out of the box for media-source: URLs sent to google cast integration entities?
I’m also having this problem right now. The last three posts on this thread in the last couple months are consistent with my experience, it simply doesn’t work. I observe the exact same behavior. Any chance this just hasn’t been working in HA for the past few months of releases?
I’ve tried dozens of URL variations for media-source:// urls, and tried configuring custom media folders too, but I can’t get google cast’s to play music from the local media source.
Play in browser from the Media Browser DOES work, but media-source URLs simply don’t, either directly entered to a play_media service call, or accessed from the Media Browser UX.
I’m using Google cast hw, I have a few, different models none of them are working.
You get an initial “pairing chime” from the speaker, but I cannot get media-source:// urls to work, cast HW never plays, and after chiming (like it was going to play) it transforms to an idle state within like half a second after the chime.
I /suspect/ the media_content_id is being sent un-transformed to a real URL? But I can’t find a way to snoop on the chromecast using the google api. What code in github does the transformation? If I could find that logic, I could track this farther locally.
I can wget from the media urls if I directly request, e.g. http://192.168.1.99/local/yaman.mp3 (192.168.1.99 is my HA) I get the file, so the media-source server is totally working.
If I HARDODE a publicly available HTTP URL, or a private HTTP URL on a web server on the local network: Cast DOES work, so the valid HTTP URLs do work, again leading to my suspicion that its the media-source URL => http URL transformation taht’s not working (or isn’t happening).
Unfortunately I can’t hardcode the mdns IP (http://myha.local) because cast appears not to include mdns lookup here? So I’m stuck trying to get media-source URLs to work…
So, I spent quite a bit trying to figure this out myself. After sitting down with someone else that has a different setup than myself, i’ve narrowed down the reason why chromecast will not play local via media_source on my system:
You need to use an external url, you cannot use an internal url. This limitation is on chromecasts side because it doesn’t trust the source. I.e. HA has to be connected to the internet and it has to use https. I have this set up, however I believe point 2 was blocking me.
If you use a proxy, you may have a bad time. (I didn’t feel like working past this)
Video encoding is a pain. I found an online source below for good video encoding settings that work well in plex (and media_source with your browser as the media_player).
Ultimately, I didn’t feel like troubleshooting my proxy issues. Instead I created a plex server and hosted the videos that way, which I believe is 100% local.
Under Video tab:
Choose H.264 (x264) for your Video Codec. If your client supports H.265, you can also choose H.265 (x265). H.265 results in smaller file size at the same quality level. Leave the framerate same as source and keep Peak Framerate selected.
Under Optimise Video, drag the Encoder Preset to slower, choose Film for Encoder Tune, choose High for Encoder Profile, and set the Encoder Level to 4.1.
Under Quality, set Constant Quality as RF 18
Under Audio tab:
Choose AAC as the codec
If your movie has a 5.1 channel track, you can mix down the 5.1 Channels. If you are not worried about surround sound, you can just choose Stereo. 160 bitrate is perfectly fine.
“You need to use an external url, you cannot use an internal url. This limitation is on chromecasts side because it doesn’t trust the source. I.e. HA has to be connected to the internet and it has to use https. I have this set up, however I believe point 2 was blocking me.”
Shouldn’t the media browser integration deal with this? I’m using Nabu Casa and see my Home Mini that was added via the Google Assistant feature. Does the Media Browser work to play music to any speakers other than the web browser?
I have the internal and external addresses set. internal to the IP:8123 and external to Nabu Casa. I just get the ping noise when I try to play from Media Browser. Media Browser lets me select the Mini or the Web Browser.
Is there any way of changing the order of the files listed in the media browser? At the moment I only seem to be able to list them by name. I would like to list them by date with the most recent first.
all the music is on the media default folder then all artist folders are in a music folder - just look at the path
BTW: the /media/music is a mount folder from my NAS where I’ve all my
music
I am trying to use a picture in customize.yaml from the media browser for entity_picture but can’t figure out the url to use. media-source://media_source/local/icons/my_icon.jpg doesn’t result in illegal logins but doesn’t show the picture. Just about everything else results in illegal logins and ultimately ip bans. Any ideas? I have been able to both write and send camera snapshots as well as play media files so I know the media browser is setup correctly.
Still nothing about this or did i miss something? Would be such a great feature to just press a button in lovelace and get the same popup as in for example the spotify media player card to search media, and not the browser page.