Jump to content

Pauses during playback when emby server is behind reverse proxy


bludus

Recommended Posts

bludus

Hello,

I hope to find help with the issue here below, as I found nothing helpful in the forum and I come to a dead end...

I have an emby server (just upgraded to ver. 4.6.1) running in a container, behind a reverse proxy (nginx) in a container too.

My problem is that when a video is transcoded (hls protocol), the playback with the web app (behaviour verified with firefox on a linux pc and chromium edge on a windows pc) is not smooth, but with frequent pauses.

I checked that the transcoding process and the bandwidth are not a bottleneck, and that the issue is not present when I access the emby server without the reverse proxy.

I noticed that with the reverse proxy the .ts fragments are received by the browser 10 times slower than without the reverse proxy, and that with the reverse proxy I get a lot of bufferStalledError and bufferNudgeOnStall errors, with the websocket frequently closed and re-opened.

For information, I attach a couple of screenshots of the browser console playing the same video with (pauses during playback) and without (smooth playback) the reverse proxy, together with the related emby server log and transcoding logs.

I suspect that the issue could be linked to the reverse proxy configuration, so I attach the nginx config for emby also.

Thanks a lot in advance for any help.

Cheers

Maurizio

 

playback with reverse proxy - screenshot 2021-05-30 13-28-28.png

playback without reverse proxy - screenshot 2021-05-30 13-25-54.png

embyserver.txt nginx-emby-config.txt playback with reverse proxy - ffmpeg-transcode-f8f6eca5-8a7b-4a55-a030-6c02bc9e73a9_1.txt playback without reverse proxy - ffmpeg-transcode-b1f3c250-2713-47c3-a9cc-9a3449496811_1.txt

Link to comment
Share on other sites

  • 2 weeks later...
bludus

Hi Luke,

actually I was missing a keepalive directive in the reverse proxy config, which caused to open/close a new connection for each video chunk request.

Once added, the issue disappeared...

Cheers

Maurizio

  • Like 1
Link to comment
Share on other sites

10 hours ago, bludus said:

Hi Luke,

actually I was missing a keepalive directive in the reverse proxy config, which caused to open/close a new connection for each video chunk request.

Once added, the issue disappeared...

Cheers

Maurizio

Oh wow, yea that would cause some network delays.  Glad you got it figured out!

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