Teshvier 1 Posted August 16, 2023 Posted August 16, 2023 My scenario is as follows: I have a Emby Server running on a Windows 11 machine. I am exposing it to the outside world using reverse proxy with caddy. The caddy instance is running in Docker. The device that is playing it is a Chromecast, the new version, and it is playing from another country. The issue is that the video is buffering a lot for x265 files because the device can handle that video file fine for Direct Play. If I am correct, it is direct playing because it assumes the connection is local because the caddy instance is inside Docker. I need a way to tell it to always transcode for that specific user or a way to tell Docker to use the actual IP. The latter solution might not work though because of below. I tried using caddy directly and transcoding happens no issue when auto but the quality is 140p which is horrible. If I increase the quality to be higher then Direct Play is enforced again.
TMCsw 249 Posted August 17, 2023 Posted August 17, 2023 So somebody else may help you correct why caddy may be interpreting this as a LAN connection (if that is really the case?) (I use nginx) @pir8radio? If it is indeed a remote connection then the two most likely reasons for buffering (if the destination does support h265), is: 1, The internet speed between your server and their client (your REAL upload speed and their REAL download speed, working together) is too slow. You can try lowering the speed too make it work... The client can also limit the speed (likely the better way) ? It may also be (since you have not provided us any info about your server) that it can’t trans-code fast enough! Not ruling out other problems... PLEASE provide more DETAILS if this doesn't help!
Teshvier 1 Posted August 17, 2023 Author Posted August 17, 2023 Thank you for that suggestion! I am currently doing something like that now. I installed caddy outside of Docker and then changed the limit of internet streaming bit rate to 2. Anything higher still gets Direct Play which is annoying. I tried having the client limit the speed and then it had to be 1.5 720p Do you have nginx in a Docker? Transcoding is not an issue because the PC is a Intel NUC 11 Enthusiast i7 which has a RTX 2060. I think that should be powerful enough. I believe it is the internet connection between the devices which are a problem.
pwhodges 2012 Posted August 17, 2023 Posted August 17, 2023 Caddy passes on the client IP correctly by default. I have no experience with Docker, but would hope that it doesn't change this. Why do you think that the connection is being seen as local, anyway? This looks to me like a simple bandwidth issue. Alternatively, what do you mean by "the new version" of Chromecast; I get the impression from elsewhere in the forum that the latest Chromecast can be troublesome. It would help sort out what's happening if you post your server logs for each of the scenarios described. Paul
Teshvier 1 Posted August 17, 2023 Author Posted August 17, 2023 Docker is definitely messing with the IP that is passed because when you play something the IP is 127.0.0.1. Also the user could log in even when I said do not allow remote connection for the user. The Chromecast I use is this. It is the 4K version so I can handle x265 no problem. So I do think it is the Direct Play to another country which is the problem. That is why I would want to always transcode for specific users. Regarding logs, I will see if I can get them because the set up changed from the old scenario because I am using @TMCswsuggestion.
Luke 42083 Posted August 17, 2023 Posted August 17, 2023 I don't think the server log will help. If the server can only see 127.0.0.1, then there's nothing you can change in Emby Server to correct that .That would have to be in your reverse proxy and/or Docker. The best solution would be to fix this, however if you just want to ignore it and get your video playing, then try setting the chromecast quality option in the app that you're casting from. I wouldn't use the internet streaming limit in the server. It won't apply anyway if the server thinks the connection is over the local network.
Teshvier 1 Posted August 18, 2023 Author Posted August 18, 2023 Thanks! Since It is related to Docker & Caddy should I make another post?
pwhodges 2012 Posted August 18, 2023 Posted August 18, 2023 Have you updated to Caddy 2.7? It was released last week, and the release notes mention improvements to the identification of client IPs in complex situations. Paul
Teshvier 1 Posted August 18, 2023 Author Posted August 18, 2023 Yes, I don't think it is related to caddy but caddy in a Docker container in Windows.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now