Jump to content

Recommended Posts

Posted
59 minutes ago, weble said:

It’s got some optimizations for Emby in the config.

Can you elaborate as I am not fluent in nginx config...? Optimazations are always welcome.

I have some stuttering and dropped frames when viewing files but I am not sure if it is NPM that is causing it. I suspect it is Firefox that I am using for playback.

Posted

In NPM under the advanced tab on your emby entry,

Make sure you use the following:

tcp_nodelay on;  ## Sends data as fast as it can not buffering large chunks
sendfile        off;  ## sendfile not used in a proxy env
proxy_buffering off; ## Not needed for Emby

I did a write up earlier on NPM when i tested it out. It should still apply if you want the entire config converted into NPM.

https://emby.media/community/index.php?/topic/93074-how-to-emby-with-nginx-with-csp-options/page/11/#findComment-1364019

 

  • Thanks 1
  • 2 weeks later...
Posted

Thanks for the info, I'll try those and see how it effects palyback.

  • Thanks 1
Posted
On 6/11/2024 at 9:39 AM, weble said:

@plessers@gmail.com

If your using NPM you need to setup a custom location for emby and ideally you also use advanced.

I just spun up a docker container to test this, it works great, nice interface but I am old school and prefer nginx config files.

Under Advanced tab use this:
 

    include       mime.types;
    default_type  application/octet-stream;
    server_tokens off;
    sendfile        off;  ##sendfile not used in a proxy env
    proxy_buffering off;

    gzip on;   ## Compresses the content to the client, speeds up client browsing.
    gzip_disable "msie6";

    gzip_comp_level 6;
    gzip_min_length 1100;
    gzip_buffers 16 8k;
    gzip_proxied any;
    gzip_types
        text/plain
        text/css
        text/js
        text/xml
        text/javascript
        application/javascript
        application/x-javascript
        application/json
        application/xml
        application/rss+xml
        image/svg+xml;

    proxy_connect_timeout 1h;
    proxy_send_timeout 1h;
    proxy_read_timeout 1h;
    tcp_nodelay on;  ## Sends data as fast as it can not buffering large chunks


Under custom location use this:

image.png.9e067e48b155d10e8a8c08c587ce16a7.png

    location / {
        proxy_pass http://xxx.xxx.xxx.xxx:8096;  ## Enter the IP and port of the backend emby server here.
        client_max_body_size 1000M;  ## Allows for mobile device large photo uploads.

        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.

    ## ADDITIONAL SECURITY SETTINGS ##
    ## Optional settings to improve security ##
    ## add these after you have completed your testing and ssl setup ##
    ## NOTICE: For the Strict-Transport-Security setting below, I would recommend ramping up to this value ##
    ##         See https://hstspreload.org/ read through the "Deployment Recommendations" section first!   ##
        add_header 'Referrer-Policy' 'origin-when-cross-origin';
        add_header Strict-Transport-Security "max-age=15552000; preload" always;
        add_header X-Frame-Options "SAMEORIGIN" always;
        add_header X-Content-Type-Options "nosniff" always;
        add_header X-XSS-Protection "1; mode=block" always;

     ## 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;
        }


If your still having issues, its possible your client or server is limiting the bitrate. Double check your emby settings for that.

I recently moved from Nginx hosted on a Linux VM on my old Vmware whitebox home server to Nginx Proxy Manager hosted in a docker instance hosted on an LXC in my new proxmoxVE white box home server and moved from Emby Server hosted on a ubuntu VM on the same old home server to Emby Server hosted on a docker instance within a separate LXC on the same new proxmoxve whitebox home server.  The Emby docker host even has a vgpu for transcoding support as well as the OTA HDHomerun system has its own transcoding capability. 

Recently, I have noticed in testing I was getting multiple dropped frames and random pauses in buffering when watching videos in my computer browser during testing.  It isn't a huge deal as most of the time the rest of the house is using apps (Samsung smartTV, Apple TV, and IOS devices).  Normally those direct play and I don't have much trouble.  It has been driving me mad trying to figure out what it was.  I didn't mess with the custom location but did the what is listed in the below screenshots in Nginx Proxy Manager. it seems to run significantly better.  I am not getting any drops anymore but I do get the random pause for just a second.  can someone enumerate what changes are needed in the custom locations?  

Nginx_emby1.png

Nginx_emby2.png

Nginx_emby3.png

Emby_Network_config.png

emby_transcode.png

Posted
6 hours ago, Tur0k said:

I recently moved from Nginx hosted on a Linux VM on my old Vmware whitebox home server to Nginx Proxy Manager hosted in a docker instance hosted on an LXC in my new proxmoxVE white box home server and moved from Emby Server hosted on a ubuntu VM on the same old home server to Emby Server hosted on a docker instance within a separate LXC on the same new proxmoxve whitebox home server.  The Emby docker host even has a vgpu for transcoding support as well as the OTA HDHomerun system has its own transcoding capability. 

Recently, I have noticed in testing I was getting multiple dropped frames and random pauses in buffering when watching videos in my computer browser during testing.  It isn't a huge deal as most of the time the rest of the house is using apps (Samsung smartTV, Apple TV, and IOS devices).  Normally those direct play and I don't have much trouble.  It has been driving me mad trying to figure out what it was.  I didn't mess with the custom location but did the what is listed in the below screenshots in Nginx Proxy Manager. it seems to run significantly better.  I am not getting any drops anymore but I do get the random pause for just a second.  can someone enumerate what changes are needed in the custom locations?  

Nginx_emby1.png

Nginx_emby2.png

Nginx_emby3.png

Emby_Network_config.png

emby_transcode.png

Actually I figured it out.  it was a formatting issue. Once I copied the code and removed all the tabs and did 2 spaces for indent all the code works.

  • Thanks 1
  • 2 weeks later...
crusher11
Posted

NGINX no longer seems to be working. Connecting via my domain times out, and connecting via my IP gets me my router's setup page.

Nothing in my setup has changed, so I'm not sure why this is suddenly happening.

Posted
5 hours ago, crusher11 said:

NGINX no longer seems to be working. Connecting via my domain times out, and connecting via my IP gets me my router's setup page.

Nothing in my setup has changed, so I'm not sure why this is suddenly happening.

The huge issue is that you can get to your routers setup page via your public IP. You need to check if you have been compromised. Under no circumstances should your routers setup page be on the public side. 

 

crusher11
Posted (edited)
59 minutes ago, weble said:

The huge issue is that you can get to your routers setup page via your public IP. You need to check if you have been compromised. Under no circumstances should your routers setup page be on the public side. 

 

It certainly doesn't seem ideal, but I'm not sure how it happened or what to do about it.

EDIT: Double-checked via my phone with WiFi off, rather than via my PC which is wired to the router, and I now get a timeout error rather than the router setup page, which I guess is a bit reassuring but I still have no idea what's going on.

Edited by crusher11
  • 1 month later...
Shiroyama
Posted

I did the modifications and switch to Brave for Emby. It is better than Firefox but still there are dropped frames once in a while.

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