Project

General

Profile

How to Chromecast?

Added by Gabs Man over 6 years ago

I have a Chromecast 2. I also have a Media server running OpenMediaVault and TVHeadEnd with a dual tuner. I think it's great, works really well I have been using TVHClient on my phone, Kodi, Plex and the web interface.

I can watch Live TV or Recordings via Kodi no problem, and the Guide looks really good in Kodi too; but alas, there's no way to cast it to my TV from Kodi.

I have also set up channels in Plex for TVHeadEnd. I can view the Live TV adn also Recordings, although the Recordings won't play in the browser with Plex. I have worked out with a Movie library I can play the Recordings though. Unfortunately, although they play in the browser, Chromecast just wont play it properly, not sure if it's transcoding settings or what, it either say s Cannot play video or shows half the picture blurry. Similary using the Plex app on my phone.

With teh TVHClient it uses an external player. But when I go to the external player, it won't allow Chromecst; not sure if that's being limited by the app or TVH?

So has anyone got this working? If so, how do you do it? It's really frustrated as I just want to be able to watch TV recording on my TV, not just on my phone and tablet :(

cheers,
gabs


Replies (56)

RE: How to Chromecast? - Added by Flole Systems about 2 years ago

If you haven't already done so you should report that issue to the developer so it can get fixed ;)

RE: How to Chromecast? - Added by David G about 2 years ago

David G wrote:

Last week I needed to build another SD card for my RPI/TVH EPG setup and everything worked again until I got to Chromecast, which would not find any device and produced an error as attached. Luckily I had a backup of my old card so I copied over the original pychromecast directory and it started to work again, ie, find my Chromecast device without any errors. By swapping between the two pychromecast directories I now have, I've determined that the latest version available from repo https://github.com/home-assistant-libs/pychromecast produces this error.
......

Thanks to support from emontnemery (pychromecast github) the problem & fix below has been determined;

Updating to the latest version of pychromecast +7.x.x, prevents thv_epg from finding Chromecast devices. To fix this the code change below is needed in tvh_epg;

FROM- chromecasts = pychromecast.get_chromecasts()
TO-

        chromecasts = pychromecast.get_chromecasts()
        if isinstance(chromecasts , tuple):
            chromecasts, browser = chromecasts

RE: How to Chromecast? - Added by La Marqe about 1 month ago

As the solution discussed above works using a home assistant support library and I run both (tvheadend and home assistant) on a RPI4, I thought to simply try out the native chromecast support of home assistant to access tvheadend and stream TV to my Google Nest Hub. I can say: It works very well.

For all who stumble upon this thread and have the same idea, I want to share some config details.

1) Tvheadend
Chromecasts needs a slightly tuned stream.
You need to set up a new streaming profile using container format "MP4/av-lib".
Same as described here: https://github.com/speculatrix/tvh_epg/blob/master/CHROMECAST.md
At least for HD channels, it was not required for me to set up any transcoding (the bottom half of the config). My profile works without that, leading to a very low CPU usage while casting. SD channels will have to be transcoded as Nest Hub does not support mpeg2 video codec.

2) Home assistant
You can use home assistants built-in media player. The following sample config works well when configured as an action as part of a script or an automation:

action:
  - service: media_player.play_media
    data:
      media_content_type: video
      media_content_id: http://192.168.0.100:9981/stream/channelid/1030292195?profile=chromecast
    target:
      entity_id: media_player.nesthub

192.168.0.100 is the IP of my tvheadend server. Replace it with the IP of your server. Make sure to use the IP. Don't even try to mess with intranet hostnames which cannot be resolved with internet DNS infrastructure.

RE: How to Chromecast? - Added by Red bull 28 days ago

Plug in Chromecast and visit chromecast.com/setup. ...
Connect Chromecast to your Wi‑Fi network.
Tap the Cast button in a cast-enabled app.

RE: How to Chromecast? - Added by Red bull 28 days ago

Gabs Man wrote:

I have a Chromecast 2. I also have a Media server running OpenMediaVault and TVHeadEnd with a dual tuner. I think it's great, works really well I have been using TVHClient on my phone, Kodi, Plex and the web interface.

I can watch Live TV or Recordings via Kodi no problem, and the Guide looks really good in Kodi too; but alas, there's no way to cast it to my TV from Kodi.

I have also set up channels in Plex for TVHeadEnd. I can view the Live TV adn also Recordings, although the Recordings won't play in the browser with Plex. I have worked out with a Movie library I can play the Recordings though. Unfortunately, although they play in the browser, Chromecast just wont play it properly, not sure if it's transcoding settings or what, it either say s Cannot play video or shows half the picture blurry. Similary using the Plex app on my phone.

With teh TVHClient it uses an external player. But when I go to the external player, it won't allow Chromecst; not sure if that's being limited by the app or TVH?

So has anyone got this working? If so, how do you do it? It's really frustrated as I just want to be able to watch TV recording on my TV, not just on my phone and tablet :(

cheers,
gabs

Plug in Chromecast and visit chromecast.com/setup. ...
Connect Chromecast to your Wi‑Fi network.
Tap the Cast button in a cast-enabled app.

RE: How to Chromecast? - Added by creasty somp 7 days ago

I have tried upgrading TVHeadEnd to the latest unstable (for Buster) (4.3-1857~g221c29b40) and that does allow Persistent Authentication settings, BUT, does not allow transcoding profiles and tvh_epg does not seem to be able to login and keeps coming up with authorisation errors.

(51-56/56)