Jump to content

How to debug 'stuttering' playback?


Bolo Popo

Recommended Posts

Bolo Popo

Hello,

I can watch movies and TV on my phone fine, but when I try to stream to my Roku, I get playback constantly interrupted by buffering (e.g. every 5 seconds). When I stream to my phone, then cast my phone to our chromecast, the buffering is a bit better, but it 'stutters' about every 5 seconds instead...

I'm sure this is a problem that can be fixed (as evidenced by everything working on my phone), but I wonder how to debug?

Where to start?

This is Emby 4.7.14.0_15.0.16 on TrueNAS-SCALE-22.12.4.2 (unfortunately).  Intel(R) Atom(TM) CPU C2550 @ 2.40GHz

 

Many thanks

Link to comment
Share on other sites

Bolo Popo

Thank you Luke!

I switched the logs into debug mode, opened emby on my phone. Closed emby on my phone. Opened emby on Roku. Started playing a movie on Emby on Roku. I saw the 'buffer' go up to 33%, then 'rewind' to 26% - A sure sign it's going to fail. Movie failed to play with the 'no stream available' error. I tried to play an episode on Emby on Roku. The episode started and played about 2 seconds. After two seconds it started buffering. Then another two seconds played, then buffering... I opened the episode on my phone. It seems to play fine. I tried casting the episode from my phone to Roku... didn't seem to work. I tried casting the episode from my phone to chromecast... This seemed to work and played better, but about every 5 seconds there was a 500ms 'stutter' (pause) in the playback. I watched about 3 minutes with a pause every 5 seconds.

Debug log of all that excitement attached 🙂

 

Cheers,
Dan.

embyserver.txt

Link to comment
Share on other sites

Bolo Popo
2023-12-16 19:12:26.323 Error App: ProcessRun 'StreamTranscode e4ed7b': Error starting Ffmpeg. WorkingFolder:
    *** Error Report ***
    Version: 4.7.14.0
    Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
    Operating system: Linux version 5.15.131+truenas (root@tnsbuilds01.tn.ixsystems.net) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1
    Framework: .NET 6.0.20
    OS/Process: x64/x64
    Runtime: app/emby/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /config
    Application path: /app/emby
    System.ObjectDisposedException: System.ObjectDisposedException: Cannot access a disposed object.
    Object name: 'Emby.Server.MediaEncoding.Unified.Ffmpeg.FfmpegRunner'.
       at Emby.ProcessRun.Runners.ProcessRunnerBase.Run(StartParams startParams)
       at Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunnerBase.Start(String commandLineArgs)
    Source: Emby.ProcessRun
    TargetSite: Boolean Run(Emby.ProcessRun.Common.StartParams)
   

 

Link to comment
Share on other sites

Bolo Popo
jaycedk

Looking at 1 of your logs

/media/Sonarr/The Simpsons/Season 8/The.Simpsons.S08E11.1080p.WEBRip.x265-INFINITY.mp4","Type":"Default","Container":"mp4","Size":382442458,"Name":"The.Simpsons.S08E11.1080p.WEBRip.x265-INFINITY

18:55:19.787 Output #0, segment, to '/config/transcoding-temp/B89214/B89214_%d.ts':
18:55:19.787   Metadata:
18:55:19.787     encoder         : Lavf59.17.100
18:55:19.788   Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 90k tbn
18:55:19.788     Metadata:
18:55:19.788       encoder         : Lavc59.21.100 libx264
18:55:19.788     Side data:
18:55:19.788       cpb: bitrate max/min/avg: 4007000/0/0 buffer size: 8014000 vbv_delay: N/A
18:55:19.788   Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 225 kb/s (default)
18:55:19.804 elapsed=00:00:00.84 frame=    1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A throttle=off speed=   0x    
18:55:20.207 elapsed=00:00:01.34 frame=   15 fps= 11 q=0.0 size=N/A time=00:00:00.59 bitrate=N/A throttle=off speed=0.443x    
18:55:20.726 elapsed=00:00:01.86 frame=   25 fps= 13 q=28.0 size=N/A time=00:00:01.02 bitrate=N/A throttle=off speed=0.549x    
18:55:21.266 elapsed=00:00:02.40 frame=   36 fps= 15 q=28.0 size=N/A time=00:00:01.49 bitrate=N/A throttle=off speed=0.621x    
18:55:21.913 elapsed=00:00:03.05 frame=   47 fps= 15 q=28.0 size=N/A time=00:00:01.94 bitrate=N/A throttle=off speed=0.636x    
18:55:22.440 elapsed=00:00:03.58 frame=   58 fps= 16 q=28.0 size=N/A time=00:00:02.41 bitrate=N/A throttle=off speed=0.673x    
18:55:22.970 elapsed=00:00:04.11 frame=   69 fps= 17 q=28.0 size=N/A time=00:00:02.85 bitrate=N/A throttle=off speed=0.695x    
18:55:23.508 elapsed=00:00:04.64 frame=   79 fps= 17 q=28.0 size=N/A time=00:00:03.28 bitrate=N/A throttle=off speed=0.707x    
18:55:24.019 elapsed=00:00:05.15 frame=   87 fps= 17 q=28.0 size=N/A time=00:00:03.60 bitrate=N/A throttle=off speed=0.699x    

This looks like your server is not capable of handling hevc / x256 files, when it needs to transcode

Link to comment
Share on other sites

Bolo Popo

Thanks both,

If it were simply an issue of transcoding on the server, how come I can stream the same content to my phone or my 'nest hub mini'?

It seems the problem only arises when streaming either directly from my Roku or 'indirectly' when casting from my phone to the Chromecast...

I may be missing something, but surely if it works in the former configurations, surely it should be at least possible in principle to work in the latter configurations...

 

I think it also works 'directly' on my laptop too... lemmy check...

 

Cheers,

 

 

Link to comment
Share on other sites

1 hour ago, Bolo Popo said:

Yup, works on my laptop without stuttering or other issues.

Maybe it's not transcoding in this scenario. Can we please see an example of that? Thanks.

Link to comment
Share on other sites

Bolo Popo

Sorry for not being prompt with replies / missing information.

So far it's been working OK on the Roku... (emby app) let me try again. There was an issue of Sonarr using tons of CPU which I fixed by purging the activity queue. It didn't seem directly related, but maybe it was causing issues.

Link to comment
Share on other sites

Bolo Popo

Since it's working (now) on all but Roku, here are the details of that.

 

I can provide logs of it failing on that?

Selection_142.png

Link to comment
Share on other sites

  • 2 weeks later...
2 hours ago, Bolo Popo said:

Yes, except on roku...

If you play videos that have h264 instead of hevc, how does that compare?

Link to comment
Share on other sites

  • 3 weeks later...
Bolo Popo

I'm really sorry for taking forever to debug this... How do I identify some videos to test?

Link to comment
Share on other sites

  • 3 weeks later...

@Bolo PopoI guess what I mean is, are a lot of your videos impacted by this, or only certain ones?

Can you provide log examples from a different video that exhibits this issue? Thanks !

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