Linux HOW-TO: XBMC machine as Chromecast Receiver.
#31
(2014-01-03, 21:52)shadow Wrote: Thanks I have this working great.

I just wanted to share a neat usability workaround I came up with since at times I don't want to manually switch to a remote to stop XBMC's playback and unblock the audio.

I created a shell script that sends the JSON command to stop playback then I edited the google-chrome script to run said command. This stops playback XBMC any time you connect to leapcast. (only on connect from a app not just leaving leapcast as a always on background service)

My script (The sleep is needed or the audio doesn't get un-blocked in time)
Code:
#!/bin/bash

USERNAME=xbmc
PASSWORD=pass
SERVER=192.168.1.118
PORT=8080

wget --user=$USERNAME --password=$PASSWORD --header='Content-Type: application/json' --post-data='{"jsonrpc":"2.0","method":"Player.Stop","params":{"playerid":1},"id":1}' http://$SERVER:$PORT/jsonrpc -O /dev/null
sleep 3s

Then I just edited /usr/bin/google-chrome and ran that script at the start.

Some time I may come up with logic so it only sends the stop command if needed not all the time but I haven't worried since I can't think of anywhere a errant stop command should hurt the system.

How did you get to run the script?

(2014-01-19, 13:29)nickr Wrote: I just reread the thread. I believe you need chrome, not chromium. But I already said that.

Nope, it works...but I everytime have to startx and xfce4 first, then from terminal I start the script...but I still don't see YouTube videos because of flash...
Reply
#32
(2014-01-19, 17:40)Maxr1998 Wrote: How did you get to run the script?

/usr/bin/google-chrome is a shell script so you can either have it call another script or just paste those commands directly in it.
Reply
#33
@Maxr1998 - does your system run a window manager? Or does it just run X with XBMC on top?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#34
(2014-01-20, 05:22)nickr Wrote: @Maxr1998 - does your system run a window manager? Or does it just run X with XBMC on top?

Nope, not originally, it was first just xbmc which started without window manager, but I installed xorg and xfce additionally

(2014-01-20, 05:20)shadow Wrote:
(2014-01-19, 17:40)Maxr1998 Wrote: How did you get to run the script?

/usr/bin/google-chrome is a shell script so you can either have it call another script or just paste those commands directly in it.

And the content could for me be just:
Code:
#!/bin/sh
startx
chromium
?
Reply
#35
Yeah I suspect that'd be why it's having difficulty running another graphical program.

Does XBMC on RPI run without xorg? Use a framebuffer or something.

Is it possible to run chromium on a framebuffer? It's years since I played around with X-less systems.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#36
(2014-01-20, 08:06)nickr Wrote: Yeah I suspect that'd be why it's having difficulty running another graphical program.

Does XBMC on RPI run without xorg? Use a framebuffer or something.

Is it possible to run chromium on a framebuffer? It's years since I played around with X-less systems.

It runs without xorg, yes.
I now have the solution that after boot I quit xbmc, login in login shell, then startx, from xfce terminal run leapcast, and it then starts chromium and the streaming page.
But by now it just keeps loading...for YouTube I got to install a flash recode for Pi named gnash, but I think it still doesn't work because I have no MPEG2 license...

Maybe I have to reconfigure whole system not to start xbmc at boot but startx with xbmc and leapcast in it.
I'll see...
Reply
#37
Hi everyone!

Has anyone here ever tried to forward chromecast requests to xbmc instead to chrome?
Eg. sending the youtube link to the xbmc youtube-addon and watch inside xbmc.
There is an option --apps when startiing leapcast which expects a JSON File, i just did't figure out yet how it should look like..
Another possibility is to modify ../leapcast/apps/default.py before installation which contains the default app-links

Greetings,
Daniel
Reply
#38
I run XBMC on a Ubuntu system in stand-alone mode... I have managed to get leadpcast working with the follwing command:

DISPLAY=:0 leapcast --name 'Home Media Center' --user_agent TV --fullscreen --window_size 1920,1080 --chrome /usr/bin/google-chrome

This displays chromecasted content in full screen and works for Youtube, although I have noticedf that some apps, such as Lakitu for Twitch, don't seem to recognise it as a Chromecast device.

My biggest problem is that I have no keyboard or mouse control when chromecasted content is playing. The keyboard and mouse work in in XBMC. As a result, for me to exit when the chromecasted content is finished I have to SSH into the terminal and kill the leapcast process.

Can anyone help me troubleshoot this?
Reply
#39
First I should say I set this up to try it out in the heat surrounding the release of chromecast as a proof of concept. I don't actually need or want it so I've spent no more time.

Sounds like you have focus issues. Or alternatively no remote button mapped to keys that chrome recognised. If you look in the chrome-launcher thread, you might get some ideas. For example if you aren't running a window manager like xbmcbuntu does you'll need to run openbox when starting chrome.

Clearly my proof of concept needs polishing.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#40
Seems like leapcast development has halted for now, and it doesn't support anything more than youtube, which KODI already supports...

The big thing would be to integrate leapcast totally into XBMC, because of the nice integration itself, but not least the refresh rate change to the video FPS, which ChromeCast lacks...
Reply
#41
I have to say after doing a proof of concept I lost interest. I have no need of chromecast.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#42
(2015-01-12, 12:06)nickr Wrote: I have to say after doing a proof of concept I lost interest. I have no need of chromecast.

OK! Do you use any online streaming services such as Netflix? In that case - aren't you annoyed about the fact that you have to open the browser and adjust the refresh rate accordingly?
Reply
#43
No I don't use netflix. It is not available here.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#44
Hi. Trying to install theleapcast part and I get the errormessage 'unable to access http://gith....../leapcast.git SSL certificate problem: unable to get local issuer certificate
Any ideas??
Many thanks Huh
Reply
#45
What's the point? The project is as good as dead and only supports youtube, which is done easily via Yatse kodi remote and the youtube plugin...
Reply

Logout Mark Read Team Forum Stats Members Help
HOW-TO: XBMC machine as Chromecast Receiver.0