Jump to content

Weird behaviour when skipping / fast forwarding


getack
Go to solution Solved by pir8radio,

Recommended Posts

Hello, 

I have recently started experiencing some weird behaviour when trying to skip ahead while watching a movie or TV show.

  • When I start playing a thing, and I press the "fast forward 10 seconds" button, playback simply starts from the beginning.
  • The same issue happens when I press the right keyboard arrow during playback.
  • If I want to manually move the playback location control thing (not sure what it's called?), it simply jumps back to it's original place, ignoring me telling it to start playback at a certain place.

I am experiencing this on both the

  • web client, emby server v 4.6.4.0 (viewing via MS Edge, v 94.0.992.31)
  • Emby Theater for Windows v 3.0.15

I am able to replicate this issue on two separate machines, one running Win 10 and the other running Win 11, both running the latest clients.

This appears to only happen when I direct play, as it seems to be fine when the video is being transcoded. I prefer to direct play at all times, as my server is weaksauce and transcoding kills it.

Looking at the console while playing back in the browser, it seems to be a websocket issue, see the following error that pops up the moment I try to change the playback location:

image.png.3f6141cdc3b2cf4c02373da4deb1564d.png

I'm not seeing anything weird when tailing the logs, and I'm also not seeing any API calls fail when looking at the Data tab in the debug tools.

Any other information that I can provide to try and debug this?

Link to comment
Share on other sites

Hi Luke

Please see attached for today's log. I tried to replicate the issue this morning at around 08h30 my time, and I downloaded the log just after I replicated the issue, timestamps in the log are correct.

This time round, the 10-second-skip-forward-button worked as expected, but manually dragging the scroller did not, as described in my OP.

The content I used to replicate this with was What We Do In The Shadows S03E02

 

PS: I am worried about exposing personal information by sharing this log though. There are domains and API keys and things in there. Is this an issue, or is my concern unnecessary?

 

Thank you for your support!

embyserver_playback.txt

Link to comment
Share on other sites

By the way, my instance of the server is available on the general internet, I can give you an account if that will help you better understand the problem?

Link to comment
Share on other sites

  • 2 weeks later...

@Luke yes!!

I have NGINX running on my server to forward requests to my media server domain to the appropriate place in my network.

I was lazy and I set all my devices to point to the domain, rather than the actual IP address of my server, because some of these devices might venture beyond my local network. For example my laptop or mobile phone.

When I change the config and use the server's actual IP in stead of the domain, everything works perfectly. That issue with some videos taking really long to start playing also appears to be resolved now!

Obviously this is a workable solution for my local devices, but I have some friends with accounts on my server, and I watch content on my mobile devices while not on my local network. So doing away with the proxy is not an option.

Here is my config for Emby:

    upstream tv.dlouw.com {
        server 10.0.0.50:8096;
    }
    server {
            listen 80;
            server_name tv.dlouw.com;

            location / {
                proxy_pass         http://tv.dlouw.com;
                proxy_redirect     off;
                proxy_set_header   Host $host;
                proxy_set_header   X-Real-IP $remote_addr;
                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header   X-Forwarded-Host $server_name;

            }
    }

 

I am by no means a proxy or NGINX expert, and I came upon the above config by trial and error. Is there anything that I can change to try and resolve this issue?

Link to comment
Share on other sites

pir8radio
On 10/12/2021 at 1:39 AM, getack said:

@Luke yes!!

I have NGINX running on my server to forward requests to my media server domain to the appropriate place in my network.

I was lazy and I set all my devices to point to the domain, rather than the actual IP address of my server, because some of these devices might venture beyond my local network. For example my laptop or mobile phone.

When I change the config and use the server's actual IP in stead of the domain, everything works perfectly. That issue with some videos taking really long to start playing also appears to be resolved now!

Obviously this is a workable solution for my local devices, but I have some friends with accounts on my server, and I watch content on my mobile devices while not on my local network. So doing away with the proxy is not an option.

Here is my config for Emby:



    upstream tv.dlouw.com {
        server 10.0.0.50:8096;
    }
    server {
            listen 80;
            server_name tv.dlouw.com;

            location / {
                proxy_pass         http://tv.dlouw.com;
                proxy_redirect     off;
                proxy_set_header   Host $host;
                proxy_set_header   X-Real-IP $remote_addr;
                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header   X-Forwarded-Host $server_name;

            }
    }

 

I am by no means a proxy or NGINX expert, and I came upon the above config by trial and error. Is there anything that I can change to try and resolve this issue?

click my avatar and then "About Me" tab...  link to a config there.          you are missing lots of headers and websocket info that emby needs to work.   Missing range headers will cause skip/seek and slow start of mp4 videos..     missing websockets will break dashboard feedback, play position etc... 

Edited by pir8radio
Link to comment
Share on other sites

@pir8radio thanks for the advice. My config is clearly much simpler than yours. SSL has been something that's eluded me since the start, I just cannot wrap my head around. I will tinker with my config this weekend and implement your config example, and maybe use that as an opportunity to implement SSL as well.

 

Quote

Missing range headers will cause skip/seek and slow start of mp4 videos

You explain exactly my issue, both skipping and trouble with MP4 videos. I have such relief that this has been the cause of my problems.

 

Let me implement the correct NGINX config, verify that this has indeed resolved my problems, then I will mark this thread as resolved.

 

Thanks!

Link to comment
Share on other sites

  • Solution
pir8radio
2 hours ago, getack said:

@pir8radio thanks for the advice. My config is clearly much simpler than yours. SSL has been something that's eluded me since the start, I just cannot wrap my head around. I will tinker with my config this weekend and implement your config example, and maybe use that as an opportunity to implement SSL as well.

 

You explain exactly my issue, both skipping and trouble with MP4 videos. I have such relief that this has been the cause of my problems.

 

Let me implement the correct NGINX config, verify that this has indeed resolved my problems, then I will mark this thread as resolved.

 

Thanks!

you can skip the SSL chunks and "security" section of my config..   maybe just replace your "location" block with this part to see if you get it working, then tune from there..

    location / {
        proxy_pass http://127.0.0.1:8096;  ## Enter the IP and port of the backend emby server here.

	proxy_hide_header X-Powered-By;	 ## Hides nginx server version from bad guys.
	proxy_set_header Range $http_range;  ## Allows specific chunks of a file to be requested.
	proxy_set_header If-Range $http_if_range;  ## Allows specific chunks of a file to be requested.
	proxy_set_header X-Real-IP $remote_addr;  ## Passes the real client IP to the backend server.
        #proxy_set_header X-Real-IP $http_CF_Connecting_IP;  ## if you use cloudflare un-comment this line and comment out above line.
        proxy_set_header Host $host;  ## Passes the requested domain name to the backend server.
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  ## Adds forwarded IP to the list of IPs that were forwarded to the backend server.

     ## WEBSOCKET SETTINGS ## Used to pass two way real time info to and from emby and the client.
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
    }

 

Edited by pir8radio
Link to comment
Share on other sites

Hello All, I am happy to mark this as resolved.

I am convinced that it was my bad NGINX configuration that resulted in my pains here. 

After implementing @pir8radio's example config all issues seem to be resolved. I confirmed from friends who use my server remotely and they also confirmed that the skipping issue has been resolved.

I never even considered looking on here for example NGINX configs when I deployed my setup. I just went with what I thought was a good default and never thought about it since.

Thanks to everyone's help, and have a great day!

  • Like 2
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...