Jump to content


Photo

App tries to cast to Chromecast using the server's local instead of the remote address.

chromecast network

Best Answer Luke , 22 January 2020 - 12:42 PM

So then you'll want to configure the network settings so that the server is able to realize that the connections are remote. Go to the full post


  • Please log in to reply
12 replies to this topic

#1 Hoptional OFFLINE  

Hoptional

    Member

  • Members
  • 12 posts
  • Local time: 07:36 AM

Posted 22 January 2020 - 06:01 AM

Hi!

I am running an emby server on a remote machine that is behind Cloudflare. Everything works fine until I try to cast to a chromecast device from my android app. The app connects to the chromecast, the chromecast says "ready to cast" but when I click play nothing happens. I went through the chromecast's logs and found that the it receives the LAN instead of the WAN address:
 

 

01-22 10:48:47.346  4478  4478 I chromium: [4478:4478:INFO:CONSOLE(441)] App ID: 2D4B1DA3 "Playlist message: {"type":"message","sc":false,"defaultPrevented":false,"kj":true,"senderId":"7525485c-c55a-97c3-5daa-db2b689bbcc2.270:com.mb.android-104","data":{"options":{},"command":"Identify","userId":"XXXXX","deviceId":"XXXXX","serverId":"XXXXX","serverVersion":"4.3.1.0","serverAddress":"http://172.29.0.2:8096","receiverName":"Casten Bier"}}", source: https://mediabrowser...v=1579686521316 (441)

 

127.29.0.2 is the local address in the docker container and the address that is displayed as LAN address in the dashboard. I censored my ids with XXXXX, as I don't know if they could be somehow abused.

 

Casting works fine when I use emby web with Google Chrome, so it seems to be a problem exclusive to the android app (I cannot try iOS).

 

My remote address is configured correctly and shows as https://emby.domain.com:443 in the dashboard. Is there anything I could do? Does anyone have the same problem?


Edited by Hoptional, 22 January 2020 - 10:13 AM.


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149390 posts
  • Local time: 01:36 AM

Posted 22 January 2020 - 12:05 PM

I would try configuring your network settings so that the server dashboard will display a reachable local address.

#3 Hoptional OFFLINE  

Hoptional

    Member

  • Members
  • 12 posts
  • Local time: 07:36 AM

Posted 22 January 2020 - 12:22 PM

Thanks for the reply! Reachable from where? The server is running on a remote machine, so I don't see how this would help with the android app not passing the remote address to the chromecast. Please correct me if I'm wrong.

#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149390 posts
  • Local time: 01:36 AM

Posted 22 January 2020 - 12:42 PM   Best Answer

So then you'll want to configure the network settings so that the server is able to realize that the connections are remote.
  • Hoptional likes this

#5 Hoptional OFFLINE  

Hoptional

    Member

  • Members
  • 12 posts
  • Local time: 07:36 AM

Posted 22 January 2020 - 01:52 PM

I see. What criteria does the server use to determine whether the connection is remote or not when I use a reverse proxy? I do provide the X-Forwarded-For header but that doesn't seem to do the trick. It is also interesting that it works fine when i cast from Google Chrome.

 

Edit: Nevermind, I realized that I do in fact unset the X-Forwarded-For header (must be a leftover directive from when I was testing something). It works now, thank you for leading me in the right direction!


Edited by Hoptional, 22 January 2020 - 01:55 PM.

  • Luke likes this

#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149390 posts
  • Local time: 01:36 AM

Posted 22 January 2020 - 01:59 PM

Thanks for the feedback.



#7 Hoptional OFFLINE  

Hoptional

    Member

  • Members
  • 12 posts
  • Local time: 07:36 AM

Posted 22 January 2020 - 08:15 PM

Thanks for the feedback.

Of course! I'm amazed with the level of support you provide.

Unfortunately, I have another Chromecast related problem, but this time it is not exclusive to the Android app but happens on Google Chrome, too:

Playback works fine if I start casting at 0 seconds, but it does not work when I want to start from any other point in the video. I see an image of the point where the video should start but the image freezes and nothing is played. The same thing happens when I skip forward or backward. In the server dashboard I can see that the playback position is reset to 0s whenever I skip somewhere, but the transcoding position is set correctly.



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149390 posts
  • Local time: 01:36 AM

Posted 22 January 2020 - 09:59 PM

Let's look at an example. Please attach the information requested in how to report a media playback issue:
https://emby.media/c...port-a-problem/
Thanks.

#9 pir8radio OFFLINE  

pir8radio

    NGINX

  • Members
  • 3245 posts
  • Local time: 12:36 AM
  • LocationChicago

Posted 24 January 2020 - 02:04 AM

Of course! I'm amazed with the level of support you provide.

Unfortunately, I have another Chromecast related problem, but this time it is not exclusive to the Android app but happens on Google Chrome, too:

Playback works fine if I start casting at 0 seconds, but it does not work when I want to start from any other point in the video. I see an image of the point where the video should start but the image freezes and nothing is played. The same thing happens when I skip forward or backward. In the server dashboard I can see that the playback position is reset to 0s whenever I skip somewhere, but the transcoding position is set correctly.

 

Check your If-Range and Range headers are being passed through the proxy.


  • Hoptional likes this

#10 Hoptional OFFLINE  

Hoptional

    Member

  • Members
  • 12 posts
  • Local time: 07:36 AM

Posted 24 January 2020 - 05:50 AM

Let's look at an example. Please attach the information requested in how to report a media playback issue:
https://emby.media/c...port-a-problem/
Thanks.

I attached the server-, transcode-, and chromecast logs. It works fine when direct playing, but not when direct streaming or transcoding.

 

 

Check your If-Range and Range headers are being passed through the proxy.

They should be configured correctly:

proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;

I also tried

proxy_force_ranges on;

but that didn't help either.

Thanks for the support!

 

Edit: let me know if I should open a separate topic for this issue.

Edit2: Discussion continues here: https://emby.media/c...e-2#entry835487

Attached Files


Edited by Hoptional, 24 January 2020 - 12:26 PM.


#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149390 posts
  • Local time: 01:36 AM

Posted 24 January 2020 - 12:48 PM

As a test, does disabling hardware transcoding in server transcoding settings help?

#12 Hoptional OFFLINE  

Hoptional

    Member

  • Members
  • 12 posts
  • Local time: 07:36 AM

Posted 24 January 2020 - 12:53 PM

As a test, does disabling hardware transcoding in server transcoding settings help?

Just tried it and It does not help.

 

Shall we continue the discussion here: https://emby.media/c...e-2#entry835487 ? The issue seems to be related.



#13 pir8radio OFFLINE  

pir8radio

    NGINX

  • Members
  • 3245 posts
  • Local time: 12:36 AM
  • LocationChicago

Posted 24 January 2020 - 02:31 PM

Just tried it and It does not help.

 

Shall we continue the discussion here: https://emby.media/c...e-2#entry835487 ? The issue seems to be related.

 

Good idea since this thread was technically answered...    







Also tagged with one or more of these keywords: chromecast, network

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users