LAPS0082 13 Posted October 20, 2024 Posted October 20, 2024 Hello dear Emby Community, I have a very strange problem that I just can't make sense of. I'm totally stumped. A remote user always has problems (extreme stuttering including complete freezing) when he accesses my Emby server via his Internet provider (both WLAN and LAN). He uses Emby on the TV with an Apple TV (wired), but also his iPhone with the Emby app (WIFI). It can't really be down to his internet connection. 1Gbit fiber. Speed tests show full performance. At the time of the test, you can't see any load on the Internet line on the router either. Now comes the part where it gets weird. TV + Apple TV + cable = stuttering / freezing iPhone + WIFI= stuttering / freezing As soon as he deactivates WIFI on his iPhone and tries using mobile data, everything is fine. My Emby server is published via Cloudflare Tunnels (cloudflared). Here are some of my cloudflare settings: For testing I have changed these settings as I thought it cloud be an IPv6 problem: What do you think could be the problem? Cloudflare? His ISP? Possibly an IPv6 problem? Anything else? I would be grateful for any ideas, because I'm really getting desperate.
LAPS0082 13 Posted October 20, 2024 Author Posted October 20, 2024 Test with ISP (wired + Apple TV) Start: 10/20/24, 8:34 PM End: 10/20/24, 8:39 PM Test with mobile data: Start:10/20/24, 8:42 PM End: 10/20/24, 8:44 PM Logs: embyserver (1).txtffmpeg-transcode-29eb8260-26b2-422f-adf1-2653bc7c5a06_1 (1).txtffmpeg-transcode-29eb8260-26b2-422f-adf1-2653bc7c5a06_1.txthardware_detection-63865051558.txt
visproduction 315 Posted October 21, 2024 Posted October 21, 2024 (edited) What Ghz band is your friend using for his mobile Wifi connection? 2.4 Ghz is suppose to go faster, but usually sits at around 80 mbps. Although that seems like it may be enough, any other Wifi use or setup issues at his location not being 100% Wifi perfect could easily cause lost packets resulting in the speed test failure and a forced transcoding to either a low res or to a res that should work, but if his / her wifi is not working 100%, then that fails at some point and you get stuttering. Why would encapsulated packets inside 4 or 5G mobile data make it work better? The filter bypass is Cloudfare, correct? Maybe packet handoff to mobile networks don't need the cloudfare filter. Also just a guess. Your Cloudfare setting has IPv6 switched off and Pseudo Ipv4 turned on. What happens here? Does cloudfare handle part of the traffic in IPv6 and then convert it to IPv4? Don't you need to have this on all the time, because you don't know if your users all have IPv6? Can't Cloudfare just keep everything in IPv4? Seems like switching back and forth must take some bandwidth and cause issue. Again I am guessing. Better to use with 5GHz Wifi or better with the new gear and be close enough to the router so there is no drop off, within about 25 feet. see: https://www.reddit.com/r/appletv/comments/16oni9p/apple_tv_4k_slow_wifi_24_ghz_instead_of_5_ghz/ Your Embyserver.txt log shows AppleWebKit/538.1 This is listed as being a service used by Samsung TV's from 2017. I am not sure if this is correct interpretation. Does the user have this TV type? Sometimes TV's are limited in what they can pass directly in playback and that can cause a forced transcoding, I believe. This is a guess. see: https://developer.samsung.com/smarttv/develop/guides/fundamentals/retrieving-platform-information.html What about creating a couple of test videos, high quality video h.264 and AAC audio so there is no transcoding needed. Do a few different bitrates starting as low as 2000 kbps total. See if this works all the way up to 6000 kbps with no issue. Wouldn't that tell you that the problem is not host or flipping back and forth anywhere? If these tests play perfectly, then something is up with the transcoding process. If these tests also stutter at the high end then the issue is somewhere in the connection. I think these test help narrow it down. Maybe someone will see something more out of the logs. Anyway, hope that helps. Edited October 21, 2024 by visproduction 1
Luke 42079 Posted October 21, 2024 Posted October 21, 2024 HI, are you still seeing this with Emby for Apple TV 1.9.1? 1
LAPS0082 13 Posted October 22, 2024 Author Posted October 22, 2024 @Luke My friend is currently using 1.9.0 (4) I am asking him to check if an update is available @visproduction Wow... thank you for your detailed post. I appreciate every thought. First point I think we can exclude Wifi as the cause. The Apple TV of my friend is a wired connection and there is still the issue. My upload speed is only 25MBit so I don't think any wifi connection is too slow. 19 hours ago, visproduction said: The filter bypass is Cloudfare, correct? Maybe packet handoff to mobile networks don't need the cloudfare filter. Also just a guess. Yes I copied the cloudflare settings from this sticky: 19 hours ago, visproduction said: Your Cloudfare setting has IPv6 switched off and Pseudo Ipv4 turned on. What happens here? Does cloudfare handle part of the traffic in IPv6 and then convert it to IPv4? Don't you need to have this on all the time, because you don't know if your users all have IPv6? Can't Cloudfare just keep everything in IPv4? Seems like switching back and forth must take some bandwidth and cause issue. Again I am guessing. Yes I turned Pseudo IPv4 for testing purposes as I thought it might be an IPv6 problem. My friend had the same problem before I edited this setting. 19 hours ago, visproduction said: Your Embyserver.txt log shows AppleWebKit/538.1 This is listed as being a service used by Samsung TV's from 2017. I am not sure if this is correct interpretation. Does the user have this TV type? Sometimes TV's are limited in what they can pass directly in playback and that can cause a forced transcoding, I believe. This is a guess. see: https://developer.samsung.com/smarttv/develop/guides/fundamentals/retrieving-platform-information.html The AppleWebKit/538.1 you see in the logs is from another parallel session of my wife on our local TV > No problems there My friend who is having problems is using Apple TV as this client. 19 hours ago, visproduction said: What about creating a couple of test videos, high quality video h.264 and AAC audio so there is no transcoding needed. Do a few different bitrates starting as low as 2000 kbps total. See if this works all the way up to 6000 kbps with no issue. Wouldn't that tell you that the problem is not host or flipping back and forth anywhere? If these tests play perfectly, then something is up with the transcoding process. If these tests also stutter at the high end then the issue is somewhere in the connection. I think these test help narrow it down. Maybe someone will see something more out of the logs. That's a very good idea. I will keep that in mind. But my friend has this problem even when he is doing "direct play": I checked these settings as mentioned in this thread because I saw a similar error message: Don't know I'm pretty lost at the moment. Kind regards 1
rbjtech 5284 Posted October 22, 2024 Posted October 22, 2024 Force the wired Apple TV to transcode to the same as it would do via mobile 4/5G - say at 4Mbit/sec. If you then get a smooth playback experience - ramp it up until it starts to stutter. I suspect it's bandwidth related and possibly Cloudflare limiting/throttling your throughput. You don't get the throttling with 4/5G because you never get to the higher bandwidth when Cloudflare activate it. 1 1
visproduction 315 Posted October 22, 2024 Posted October 22, 2024 (edited) DTS audio is maybe part of the issue. I don't use transcoding, so I really don't know info on this. I know that DTS audio cannot play back directly on any Windows browser. I think it may also have issues with Apple OS. It is a licensed audio codec that, I believe, needs payments from software or hardware that uses it. I just convert all DTS to AAC surround at a high bit rate and never put up media with DTS. There might be a way for everything to direct play perfectly, somehow. The only way DTS audio works for me is if the mkv file is burned onto a datadisk blu-ray and then it plays correctly on a high end Panasonic blu-ray player, which sort of surprised me that this was possible. I think Emby transcoding can handle DTS, but I think everything has to be just right for that to happen. I am guessing a copy of the media DTS converted to AAC audio codec would playback better. Edited October 22, 2024 by visproduction 2
rbjtech 5284 Posted October 22, 2024 Posted October 22, 2024 (edited) 42 minutes ago, visproduction said: DTS audio is maybe part of the issue. I don't use transcoding, so I really don't know info on this. I know that DTS audio cannot play back directly on any Windows browser. I think it may also have issues with Apple OS. It is a licensed audio codec that, I believe, needs payments from software or hardware that uses it. I just convert all DTS to AAC surround at a high bit rate and never put up media with DTS. There might be a way for everything to direct play perfectly, somehow. The only way DTS audio works for me is if the mkv file is burned onto a datadisk blu-ray and then it plays correctly on a high end Panasonic blu-ray player, which sort of surprised me that this was possible. I think Emby transcoding can handle DTS, but I think everything has to be just right for that to happen. I am guessing a copy of the media DTS converted to AAC audio codec would playback better. It's a good catch on DTS - I was surprised when I saw it too as I don't believe Apple TV supports DTS. It's possible the App is internally decoding DTS and playing it back as PCM or maybe AAC as it's Apple but is reporting it as Direct Playback as this is a client side decode. Edited October 22, 2024 by rbjtech 2
LAPS0082 13 Posted October 24, 2024 Author Posted October 24, 2024 On 10/22/2024 at 5:57 PM, visproduction said: I think Emby transcoding can handle DTS, but I think everything has to be just right for that to happen. I am guessing a copy of the media DTS converted to AAC audio codec would playback better. That's a good advice. My friend is currently unavailable for longer testing. He had only a few minutes yesterday and said that it's running better now. All I did were these setting: Do you think, that this could be the cause? 1 1
Luke 42079 Posted October 28, 2024 Posted October 28, 2024 On 10/24/2024 at 10:17 AM, LAPS0082 said: That's a good advice. My friend is currently unavailable for longer testing. He had only a few minutes yesterday and said that it's running better now. All I did were these setting: Do you think, that this could be the cause? HI, thanks for testing. I generally would not recommend touching those, especially the second one because it will result in cases of subtitles not showing at all when the user has enabled them. 1
Solution LAPS0082 13 Posted October 28, 2024 Author Solution Posted October 28, 2024 Dear all, at first thank you for all your tips. I am still confused that this worked but in case anyone has a similar problem: Until now my solution was to insall the Advanced Diagnostics Addon and enable these settings: I reverted the Cloudflare IPv6 / Pseudo IPv4 settings and now everythings seems to work. I did not remux the DTS stream or anything else on the source files so I assume it has to be an issue with these subtitle settings. It was not a cloudflare error, it was not an IPv6 error or an error of the ISP of my friend. As @Luke mentioned you will have disadvantages if you enable these settings. But who needs subtitles if you can't even stream the whole movie?? Dear devs I would appreciate if you take a closer look at this error. This is only a workaround which has disadvantages. Furthermore you have to set these settings again after every reboot.
Luke 42079 Posted November 10, 2024 Posted November 10, 2024 Hi, we're looking into it. Thanks for reporting.
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