Jump to content

Kodi Playback stops after a few seconds/minutes


Adiventure
 Share

Recommended Posts

Adiventure

Recently made a few big system shifts, putting Emby on a NAS and upgrading my main desktop. While I've got Emby configured and working well (addon mode), and seem to have it setup with Kodi appropriately as well, I'm having a showstopping issue. Whenever I try and play something I get a few seconds to a few minutes before playback stops. The same file is playable through the Emby browser client on the same machine with no issues.

 

As a totally unrelated issue, I am also having trouble with syncing of watched status, as all the items shared with Kodi show as unwatched. I have Trakt on the Emby server, should I add it to Kodi as well? I was worried that might lead to some form of double counting.

 

Kodi debug log here

Edited by quickmic
Link to comment
Share on other sites

quickmic

Hello

First, don't post debug logs in public only regular ones. Debug logs include the api-key what are basically you login data.

I removed the log from the posting.

About playback:

Some uses reported an issue with http2. You can try to disable this function in the plugin config menu and check again.

If this doesn't help, it's probably a network issue. You can modify cache options in advanced settings. Also you can try the transcoding option, if there is a bandwidth limitation. But step by step, try http2 disable first.

 

Sync:

Don't install track on Kodi! If there is a sync issue it depends. As you reported playback issues and I assume this network issue, probably the realtime updates are also not working which means.

Will the progress correctly synced after Kodi restart or is there only an issue is running and updates are not received?

To test the websocket connection, you can send a text msg from Emby server to Kodi device.

 

btw, the log seems to be ok. No major issues

 

Edited by quickmic
Link to comment
Share on other sites

Adiventure

Thank you for that. I had scanned it briefly, but obviously missed the concern.

 

As it comes to the network, in this instance I've got a reverse proxy running on an Unraid server, though currently both computers are connected to the same network (albeit on different vlans). Should be no bandwidth issues between the two, as the slowest point is the gigabit network port on the server, all other connections are 2 gigabit or above.

 

Watched status has never synced to Kodi in this install.

 

I'm currently testing with http2 disabled, so far so good, so fingers crossed. It doesn't seem to have fixed the syncing of watched status however.

Link to comment
Share on other sites

quickmic
25 minutes ago, Adiventure said:

reverse proxy running on an Unraid server,

And that's most likely part of the issue. I've also an apache proxy in use, and need "special" config to work with websocket which are in use by the plugin.

Google: "ws" or "wss"

ws=websocket

wss=websocket secure (ssl encryption)

 

e.g. my config:

 

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName multimedia.rms-systems.net
        Protocols h2 http/1.1
        AllowEncodedSlashes NoDecode
        SSLProxyEngine On
        SSLProxyVerify None
        SSLProxyCheckPeerCN Off
        SSLProxyCheckPeerName Off
        ProxyRequests off
        ProxyPreserveHost on
        ProxyPass "/embywebsocket" "ws://192.168.0.207:80/"
        ProxyPassReverse "/embywebsocket/" "ws://192.168.0.207:80/"
        ProxyPass "/" "http://192.168.0.207:80/" retry=0
        ProxyPassReverse "/" "http://192.168.0.207:80/"
        LogLevel warn
        SSLEngine on
        SSLCertificateFile /mnt/storage0/configs/webserver/ssl-signed/xxx.rms-systems.net/xxx_certificate.crt
        SSLCertificateKeyFile /mnt/storage0/configs/webserver/ssl-signed/xxx.rms-systems.net/xxx_privatekey.pem

</VirtualHost>
</IfModule>

<VirtualHost *:80>
        ServerName multimedia.rms-systems.net
        LogLevel warn
        RewriteEngine on
        RewriteCond %{REQUEST_SCHEME} =http
        RewriteCond %{SERVER_NAME} =multimedia.rms-systems.net
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
        RewriteCond %{REQUEST_SCHEME} =ws
        RewriteCond %{SERVER_NAME} =multimedia.rms-systems.net
        RewriteRule ^ wss://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>


sending text msg from Emby server to Kodi device is a proper test for websocket connection.

 

btw, "protocols h2" is support for "http2"

Edited by quickmic
Link to comment
Share on other sites

Adiventure
13 minutes ago, quickmic said:

And that's most likely part of the issue. I've also an apache proxy in use, and need "special" config to work with websocket which are in use by the plugin.

Google: "ws" or "wss"

ws=websocket

wss=websocket secure (ssl encryption)

 

e.g. my config:

 

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName multimedia.rms-systems.net
        Protocols h2 http/1.1
        AllowEncodedSlashes NoDecode
        SSLProxyEngine On
        SSLProxyVerify None
        SSLProxyCheckPeerCN Off
        SSLProxyCheckPeerName Off
        ProxyRequests off
        ProxyPreserveHost on
        ProxyPass "/embywebsocket" "ws://192.168.0.207:80/"
        ProxyPassReverse "/embywebsocket/" "ws://192.168.0.207:80/"
        ProxyPass "/" "http://192.168.0.207:80/" retry=0
        ProxyPassReverse "/" "http://192.168.0.207:80/"
        LogLevel warn
        SSLEngine on
        SSLCertificateFile /mnt/storage0/configs/webserver/ssl-signed/xxx.rms-systems.net/xxx_certificate.crt
        SSLCertificateKeyFile /mnt/storage0/configs/webserver/ssl-signed/xxx.rms-systems.net/xxx_privatekey.pem

</VirtualHost>
</IfModule>

<VirtualHost *:80>
        ServerName multimedia.rms-systems.net
        LogLevel warn
        RewriteEngine on
        RewriteCond %{REQUEST_SCHEME} =http
        RewriteCond %{SERVER_NAME} =multimedia.rms-systems.net
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
        RewriteCond %{REQUEST_SCHEME} =ws
        RewriteCond %{SERVER_NAME} =multimedia.rms-systems.net
        RewriteRule ^ wss://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>


 

This may be a shred beyond my effectively script kiddie knowledge. I believe I have the gist, but not the comprehension that would say, 'oh, I got it, it's just not doing x, I need to add line y here'

 

This is the NGINX Emby config, which has just the basic changes as indicated in the comments.

 

## Version 2021/05/18
# make sure that your dns has a cname set for emby and that your emby container is not using a base url
# if emby is running in bridge mode and the container is named "emby", the below config should work as is
# if not, replace the line "set $upstream_app emby;" with "set $upstream_app <containername>;"
# or "set $upstream_app <HOSTIP>;" for host mode, HOSTIP being the IP address of emby
# in emby settings, under "Advanced" change the public https port to 443, leave the local ports as is, set the "external domain" to your url,
# and set the "Secure connection mode" to "Handled by reverse proxy"

server {
    listen *port* ssl;
    listen [::]:*port* ssl;

    server_name *subdomain**;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app EmbyServer;
        set $upstream_port *port*;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
    }
}

 

Setup was done as described in this walkthrough:

 

Link to comment
Share on other sites

quickmic
22 hours ago, quickmic said:

sending text msg from Emby server to Kodi device is a proper test for websocket connection.

 

Link to comment
Share on other sites

Adiventure
8 hours ago, quickmic said:

 

Took a minute to figure out how one does that. Sending a text while a file is playing works well.

Link to comment
Share on other sites

quickmic
5 hours ago, Adiventure said:

Took a minute to figure out how one does that. Sending a text while a file is playing works well.

That's very good, so you can rule out a socket issue 👌

About progress updates/watched status. Is it currently out of sync? For which content and can you repeat the incorrect watched status any time with a specific test case?

Link to comment
Share on other sites

Adiventure
Posted (edited)
6 minutes ago, quickmic said:

That's very good, so you can rule out a socket issue 👌

About progress updates/watched status. Is it currently out of sync? For which content and can you repeat the incorrect watched status any time with a specific test case?

Currently it shows only the items that have been watched with that specific client, while the server side is accurate. That's part of why I assume pebkac, presumably zero syncing is something I've somehow misconfigured, but I'm not sure what that may be.

Edited by Adiventure
Link to comment
Share on other sites

quickmic
4 minutes ago, Adiventure said:

Currently it shows as nothing watched on the client, while the server side is accurate. That's part of why I assume pebkac, presumably zero syncing is something I've somehow misconfigured, but I'm not sure what that may be.

First test: Try to set back the sync date (plugin configure menu) by a couple of days (before you watched an episode). Restart Kodi and check if the episode is proper tagged.

Second test: Finish watching an episode and check if it tagged as watched without Kodi restart. (you can use seek to the end of a episode, no need to really watch the complete episode).

Are you using autoplay next episode?

 

Edited by quickmic
Link to comment
Share on other sites

Adiventure

Well, I wasn't wrong, definitely was user error.

 

The one piece that genuinely wasn't (I think) my fault was that it appears the Trakt token somehow went bad. The fact that I didn't notice was fully down to my own stupidity looking at multiple accounts. Effectively no accounts were syncing with Trakt, but that was being hidden by looking at the admin account which did show a large watched history.

 

Thank you again.

  • Like 1
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
 Share

×
×
  • Create New...