I have Jellyfin installed on a remote machine, connected to my laptop and phone via Tailscale. Is it possible to cast from that machine to a gen 2 Chromecast?

From the Jellyfin instance installed on my laptop, in the same LAN, I can authenticate from the phone and cast to the Chromecast, so all the pieces work.

I have tried announcing the subnet from the laptop (--advertise-routes=192.168.1.0/24), with IP forwarding etc. The remote machine accepts the route and can ping the Chromecast (192.168.1.100). From the phone I can connect to the server and start casting. The screen shows the Jellyfin logo, but playing anything has no effect.

Has someone managed to make it work?


EDIT: As I feared, it seems it’s not possible. I can’t change the routing table of my ISP’s router, so the Chromecast can’t reach the remote server.

I’ll try to find a newer Chromecast, or maybe just get a Raspberry and install the full client there. Thanks everyone!

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 year ago

    When you “cast” from the phone to the Chromecast, what happens it that the phone gives the Chromecast an URL where it can find the stream to play. The phone can read that stream because it’s connected to the Tailscale VPN. The Chromecast isn’t, so the stream URL is inaccessible to it. You see the Jellyfin logo because that’s a feature of casting (the app on the phone gives the Chromecast a logo to show).

    There’s no point in announcing the subnet from your laptop, because your laptop is not a router for the local LAN. You can use this to reach local LAN devices from remote Tailscale nodes but not the other way around.

    Some possible solutions:

    1. You enable the hotspot feature on the phone while connected to Tailscale, and connect the Chromecast to the wifi of the phone. But the stream will consume the cellular connection, because you’re using the phone’s wifi for the hotspot (the phone only has one wifi interface so it cannot use it both to connect to the local LAN and for hotspot).
    2. If you connect the local laptop to the router with a wired connection you can use its wifi as hotspot, connect the laptop to Tailscale, connect the Chromecast to the laptop hotspot, and the stream will arrive over the local connection.
    3. You can try to install Tailscale on the router, if it runs OpenWRT or something similar, and if it has enough storage space (the Tailscale packages are kinda large). If you announce the subnet from the router then it will work as intended and all the devices on the local LAN will be able to “see” the remote laptop.
    4. If you’re using nginx as reverse proxy with TLS certificates for the remote Jellyfin you can try this: expose it to the internet without Tailscale and use nginx-ip-whitelister to temporarily allow access from your local LAN’s public IP. All devices in the local LAN will see the remote Jellyfin. But read the warnings on the project page, it’s not as secure as a VPN. And of course “expose jellyfin to the internet” is not as simple as it sounds (you need a domain, you need to get Let’s Encrypt certs, a public IP, a port forward etc.)
    • qubik@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago
      1. Open Jellyfin stream with VLC (android) and Chromecast trough it. VLC works like reverse proxy.
      • pastrami@sammich.es
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        I use this same method to stream to Chromecast regularly (with Kodi). I will sometimes have issues with some encodings, or desyncs when pausing, but it is solid enough to support streaming full movies at 4K.

    • TechAdmin@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      For 3, if router supports it could also try doing static route via Tailscale joined machine that has IP forwarding enabled

    • Atemu@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      But the stream will consume the cellular connection, because you’re using the phone’s wifi for the hotspot (the phone only has one wifi interface so it cannot use it both to connect to the local LAN and for hotspot).

      This is not necessarily true. It’s almost always possible to use the 2.4GHz band on one side and the 5GHz one on the other and multiple networks on one WiFi interface isn’t impossible either.

      Modern Android devices can provide hotspot of the connected WiFi without any modifications. For some anecdata: My FP4 with LineageOS 20 and a Samsung A50 (Android 11) can both do it.

  • Rizoid@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Casting is always weird with networking like that. I’d highly recommend trying to find a way to run jellyfin locally cause nothing will really make Tailscale play nice with casting in my experience.

  • pe1uca@lemmy.pe1uca.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I resorted to buy a new one with android tv, so now I just have tailscale installed in it and can directly play jellyfin.

    The issue is the chromecast can’t resolve back to the tailnet with subrouting. Probably connecting the chromecast to a network which resolves the connections for it could work, but I don’t know how to do that or if it’s actually possible.

    • TechAdmin@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      If router supports it, a static route via connected machine with IP forwarding enabled might work. OpenWrt has packages for things like tailscale and zerotier so could do it without an extra machine too.

  • Atemu@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Subnet forwarding does not work in that direction. What you’ve done is allow devices in your Tailnet (i.e. your remote machine) to access 192.168.1.0/24 by using your laptop as a proxy, not the other way around; the chromecast doesn’t know it could reach your remote machine via your laptop.

    This would be a giant hack and it’s unlikely to work but it’s possible you could get the Chromecast to communicate with the remote machine via your laptop by setting the default gateway of the Chromecast’s network connection to the local IP address of the laptop.
    It’ll probably lose internet connection that way, not sure Jellyfin needs that (don’t think so?).

    I’d rather recommend you look into getting Tailscale onto that Chromecast. I’ve never used these things, so I don’t know whether that’s possible.

  • TechAdmin@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    If your router lets you try adding a static route for the tailscale IP/subnet to the laptop with IP forwarding enabled.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    HTTP Hypertext Transfer Protocol, the Web
    IP Internet Protocol
    SSL Secure Sockets Layer, for transparent encryption
    TLS Transport Layer Security, supersedes SSL
    VPN Virtual Private Network
    nginx Popular HTTP server

    4 acronyms in this thread; the most compressed thread commented on today has 7 acronyms.

    [Thread #299 for this sub, first seen 25th Nov 2023, 18:25] [FAQ] [Full list] [Contact] [Source code]