Jump to content

Playback is paused in the first minute and can't be resumed


sephrat
Go to solution Solved by sephrat,

Recommended Posts

sephrat

Not sure if it's web app related but that's my only test case.

 

I try to play a 4K HEVC with PGSSUB with Chrome on my computer, thus causing a transcode. When the quality is set quite high, after some time the playback will suddenly pause and I can't resume it. Setting a lower quality resumes the playback and fixes the issue, but not using auto quality. 100% reproducable.

 

The lesser quality the later the issue happens. 4K 60Mbps ran for 59s whereas 4K 120Mbps stops after 39s (this seems consistent through several tries).

It shouldn't be a bandwidth issue, I can see through the client monitor the network activity peeks at 300Mbps, then pauses, then resumes at 300Mbps. I've noticed the CPU throttles at 100% with high bitrate settings, then when the playback pauses it goes back to 0-ish% (quite expectedly).

I can see the server still transcoding when the playback freezes. The client just seems to hang eternally.

 

I can't see anything troubling in the log, I'll attach them nevertheless. In this one, the time of death is 23:12:58, the playback stuck at 00:00:39 (quality 4K 120Mbps).

Log.txttranscode.txt

I got this in Chrome console:

3htmlmediahelper.js?v=4.1.1.0:1 HLS Error: Type: mediaError Details: bufferFullError Fatal: false
apiclient.js?v=4.1.1.0:1 Requesting url without automatic networking: http://192.168.1.109:8096/emby/Sessions/Playing/Progress
htmlmediahelper.js?v=4.1.1.0:1 HLS Error: Type: mediaError Details: bufferAppendingError Fatal: false
apiclient.js?v=4.1.1.0:1 Requesting url without automatic networking: http://192.168.1.109:8096/emby/Sessions/Playing/Progress
2apiclient.js?v=4.1.1.0:1 Requesting url without automatic networking: http://192.168.1.109:8096/emby/Sessions/Playing/Progress

Is that nasty?

 

 

I'll try to do some more testing tomorrow, but maybe someone has an idea on the root cause... Any help is appreciated.  :) 

Link to comment
Share on other sites

Hi there, as a test, if you turn off the subtitles, does this still happen?

Link to comment
Share on other sites

sephrat

Yes it does. Just tried with 4K 40Mbps (strangely when I choose 1080p 60 Mbps it always reverses to 4K 40Mbps).

See log:

Transcode no subtitles.txtLog.txt

 

I also tried with a different audio track (DD stereo), still the same.

When I turn HWA off, it works fine (except it stutters a bit because my CPU suffers).

Transcode - HWA off is OK.txt

I guess now it's probably related to HW transcode and not web app specifically?

 

Additionnally I tried with a different file (still 4K HDR) with HWA on, I still bump into this issue. 

 

I just tried with a "regular" file causing no transcode, so far so good.

Transcode log - OK file.txt

 

I'll try to test with a Chromecast during the weekend.

Edited by sephrat
Link to comment
Share on other sites

sephrat

I tried with my Android phone, it works OK.

Transcode OK Android.txt

 

I tried with Emby Theater for W10 on the computer I have issue with, it works OK.

Transcode OK Emby Theater.txt

 

Same with a Chromecast (lost the transcode log in the meantime, sorry).

 

I tried on a different computer of mine, connected to network through PLC (my first computer uses Wi-FI AC), I have the same issue.

Transcode KO other computer - Chrome.txt

I noticed both my computer had Chrome 74, I updated to Chrome 75 => no improvement.

 

It seems to happen on IE as well. However IE is quite unresponsive during the playback so I don't know if I have to blame IE or Emby for that.

 

---

To sum it up, I can only reproduce on Chrome with HWA on. Other clients or software transcode or direct play works flawlessly (note: software transcode averages at 20fps so not perfect but I didn't expect more with a i3 NUC).

 

To be honest it's not that big an issue to me, I noticed that only because it happened when I was benchmarking the HWA. I don't plan on using Emby with Chrome. 

 

FYI I can still pause/resume the play through the server UI: I can see on the client that the command is received (the icons switch from "pause" to "play" back and forth) but it doesn't resume playback. The server thinks it's still playing: the playback progress increments but after ~10s it resets to the actual playback progress (do I make sense?). I can also stop the play from the server UI and that does work.

Edited by sephrat
Link to comment
Share on other sites

  • 2 weeks later...
sephrat

@@Luke I upgraded to 4.2.0.19, I can still reproduce.

 

Logs attached. It paused and got stuck at position 0:53.

I'm happy to do more tests if needed.

 

As it seems I'm the only one reporting it, don't bother too much if you can't figure it out. As I said earlier, it doesn't bother me as I usually don't use Emby with Chrome.

embyserver.txt

ffmpeg-transcode.txt

Link to comment
Share on other sites

@@sephrat are you still running into this? We'd like to resolve it. Can you provide a copy of the chrome debug console output? Thanks !

Link to comment
Share on other sites

sephrat

OK I don't know how I never saw this in the console but here we go:

apphost.js?v=4.2.0.23:1 triggering app resume event
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Users/a588284f0b2442d2a5c836c18f76c398/Items/77099
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Users/a588284f0b2442d2a5c836c18f76c398
registrationservices.js?v=4.2.0.23:1 validateFeature: playback
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Items/77099/PlaybackInfo?UserId=a588284f0b2442d2a5c836c18f76c398&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&MaxStreamingBitrate=120000000
plugin.js?v=4.2.0.23:1 playing url: https://my.domain/emby/videos/77099/master.m3u8?DeviceId=TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzc0LjAuMzcyOS4xNjkgU2FmYXJpLzUzNy4zNnwxNTU5MjE2MTk2Nzg3&MediaSourceId=8c0cde332e4b56982eeb82fb73670baf&PlaySessionId=1c54e54021d7466bb3070c770dbc9ca1&api_key=02267be3c10f44f994c8efa100061fda&VideoCodec=h264&AudioCodec=mp3,aac&VideoBitrate=119776000&AudioBitrate=224000&AudioStreamIndex=8&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=51&TranscodeReasons=VideoCodecNotSupported,AudioCodecNotSupported
htmlmediahelper.js?v=4.2.0.23:1 HLS Error: Type: mediaError Details: bufferSeekOverHole Fatal: false
router.js?v=4.2.0.23:1 appRouter - processing path request /emby/web#!/videoosd.html
router.js?v=4.2.0.23:1 appRouter - user is authenticated
router.js?v=4.2.0.23:1 appRouter - proceeding to /emby/web#!/videoosd.html
playbackmanager.js?v=4.2.0.23:1 Active player: {"name":"Html Video Player","id":"htmlvideoplayer","playerName":"Html Video Player","playableMediaTypes":[false,true,false,false,false],"isLocalPlayer":true,"supportedCommands":["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","PlayMediaSource","PlayTrailers","ToggleFullscreen","PictureInPicture","SetBrightness"]}
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing
videoosd.js?v=4.2.0.23:1 nowplaying event: playbackstart
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
plugin.js?v=4.2.0.23:1 Setting new text track index to: -1
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
htmlmediahelper.js?v=4.2.0.23:1 HLS Error: Type: mediaError Details: bufferFullError Fatal: false
htmlmediahelper.js?v=4.2.0.23:1 HLS Error: Type: mediaError Details: bufferAppendingError Fatal: false
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apphost.js?v=4.2.0.23:1 app is hidden
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apiclient.js?v=4.2.0.23:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress

The first HLS error coincides with a slight stutter. The last one coincides with the exact moment the playback pauses.

 

Not sure the source is reliable but according to https://github.com/video-dev/hls.js/issues/1050 the error may trigger a pause.

Edited by sephrat
Link to comment
Share on other sites

Would you mind doing a quick test - does this issue happen if hardware acceleration is disabled under server transcoding settings?

Link to comment
Share on other sites

sephrat

Would you mind doing a quick test - does this issue happen if hardware acceleration is disabled under server transcoding settings?

I did that test already in #3. It only happens if HWA is on.
Link to comment
Share on other sites

sephrat

Some more info about that test when HWA is off: I do get some error messages in the console. The playback works fine nevertheless

 

apphost.js?v=4.2.0.24:1 triggering app resume event
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Users/a588284f0b2442d2a5c836c18f76c398
registrationservices.js?v=4.2.0.24:1 validateFeature: playback
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Items/77099/PlaybackInfo?UserId=a588284f0b2442d2a5c836c18f76c398&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&AudioStreamIndex=8&SubtitleStreamIndex=-1&MediaSourceId=8c0cde332e4b56982eeb82fb73670baf&MaxStreamingBitrate=120000000
plugin.js?v=4.2.0.24:1 playing url: https://my.domain/emby/videos/77099/master.m3u8?DeviceId=TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzc0LjAuMzcyOS4xNjkgU2FmYXJpLzUzNy4zNnwxNTU5MjE2MTk2Nzg3&MediaSourceId=8c0cde332e4b56982eeb82fb73670baf&PlaySessionId=095ce55f161442fca4d66c5f43abfd1c&api_key=02267be3c10f44f994c8efa100061fda&VideoCodec=h264&AudioCodec=mp3,aac&VideoBitrate=119776000&AudioBitrate=224000&AudioStreamIndex=8&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=51&TranscodeReasons=VideoCodecNotSupported,AudioCodecNotSupported
htmlmediahelper.js?v=4.2.0.24:1 HLS Error: Type: mediaError Details: bufferSeekOverHole Fatal: false
router.js?v=4.2.0.24:1 appRouter - processing path request /emby/web#!/videoosd.html
router.js?v=4.2.0.24:1 appRouter - user is authenticated
router.js?v=4.2.0.24:1 appRouter - proceeding to /emby/web#!/videoosd.html
playbackmanager.js?v=4.2.0.24:1 Active player: {"name":"Html Video Player","id":"htmlvideoplayer","playerName":"Html Video Player","playableMediaTypes":[false,true,false,false,false],"isLocalPlayer":true,"supportedCommands":["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","PlayMediaSource","PlayTrailers","ToggleFullscreen","PictureInPicture","SetBrightness"]}
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing
videoosd.js?v=4.2.0.24:1 nowplaying event: playbackstart
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
plugin.js?v=4.2.0.24:1 Setting new text track index to: -1
htmlmediahelper.js?v=4.2.0.24:1 HLS Error: Type: mediaError Details: bufferStalledError Fatal: false
htmlmediahelper.js?v=4.2.0.24:1 HLS Error: Type: mediaError Details: bufferStalledError Fatal: false
htmlmediahelper.js?v=4.2.0.24:1 HLS Error: Type: mediaError Details: bufferNudgeOnStall Fatal: false
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress
apphost.js?v=4.2.0.24:1 app is hidden
htmlmediahelper.js?v=4.2.0.24:1 HLS Error: Type: networkError Details: fragLoadError Fatal: false
apiclient.js?v=4.2.0.24:1 Requesting url without automatic networking: https://my.domain/emby/Sessions/Playing/Progress

 

Edited by sephrat
Link to comment
Share on other sites

  • 1 month later...
sephrat

@@sephrat - Does this happen with multiple video files or just with this one?

It did occur with another 4K HDR film IIRC.

It doesn't seem to fail with a 1080p HEVC encoded film (running for 5 minutes so far).

I'll try to narrow it down in the next few days.

Link to comment
Share on other sites

It did occur with another 4K HDR film IIRC.

It doesn't seem to fail with a 1080p HEVC encoded film (running for 5 minutes so far).

I'll try to narrow it down in the next few days.

 

Great, thanks !

Link to comment
Share on other sites

sephrat

A few more tests:

  • 4K HDR: fail after 0:29
    Title4K HEVC
    CodecHEVC
    ProfilMain 10
    Niveau153
    Résolution3840x2160
    Ratio d'aspect original16:9
    AnamorphiqueNo
    EntrelacéNo
    Images par seconde23,976
    Débit81 316 kbps
    Gamme vidéoHDR
    Couleurs primairesbt2020
    Espace colorimétriquebt2020nc
    Transfert de couleursmpte2084
    Format de pixelyuv420p10le
    Images de référence1
  • 4K non-HDR AAC stereo: test OK but it's direct playing so it seems normal (first tests showed that it's related to HWA).
  • 4K non-HDR downgraded to 1080p 30Mbps: test OK (it's been playing for 5 minutes)
  • Yet another 4K HDR: fail after 1:17 
    Title4K HEVC
    CodecHEVC
    ProfilMain 10
    Niveau153
    Résolution3840x2160
    Ratio d'aspect original16:9
    AnamorphiqueNo
    EntrelacéNo
    Images par seconde23,976
    Débit48 049 kbps
    Gamme vidéoHDR
    Couleurs primairesbt2020
    Espace colorimétriquebt2020nc
    Transfert de couleursmpte2084
    Format de pixelyuv420p10le
    Images de référence1

For the record, info about the first film I used for testing in this topic:
Title4K HEVC
CodecHEVC
ProfilMain 10
Niveau153
Résolution3840x2160
Ratio d'aspect original16:9
AnamorphiqueNo
EntrelacéNo
Images par seconde23,976
Débit69 685 kbps
Gamme vidéoHDR
Couleurs primairesbt2020
Espace colorimétriquebt2020nc
Transfert de couleursmpte2084
Format de pixelyuv420p10le
Images de référence1

 

 

So far the common factor is HDR.

I'd be happy to help furthermore but I don't know what other tests I can make. Basically all of my films are 4K HDR of the same kind. Tests I made at the beginning of this topic showed that it's not audio related.

 

Link to comment
Share on other sites

@@sephrat - What are you doing in your browser? There are some nasty things going on... 

 

Does the term "torrentGrid" tell you anything?

 

All this is clearly a client issue, not a transcoding issue. In all cases, transcoding is stopped on client request.

Link to comment
Share on other sites

sephrat

What are you doing in your browser? There are some nasty things going on...

I'm just sitting idly when the issue occurs. I even ran one of my test just after a fresh boot on a clean browser.

Does the term "torrentGrid" tell you anything?

Not really. I'm puzzled, did you see that somewhere in my logs?

All this is clearly a client issue, not a transcoding issue. In all cases, transcoding is stopped on client request.

When HWA is off, the issue doesn't occur. Maybe there's a frame the transcoding process sends that the Web client in particular doesn't like?

 

To sum up all of my previous posts:

  • Only happens when HWA is on
  • Happens whatever the audio format is
  • Only happened with 4K HDR
  • Happens whatever the browser or computer/OS, but only in web (other apps are OK)
  • Happens whatever the local network hardware

     

Link to comment
Share on other sites

sephrat

Do you have any browser extensions installed?

 

Can you try with a different browser?

IE and Firefox completely freeze at the quality I set in Chrome (they make my CPU hurt), they're unusable. I need to set the quality lower but then I have to wait several minutes to reproduce the issue, I don't have time at the moment to run more tests but may do in the next few days.

I tried with Chrome through private browsing which supposedly disables extensions and I still have the issue.

Link to comment
Share on other sites

  • 1 month later...
sephrat

@@sephrat are you still able to reproduce this? Our 4.3 beta has an updated ffmpeg build if you'd like to try that. Thanks.

 

Well it seems to have broken some things  :)

19:06:37.935 [h264_vaapi @ 0x21f1740] No usable encoding profile found.
19:06:37.935 Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
19:06:37.948 Conversion failed!
19:06:37.948

Affected codecs:
>>>>>> libx264 Software Encoder
Color Formats: YUV420P, YUVJ420P, YUV422P, YUVJ422P, YUV444P, YUVJ444P, NV12, NV16, NV21, YUV420P10, YUV422P10, YUV444P10, NV20
Profiles: Baseline Profile (Level 6.2), Main Profile (Level 6.2), High Profile (Level 6.2), High 10 Profile (Level 6.2), High 4:2:2 Profile (Level 6.2), High 4:4:4 Profile (Level 6.2)

Info Previous transcoding attempt failed. Falling back to software transcoding.

Happens with 2 of the videos I used in my previous tests. I don't believe it's related to my issue though, I'll open another topic for that.

 

HW transcoding works for another video, but I still have the pause issue thing. Tried with Chrome in incognito mode. Problem not solved.

Link to comment
Share on other sites

  • 4 weeks later...

@@softworkz

I have the exact same issue as OP I can reproduce consistently with a few files, always freezing at the same time.

 

Console log: https://pastebin.com/hCRH7zqK

ffmpeg log: https://pastebin.com/zPcrVMkJ

 

I believe you'll find the file name in the ffmpeg log if you're interested in replicating the problem on your side, freezes at 1:09. Disabling hardware acceleration doesn't fix the issue. Say if you need me to try anything/post more logs.

Edited by Luke
Link to comment
Share on other sites

  • 4 weeks later...

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