Jump to content

I need help with random freezing and skipping back after pause


Recommended Posts

Jcheinaman
Posted

Ok, hear me out please. 
 

I originally ran into this issue running the Emby beta on Unraid and started randomly having this freezing and skipping issue. After ripping my hair out trying to figure out what was causing this, I switched back to the public release of Emby with a fresh install. 
 

Unfortunately, I still have the same problem. It doesn’t seem to matter if it’s a tv show or a movie. It will randomly freeze and I’ll have to hit stop and play again. 
 

other times when I pause a movie or show, it will play for a bit, then skip back a few minutes. It seems like it gets stuck in a loop and will keep doing this. I have to stop and start it again to fix the issue. 
 

I was recently watching Megan and attached 3 ffmpeg logs and the Emby server log. 
 

can someone who understands what they’re looking at help me figure this out please?

 

Thank you!!

ffmpeg-remux-842631d4-a024-4e45-9bb6-1d9848156e46_1.txt ffmpeg-transcode-41630252-2678-458c-b5ba-718d9fafdbfe_1.txt embyserver.txt ffmpeg-remux-fad1fbd0-7d16-4fb1-8aeb-a754911bf485_1.txt

Posted

Hi, we'll take a look at this. Thanks for reporting.

Jcheinaman
Posted
1 minute ago, Luke said:

Hi, we'll take a look at this. Thanks for reporting.

Just for reference, I’m using Emby for Samsung, but I also have the same issue on Emby theater and web browsers. I don’t believe it’s app specific. 

 

Thank you!

  • Thanks 1
Posted

I can see that you have a global remote bitrate set which is causing the transcoding in one of the logs, and it looks like your server can't keep up with transcoding as the speed drops below 1.0x

>> ThrottleBySegmentRequest: RequestPosition: 00:00:00 - TranscodingPosition: 00:02:37 - ThrottleBuffer: 158s (Treshold: 120s)
19:54:01.693 elapsed=00:03:12.36 frame= 4000 fps= 21 q=21.0 size=N/A time=00:02:37.80 bitrate=N/A throttle=100 speed=0.82x    
19:54:02.195 elapsed=00:03:12.86 frame= 4001 fps= 21 q=28.0 size=N/A time=00:02:37.84 bitrate=N/A throttle=100 speed=0.818x    
19:54:02.697 elapsed=00:03:13.36 frame= 4002 fps= 21 q=28.0 size=N/A time=00:02:37.90 bitrate=N/A throttle=100 speed=0.817x    
19:54:03.199 elapsed=00:03:13.86 frame= 4003 fps= 21 q=28.0 size=N/A time=00:02:37.93 bitrate=N/A throttle=100 speed=0.815x    
>> ThrottleBySegmentRequest: RequestPosition: 00:00:00 - TranscodingPosition: 00:02:37 - ThrottleBuffer: 158s (Treshold: 120s)
19:54:03.701 elapsed=00:03:14.37 frame= 4004 fps= 21 q=21.0 size=N/A time=00:02:37.96 bitrate=N/A throttle=100 speed=0.813x    
19:54:04.205 elapsed=00:03:14.87 frame= 4005 fps= 21 q=29.0 size=N/A time=00:02:38.03 bitrate=N/A throttle=100 speed=0.811x    
19:54:04.706 elapsed=00:03:15.37 frame= 4006 fps= 21 q=28.0 size=N/A time=00:02:38.06 bitrate=N/A throttle=100 speed=0.809x    
19:54:05.208 elapsed=00:03:15.87 frame= 4007 fps= 20 q=28.0 size=N/A time=00:02:38.09 bitrate=N/A throttle=100 speed=0.807x  

You're also trying to play audio tracks not supported by the TV - avoid TrueHD/Atmos and DTS.  Select the AC3 track before you start playback and it should be better

Jcheinaman
Posted (edited)
14 minutes ago, SamES said:

I can see that you have a global remote bitrate set which is causing the transcoding in one of the logs, and it looks like your server can't keep up with transcoding as the speed drops below 1.0x

>> ThrottleBySegmentRequest: RequestPosition: 00:00:00 - TranscodingPosition: 00:02:37 - ThrottleBuffer: 158s (Treshold: 120s)
19:54:01.693 elapsed=00:03:12.36 frame= 4000 fps= 21 q=21.0 size=N/A time=00:02:37.80 bitrate=N/A throttle=100 speed=0.82x    
19:54:02.195 elapsed=00:03:12.86 frame= 4001 fps= 21 q=28.0 size=N/A time=00:02:37.84 bitrate=N/A throttle=100 speed=0.818x    
19:54:02.697 elapsed=00:03:13.36 frame= 4002 fps= 21 q=28.0 size=N/A time=00:02:37.90 bitrate=N/A throttle=100 speed=0.817x    
19:54:03.199 elapsed=00:03:13.86 frame= 4003 fps= 21 q=28.0 size=N/A time=00:02:37.93 bitrate=N/A throttle=100 speed=0.815x    
>> ThrottleBySegmentRequest: RequestPosition: 00:00:00 - TranscodingPosition: 00:02:37 - ThrottleBuffer: 158s (Treshold: 120s)
19:54:03.701 elapsed=00:03:14.37 frame= 4004 fps= 21 q=21.0 size=N/A time=00:02:37.96 bitrate=N/A throttle=100 speed=0.813x    
19:54:04.205 elapsed=00:03:14.87 frame= 4005 fps= 21 q=29.0 size=N/A time=00:02:38.03 bitrate=N/A throttle=100 speed=0.811x    
19:54:04.706 elapsed=00:03:15.37 frame= 4006 fps= 21 q=28.0 size=N/A time=00:02:38.06 bitrate=N/A throttle=100 speed=0.809x    
19:54:05.208 elapsed=00:03:15.87 frame= 4007 fps= 20 q=28.0 size=N/A time=00:02:38.09 bitrate=N/A throttle=100 speed=0.807x  

You're also trying to play audio tracks not supported by the TV - avoid TrueHD/Atmos and DTS.  Select the AC3 track before you start playback and it should be better

I do believe it’s below 100 because I have transcoding throttle set to enabled. I don’t believe transcoding audio would be the cause of this. If I turn transcode throttling off, the entire audio stream is usually transcoded in less than a minute. FYI, I disabled throttling and experience this same issue, even though the entire audio stream was transcoded. Also, it wouldn’t explain the weird jumping backwards to randoms spots after resuming from paused. 
 

This issue only started a few months ago. Prior to this I’ve had no issues with the same hardware, files, and settings. I’ve been using Emby for a few years. 
 

I'm running a 16 core AMD 3950x cpu and encode video with NVENC hardware transcoding. Certainly that will keep up with audio transcoding.

Edited by Jcheinaman
Posted (edited)

if transcoding speed is < 1 then it's not keeping up with the playback speed.  That's a problem

Edited by SamES
Posted

How long are you pausing for?

Jcheinaman
Posted
6 hours ago, Luke said:

How long are you pausing for?

it doesn't seem to matter. I could pause for a few seconds and it can produce the same issue. It's completely random. 

Jcheinaman
Posted
12 hours ago, SamES said:

if transcoding speed is < 1 then it's not keeping up with the playback speed.  That's a problem

I appreciate your input, but I disagree. I turned off throttling, the audio streams are all transcoded in a minute or less usually. The .80 is due to the throttle. When that kicks on, the audio stream is still far ahead, it just doesn't require that much processing power to get it to the next throttle down point. Any of the devs can correct me if I'm wrong, but audio is one of the easiest things to transcode.

Posted
45 minutes ago, Jcheinaman said:

I appreciate your input, but I disagree. I turned off throttling, the audio streams are all transcoded in a minute or less usually. The .80 is due to the throttle. When that kicks on, the audio stream is still far ahead, it just doesn't require that much processing power to get it to the next throttle down point. Any of the devs can correct me if I'm wrong, but audio is one of the easiest things to transcode.

I think the log I checked and took the samples from was video transcoding, not just audio. 

Jcheinaman
Posted
3 minutes ago, SamES said:

I think the log I checked and took the samples from was video transcoding, not just audio. 

According to Emby, the video was direct play. Only audio transcoding. 

16 hours ago, SamES said:

I can see that you have a global remote bitrate set which is causing the transcoding in one of the logs, and it looks like your server can't keep up with transcoding as the speed drops below 1.0x

>> ThrottleBySegmentRequest: RequestPosition: 00:00:00 - TranscodingPosition: 00:02:37 - ThrottleBuffer: 158s (Treshold: 120s)
19:54:01.693 elapsed=00:03:12.36 frame= 4000 fps= 21 q=21.0 size=N/A time=00:02:37.80 bitrate=N/A throttle=100 speed=0.82x    
19:54:02.195 elapsed=00:03:12.86 frame= 4001 fps= 21 q=28.0 size=N/A time=00:02:37.84 bitrate=N/A throttle=100 speed=0.818x    
19:54:02.697 elapsed=00:03:13.36 frame= 4002 fps= 21 q=28.0 size=N/A time=00:02:37.90 bitrate=N/A throttle=100 speed=0.817x    
19:54:03.199 elapsed=00:03:13.86 frame= 4003 fps= 21 q=28.0 size=N/A time=00:02:37.93 bitrate=N/A throttle=100 speed=0.815x    
>> ThrottleBySegmentRequest: RequestPosition: 00:00:00 - TranscodingPosition: 00:02:37 - ThrottleBuffer: 158s (Treshold: 120s)
19:54:03.701 elapsed=00:03:14.37 frame= 4004 fps= 21 q=21.0 size=N/A time=00:02:37.96 bitrate=N/A throttle=100 speed=0.813x    
19:54:04.205 elapsed=00:03:14.87 frame= 4005 fps= 21 q=29.0 size=N/A time=00:02:38.03 bitrate=N/A throttle=100 speed=0.811x    
19:54:04.706 elapsed=00:03:15.37 frame= 4006 fps= 21 q=28.0 size=N/A time=00:02:38.06 bitrate=N/A throttle=100 speed=0.809x    
19:54:05.208 elapsed=00:03:15.87 frame= 4007 fps= 20 q=28.0 size=N/A time=00:02:38.09 bitrate=N/A throttle=100 speed=0.807x  

You're also trying to play audio tracks not supported by the TV - avoid TrueHD/Atmos and DTS.  Select the AC3 track before you start playback and it should be better

I do believe it’s below 100 because I have transcoding throttle set to enabled. I don’t believe transcoding audio would be the cause of this. If I turn transcoding throttling off, the entire audio stream is usually transcoded in less than a minute. FYI, I disabled throttling and experience this same issue, even though the entire audio stream was transcoded. Also, it wouldn’t explain the weird jumping backwards to randoms spots after resuming from paused. 
 

This issue only started a few months ago. Prior to this I’ve had no issues with the same hardware, files, and settings. I’ve been using Emby for a few years. 
 

I'm running a 16 core AMD 3950x cpu and encode video with NVENC hardware transcoding. Certainly that will keep up with audio transcoding.

Posted

This log is a transcode.  If you believe that you server performance is fine, then I would say most likely it is a network issue.  Are you playing on the same local network as the server?  Restart all your network gear and check everything is working as expected

image.png.24a8743921a44b8b5c8f056659cf2eb9.png

Jcheinaman
Posted

It’s the local network. It happens when the remote network is well. I assure you that was only an audio transcode. Not a video transcode. I suppose it could be a network issue, but it would be weird to happen suddenly. Nothing has changed. I get good network throughput as well.

  • Like 1
Jcheinaman
Posted (edited)
On 7/14/2024 at 3:43 PM, Luke said:

How long are you pausing for?

Luke, I've identified what appears to be the issue, however I have zero idea how to troubleshoot a fix. I'm getting dropped frames on Emby according to "stats for nerds". To troubleshoot, I installed Jellyfin and so far can not reproduce the same issue. I also went ahead and reinstalled the lastest beta version of Emby to see if the issue would resolve itself. It did not. I'm testing with the same movie. Any ideas? This happens on all clients and browsers that I've tested.

Edited by Jcheinaman
Jcheinaman
Posted

Watching the same movie in Jelllyfin, i occasionally get a frame or two dropping, but the video doesn't pause, skip back or otherwise isn't noticeable. Emby however, on the same browser (Chrome) gets into the hundreds of dropped frames and skips all over the place. This is usually noticed after pausing for a few moments and then resuming. Stopping and starting the movie again usually fixes this, however sometimes this will happen without pausing. Pausing makes it more likely to happen.

Jcheinaman
Posted

I turned off transcode throttling and it seems to have so far fixed the issue. I still get an occasional frame dropping here and there, but it’s usually after rewinding or fast forwarding and it it is not noticeable. I’m not sure if this is the fix for sure yet but, maybe I’m headed in the right direction.
 

I just wanted to give an update.

Posted
12 hours ago, Jcheinaman said:

I turned off transcode throttling and it seems to have so far fixed the issue. I still get an occasional frame dropping here and there, but it’s usually after rewinding or fast forwarding and it it is not noticeable. I’m not sure if this is the fix for sure yet but, maybe I’m headed in the right direction.
 

I just wanted to give an update.

HI, that's interesting. Thanks for the update.

Jcheinaman
Posted (edited)
22 hours ago, Luke said:

HI, that's interesting. Thanks for the update.

Ok, so this is still happening, just less frequently. I think I can walk you through what’s happening. 
I turned off transcode throttling, so when transcoding audio with a direct play video file, the audio transcodes all the way to the end. (TrueHD or Dolby to a compatible audio format.)
 

If I pause the video for a few minutes, Emby sometimes drops the video from the now playing dashboard. When I hit resume, stats for nerds incorrectly states that the audio file is now direct playing. The stream shows back up under the dashboard as direct playing, then changes to transcoding again and starts the transcode from the beginning. This is causing the video file to skip backwards. 
 

Emby is not remembering the play state. This is where the issue lies. I suspect the issue was the same with transcode throttle enabled. It would just drop the transcode after pausing the file sooner due to the throttle kicking in. 
 

What can I do for you to help get this resolved? Any specific logging I need to enable for you? Regardless, Emby is forgetting my pause state and dropping the transcoding segments for whatever reason and starting the transcode over when I resume the video. 
 

Im currently watching a movie and paused it to write this message. The dashboard no longer shows the video as paused. It’s just gone. When I resume it will say direct playing and then transcode again. I’ll screen record the Emby dashboard when I hit play and attach it here. If it matters, I’m currently using Emby for Samsung. This issue seemed to happen regardless of the client. 
 

if you notice when it starts to transcode again, the audio transcode is behind the video that is supposedly direct playing. When the client realizes that it’s not direct play, it skips back to where the audio transcode began again.

if there is a setting or something I need to change please let me know. I don’t believe this is how it should be working though. And Emby shouldn’t be forgetting that I have a movie on pause and drop the transcode.

 

 

 

Edited by Jcheinaman
Jcheinaman
Posted (edited)
18 minutes ago, Jcheinaman said:

Ok, so this is still happening, just less frequently. I think I can walk you through what’s happening. 
I turned off transcode throttling, so when transcoding audio with a direct play video file, the audio transcodes all the way to the end. (TrueHD or Dolby to a compatible audio format.)
 

If I pause the video for a few minutes, Emby sometimes drops the video from the now playing dashboard. When I hit resume, stats for nerds incorrectly states that the audio file is now direct playing. The stream shows back up under the dashboard as direct playing, then changes to transcoding again and starts the transcode from the beginning. This is causing the video file to skip backwards. 
 

Emby is not remembering the play state. This is where the issue lies. I suspect the issue was the same with transcode throttle enabled. It would just drop the transcode after pausing the file sooner due to the throttle kicking in. 
 

What can I do for you to help get this resolved? Any specific logging I need to enable for you? Regardless, Emby is forgetting my pause state and dropping the transcoding segments for whatever reason and starting the transcode over when I resume the video. 
 

Im currently watching a movie and paused it to write this message. The dashboard no longer shows the video as paused. It’s just gone. When I resume it will say direct playing and then transcode again. I’ll screen record the Emby dashboard when I hit play and attach it here. If it matters, I’m currently using Emby for Samsung. This issue seemed to happen regardless of the client. 
 

if you notice when it starts to transcode again, the audio transcode is behind the video that is supposedly direct playing. When the client realizes that it’s not direct play, it skips back to where the audio transcode began again.

if there is a setting or something I need to change please let me know. I don’t believe this is how it should be working though. And Emby shouldn’t be forgetting that I have a movie on pause and drop the transcode.

 

 

 

 

And here is the Emby dashboard when I pause the movie. You can watch after about exactly one minute it drops it from now playing. When I resume it starts as a direct play. Then changes back to transcoding. 

 

Edited by Jcheinaman
Jcheinaman
Posted

@Luke

any updates on this? Any stream that transcodes. If you pause it, exactly 60 seconds after pause the stream drops from the Emby dashboard. If the stream is direct play, it doesn’t stop at all even after a half hour on pause. Then Resuming the transcoded stream starts the transcode over again and eventually the video still skips back a bit. It’s not as bad as with throttling on, but it’s an issue and it’s really annoying. I’m willing to assist however I can to figure this out. Is this a setting that needs changed? An Emby or ffmpeg bug? 
 

Thanks!!

Posted
On 15/07/2024 at 20:41, Jcheinaman said:

It’s the local network. It happens when the remote network is well. I assure you that was only an audio transcode. Not a video transcode. I suppose it could be a network issue, but it would be weird to happen suddenly. Nothing has changed. I get good network throughput as well.

Did you try resetting all your network gear, switches and routers? Particularly consumer network gear can get a bit funky over time and need a reboot. 

Jcheinaman
Posted (edited)
1 hour ago, SamES said:

Did you try resetting all your network gear, switches and routers? Particularly consumer network gear can get a bit funky over time and need a reboot. 

As much as I appreciate your suggestions. It’s not a network issue. I did further troubleshooting. I installed Emby directly on Windows PC. I put one movie into a media library and played that movie directly from the same local host PC. The audio stream was being transported due to the browser. I paused it and waited 60 seconds. Can you guess what happened? That’s right. The session dropped after 60 seconds being on pause. This is definitely an empty issue. I just wish somebody from the dev community would let me know if they were working on this.

Edited by Jcheinaman
  • Like 1
Happy2Play
Posted
On 7/24/2024 at 11:46 PM, Jcheinaman said:

@Luke

any updates on this? Any stream that transcodes. If you pause it, exactly 60 seconds after pause the stream drops from the Emby dashboard. If the stream is direct play, it doesn’t stop at all even after a half hour on pause. Then Resuming the transcoded stream starts the transcode over again and eventually the video still skips back a bit. It’s not as bad as with throttling on, but it’s an issue and it’s really annoying. I’m willing to assist however I can to figure this out. Is this a setting that needs changed? An Emby or ffmpeg bug? 
 

Thanks!!

Just tested this in a browser and just there appears to be a 60 timer that kills the session on inactivity.  Sort of a good thing but may need to be configurable.

image.png.c78505cffc757be088626c52fe925859.png

Jcheinaman
Posted
Just now, Happy2Play said:

Just tested this in a browser and just there appears to be a 60 timer that kills the session on inactivity.  Sort of a good thing but may need to be configurable.

image.png.c78505cffc757be088626c52fe925859.png

Thank you!! Personally I don’t want my transcoded streams to drop that quickly. I would rather them just sit there for a longer period of time. Not only this is cause playback issues when transcoding, but it hogs additional resources by unnecessarily transcoding a stream that was already transcoded. 
 

thank you for verifying this for me. Honestly, I thought I was going crazy. That’s why I did the windows installation.

Posted

Hi, we’ll take a look at it. Thanks for reporting.

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...