Jump to content

Strange problem: Playback stops after a few minutes – Device limit?


K22R8CT

Recommended Posts

K22R8CT

For a couple weeks now playback on Safari would just stop every few minutes and reset the playback position.

Sometimes it would mark the media as played, sometimes unplayed - I couldn't detect a pattern.

Same behavior in beta and stable.

It didn't happen in Firefox so I assumed safari was the problem.

Discovered playback in a Safari "Private Window" worked so I thought okay state must be corrupted.

Deleted cookies, local storage - nothing made a difference.

Digging around I noticed I had 68 devices in my device list, some years old, so I pruned them down to 21.

It's been about a day and the problem hasn't happened since.

Does that make sense?

I see the device limit for lifetime subscription (which I have) is 25. Should I prune them regularly?

EDIT: spoke too soon, not even private window can avoid it consistently.

Edited by Anon28109
Link to comment
Share on other sites

Hi.  Those devices you see in your server dash are not the ones counted for the Premiere limit (see below) and what you describe would not be the result of the device limit either.  If it happens again, please provide details of an example.

Thanks.

https://support.emby.media/support/solutions/articles/44001173135-is-there-a-limit-to-emby-premiere

  • Thanks 1
Link to comment
Share on other sites

K22R8CT

The problem's back so as you suspected "device purging" didn't solve it.

And now I'm also seeing it on iOS Safari (on iPad.)

 

I wonder if the problems with my EmbyServer settings. 

I run stable and beta, two separate installs but similar settings, and it happens with both.

Any ideas?

EDIT: Bug still present in 4.8.0.8 beta

EDIT: Bug still present in 4.8.0.9 beta

Edited by Anon28109
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

Exactly the same issue for me but through my nginx. I had to activate proxy_buffering to resolve it (I think, I'm not using much safari to play some files). But since I didn't strictly followed the nginx guide on this forum, could be something I badly configured in the end. 

Link to comment
Share on other sites

visproduction

Possibly related article: https://setapp.com/how-to/videos-not-playing-on-mac?irgwc=1
and

https://stackoverflow.com/questions/69554317/safari-15-0-video-element-position-fixed-not-working-on-page-load

See answer:
 

I just had the same issue with Safari desktop. The solution was just to put the video tag inside a wrapper which has the fixed position as Safari seems to be unable to handle it directly on a video tag.

This doesn't work in Safari:

<video style="position: fixed" src="..."></video>

This works:

<div style="position: fixed">
    <video src="..."></video>
</div>

===

https://developer.apple.com/forums/thread/690523

I figured it out, you need to have all three of these elements on a video: playsinline, autoPlay and muted. Otherwise, your auto-play won't work. You can still call video.play() after the user interacted with the site, if the autoplay is declared on the video element.

Posted 4 months ago by 
https://forums.developer.apple.com/forums/build-09152022-1/public/assets/avatars/SYSTEM_DEFAULT_AVATAR.svg DanielBalogh
Share DanielBalogh answer
 
  • votes1

    Obviously BartyP has playsinline, autoplay, muted in his/her video tag, and it doesn't work. It doesn't work for me either.

     
     
    https://forums.developer.apple.com/forums/build-09152022-1/public/assets/avatars/SYSTEM_DEFAULT_AVATAR.svg bhchoi
     3 months ago
     
     
  • votes1

    adding playsinline fixed my issue. previously had only autoPlay , muted and loop

     
     
    https://forums.developer.apple.com/forums/build-09152022-1/public/assets/avatars/SYSTEM_DEFAULT_AVATAR.svg mahinnz
     3 months ago
     

I have not looked at the Emby code.  Some browsers are particular and Safari is often guilty of this.

 

Hope that helps.

Edited by visproduction
Link to comment
Share on other sites

K22R8CT

Tired of work-arounds I've given in and reverted to 4.6.7 from last November.

First was HEVC playback - some worked, some didn't (they'd direct play when transcoding was required) but that was fixed.

The big problem since July is playback rarely lasts for more than a few minutes before stopping and losing my position, sometimes marking the media as played sometimes not. Firefox work fine. I've posted details here: https://emby.media/community/index.php?/topic/111199-strange-problem-playback-stops-after-a-few-minutes-–-device-limit/

A minor (but still annoying) problem which I believe started with the 4.7 series is that subtitles don't follow the "Picture in Picture" window, they stay in the main one, which defeats the purpose.

 

Am I the only one using Safari or are others not having these issues?

I run the latest versions of macOS and Safari.

Edited by Anon28109
Link to comment
Share on other sites

K22R8CT
On 10/8/2022 at 3:49 AM, nSGecko said:

Exactly the same issue for me but through my nginx. I had to activate proxy_buffering to resolve it (I think, I'm not using much safari to play some files). But since I didn't strictly followed the nginx guide on this forum, could be something I badly configured in the end. 

I'm curious if this actually resolved it. All my playback's direct on the local network but maybe proxy-buffering works around the problem.

Link to comment
Share on other sites

K22R8CT

Another issue I forgot to mention - double clicking to enter/exit fullscreen will usually skip the video ahead maybe 30 seconds.

Did something fundamental change to cause these seemingly-unrelated safari issues?

It wasn't a change in safari itself which still works properly with 4.6

EDIT: This was Safari's problem, not Emby's. Restarting Safari fixed it.

Edited by K22R8CT
Link to comment
Share on other sites

21 hours ago, Anon28109 said:

I'm curious if this actually resolved it. All my playback's direct on the local network but maybe proxy-buffering works around the problem.

I'm kind of lost here because I though my issues were resolved but today on my Mac (safari), the playback stopped itself again. Refreshed the page and then no more problems for the rest of the day. I don't know if it's Emby, the Web App, my network, my proxy, OsX... there is too many variables.

Link to comment
Share on other sites

K22R8CT
1 hour ago, nSGecko said:

I'm kind of lost here because I though my issues were resolved but today on my Mac (safari), the playback stopped itself again. Refreshed the page and then no more problems for the rest of the day. I don't know if it's Emby, the Web App, my network, my proxy, OsX... there is too many variables.

Thanks. Right, lots of variables.

Can you double-click while the video's playing (to enter and exit fullscreen) consistently without it jumping ahead? 

Link to comment
Share on other sites

K22R8CT
On 10/14/2022 at 11:07 AM, Anon28109 said:

Can you double-click while the video's playing (to enter and exit fullscreen) consistently without it jumping ahead? 

Looks like this was my problem - restarting Safari fixed it.

  • Thanks 1
Link to comment
Share on other sites

I did some research about this problem on my side since :

- it was randomly happening, couldn't find the pattern to make it occurs everytime
- it was happening on all apple devices with safari involved (on the same devices with different browsers, no issue)
- it seems to be happening faster with larger source file (4K for example)
- modifying the diagnostic options did not helped in the end

I noticed that even when I was streaming connected on wifi to my local network, my nginx access logs put a 499 http code (approximatively) when the playback stopped. after a quick stack overflow reading, I added proxy_ignore_client_abort on; to solve this error but playback still stopped itself.

Here is my nginx access logs at the very second the playback stops (11:57:33). Any idea about this @Luke or @pir8radio ?
I mainly wonder why is there a POST requesting playback stop as I did not requested such stop ?

Quote
remoteIP - - [19/Oct/2022:11:57:32 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "GET /emby/videos/222472/hls1/main/2306.ts?PlaySessionId=9b4c48358a134200923c7fa35fcbdc7e HTTP/2.0" 200 0 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "GET /emby/Users/<userID>/Items/222472?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken> HTTP/2.0" 200 3856 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "POST /emby/Items/222472/PlaybackInfo?UserId=<userID>&StartTimeTicks=0&IsPlayback=false&AutoOpenLiveStream=false&MaxStreamingBitrate=2000000&X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 200 1335 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "POST /emby/Items/222472/PlaybackInfo?UserId=<userID>&StartTimeTicks=0&IsPlayback=false&AutoOpenLiveStream=false&MaxStreamingBitrate=2000000&X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 200 1336 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "POST /emby/Sessions/Playing/Stopped?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
remoteIP - - [19/Oct/2022:11:57:33 +0200] "GET /emby/Items/222472/ThemeMedia?UserId=<userID>&InheritFromParent=true&EnableThemeSongs=true&EnableThemeVideos=false&X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20iOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken> HTTP/2.0" 200 202 "https://<embyPublicIP>/web/index.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"

 

Link to comment
Share on other sites

@Anon28109, I may have found something, did you enabled the 'Are You Still Watching?' prompt in your user playback preferences ? I just disabled that, and it's the first time my playback continues on safari, seems promising enough to check and try on your side !

Link to comment
Share on other sites

K22R8CT
2 hours ago, nSGecko said:

@Anon28109, I may have found something, did you enabled the 'Are You Still Watching?' prompt in your user playback preferences ? I just disabled that, and it's the first time my playback continues on safari, seems promising enough to check and try on your side !

Unfortunately I tried this but playback stopped after about 5 minutes.

What I have found that (so far) works is opening the Web Inspector (from Safari's Develop menu, which you have to enable.)

Ironically I opened it to try and track the problem - an errant file or JS error - but can't reproduce it when it's open, so your proxy server's the best method.

I don't know if emby's debug logging gives more detail about the response but I believe you can configure your nginx proxy to provide it.

Link to comment
Share on other sites

In the end, I reverted back to my original nginx config but keeping the prompt turned off. I got a playback stop again yesterday, but just once this time. After resuming playback where it left off, if was flawless.

Opening Web Inspector does not change anything for me, I don't have any error beside some image's 404.

I hope that in 4.8 I don't have this issue anymore. In 4.6, I didn't have that behavior but I didn't had proxy neither so... don't know who's the culprit here without any help from the devs.

I'll post here if I find something helpful.

 

  • Thanks 1
Link to comment
Share on other sites

@Luke, can you confirm that .ts chunks are generated and requested using sequential numbers for a single playback ?

In my nginx logs, when using safari browsers and for some reason yet to be discovered, the web client decide suddenly to request for the 110.ts after 19.ts but 0 bytes is returned, so I assume that's why the playback stops ?

I could look further if you point me in the right direction...

<remoteIP> - - [20/Oct/2022:10:59:57 +0200] "GET /emby/videos/254060/hls1/main/19.ts?PlaySessionId=<sessionID> HTTP/2.0" 200 3427992 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:10:59:57 +0200] "GET /emby/videos/254060/hls1/main/20.ts?PlaySessionId=<sessionID> HTTP/2.0" 200 3335496 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:03 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:09 +0200] "GET /emby/videos/254060/hls1/main/21.ts?PlaySessionId=<sessionID> HTTP/2.0" 200 5245388 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:13 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:13 +0200] "GET /emby/videos/254060/hls1/main/110.ts?PlaySessionId=<sessionID> HTTP/2.0" 200 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:17 +0200] "GET /emby/Items/254060/ThumbnailSet?Width=400&X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken> HTTP/2.0" 200 337 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:18 +0200] "GET /emby/Items/254060/Images/Thumbnail?maxWidth=800&tag=618fc658e08015931f06210178c07f70&PositionTicks=400000000&quality=90 HTTP/2.0" 200 7455 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:18 +0200] "GET /emby/Items/254060/Images/Thumbnail?maxWidth=800&tag=618fc658e08015931f06210178c07f70&PositionTicks=500000000&quality=90 HTTP/2.0" 200 10703 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:20 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:20 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:34 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:45 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
<remoteIP> - - [20/Oct/2022:11:00:58 +0200] "POST /emby/Sessions/Playing/Progress?X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Safari%20macOS&X-Emby-Device-Id=<deviceID>&X-Emby-Client-Version=4.7.8.0&X-Emby-Token=<embyToken>&reqformat=json HTTP/2.0" 204 0 "https://<embyIP>/web/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"

 

Link to comment
Share on other sites

Yes when transcoding it gets sliced into segments. That jump could be from seeking. Why do you think it was zero bytes?

Link to comment
Share on other sites

  • 3 weeks later...
K22R8CT

I thought 4.8.0.16 might have fixed it, played for about 15 minutes with no interruption (which is longer than usual but the problem's intermittent) - but then it stopped and marked the item as played. Darn.

This is on MacOS Ventura / Safari 16.1

Another issue I notice now that I'm running 4.6.7.0 in "production" and 4.8.0.16 in testing, is that in 4.8, from the item's description page, sometimes I'll click play and get a loading graphic that spins indefinitely. I have to go back to the description page and refresh to get it playing. That never happens in 4.6.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...