Jump to content

SHIELD Experience Upgrade 9.0.0 and Emby for Kodi Next Gen


L3Nerd
 Share

Recommended Posts

btw. As the bandwidth shouldn't be the problem, you can try set the network speed (Video quality) to e.g. 100Mbps and just force transcoding for specific formats.

 

Link to comment
Share on other sites

I can also rule out bandwidth problems.

The server has Gbit/s upstream, the shield's internet has 100 Mbit/s downstream, and I'm the only one who uses it.

I tried several formats: low bandwidth movies, high bandwidth movies, h264 and h265. The only thing that worked: force transcode (set 100 Mbit/s in the settings).

@Luke transcoded vs direct play stream: Are there ANY differences? Any other http headers whatsoever?

@quickmic are you handling transcoded streams ANY different? Do you even see if it's transcoded?

 

Link to comment
Share on other sites

Quote

@Luke transcoded vs direct play stream

It's two different ways to play, so yes, there could be significant differences.

Link to comment
Share on other sites

@quickmic It's not related to the source file. Kodi is playing everything fine over samba and sftp. Mkv, mp4, ts, but also hevc, h264 in all resolutions, profiles, bitrates and included audio formats. So without the emby-next-gen plugin but directly through the Kodi file browser. 

It only seems to struggle when the Emby server tries to direct play those files over https (didn't test http). So without transcoding. It does seems to work however if the Emby server delivers the content after transcoding. Also if it only gets the source file through ffmpeg in copy mode (so video and audio are untouched/equal to source).

So that's why @L3Nerd his questions regarding differences in http(s) serving between direct play and direct stream (transcoding) comes from, I think. 

For me the problem also seems related to the way the files are being served during direct play. So I think we should dig a little deeper into the difference between the http(s) setup/config of direct play vs direct stream (transcoding).

Link to comment
Share on other sites

6 hours ago, red_ said:

@quickmic It's not related to the source file. Kodi is playing everything fine over samba and sftp. Mkv, mp4, ts, but also hevc, h264 in all resolutions, profiles, bitrates and included audio formats. So without the emby-next-gen plugin but directly through the Kodi file browser. 

It only seems to struggle when the Emby server tries to direct play those files over https (didn't test http). So without transcoding. It does seems to work however if the Emby server delivers the content after transcoding. Also if it only gets the source file through ffmpeg in copy mode (so video and audio are untouched/equal to source).

So that's why @L3Nerd his questions regarding differences in http(s) serving between direct play and direct stream (transcoding) comes from, I think. 

For me the problem also seems related to the way the files are being served during direct play. So I think we should dig a little deeper into the difference between the http(s) setup/config of direct play vs direct stream (transcoding).

Transcoding uses hls mode. The stream is split into small chunks.

https://github.com/MediaBrowser/Emby/wiki/Http-Live-Streaming

https://en.wikipedia.org/wiki/HTTP_Live_Streaming

 

Also check adaptive stream settings. Could be related to http streams.

https://kodi.wiki/view/Add-on:InputStream_Adaptive

 

Edited by quickmic
Link to comment
Share on other sites

Hi guys,

I found a workaround that workers for me. If you disable http2 in advanced settings.xml everything works as before the Android 11 upgrade!

https://github.com/xbmc/xbmc/issues/20631

I copied the advancedsettings.xml file which was already in the "Profile directory" via the Kodi File Browser to a remote SSH location, added the <disablehttp2>true</disablehttp2> part in the <network> section which was already in the file via nano/vi on the remote server and copied the file back via the Kodi File Browser.

Works like a charm again 👌🏻

Not sure what's the difference in http2 implementation between Android 10 and 11 which causes this behaviour though. 

  • Thanks 2
Link to comment
Share on other sites

Thanks @red_ will test it tomorrow!

Do you have a reverse proxy in front of the Emby server? 

If so: Could you test without it and http2 in Kodi enabled?

@Luke what http server library are you using and does it use HTTP/2?

Edited by L3Nerd
Link to comment
Share on other sites

Great, let me know if it worked out!

 

No, I don't have a reversed proxy in front of Emby.

@quickmic is it maybe possible to disable the usage of http2 from within the emby-next-gen plugin? So users don't need to modify the advancedsettings.xml? Or are we going to miss too many functionalities by disabling http2 and should we just try to fix the issue somewhere?

Link to comment
Share on other sites

Quick note to say the disable http2 code workaround worked for me!!! Champion thank you!! 

Issue occurred when I upgraded to Android 11 on shield. 

I then enrolled my device on the shield hotfix upgrade program and installed the upgrade hotfix and this didn't fix it either. 

I then reinstalled kodi from scratch on Android 11 etc and nothing worked.

Also uninstalled kodi emby addon and then installed Plex kodi addon and got the issue there too. So the issue is occurring in the plex addon too! (I know they share similiar code base but was worth a shot) 

Hours later... Finally reinstalled the emby addon and then read this forum (should have come here first!) and tried the disable http2 code and this definently fixed the issue for me.

Note: I am using nginx in front of emby. Issue only occurred with Add on mode playback (ie HTTPS). Direct play and live TV was fine. 

So assumption is something to do with the addon mode https playback method and http2 on Android 11 causes the issue. 

Edited by fr0z3n
Link to comment
Share on other sites

17 hours ago, red_ said:

Great, let me know if it worked out!

 

No, I don't have a reversed proxy in front of Emby.

@quickmic is it maybe possible to disable the usage of http2 from within the emby-next-gen plugin? So users don't need to modify the advancedsettings.xml? Or are we going to miss too many functionalities by disabling http2 and should we just try to fix the issue somewhere?

Yes, I can modify the advancedsettings.xml. I'll add an option.

Link to comment
Share on other sites

9 hours ago, fr0z3n said:

So assumption is something to do with the addon mode https playback method and http2 on Android 11 causes the issue. 

Well it sounds like a Android bug or Kodi 19.3 on Android 11 devices bug.

The playback/stream hasn't changed, also https seems not to be the issue.

btw, the plugin just redirects Kodi to Emby servers actual streaming URL. Could be a transition issue between http and http2, but this wouldn't explain why it works on other devices and the issue appeared after upgrade to Android 11.

 

Link to comment
Share on other sites

The Kodi wiki says:

Quote
<disablehttp2>false</disablehttp2>         <!-- Added in v19- Allows disabling HTTP2 for broken Curl / HTTP2 servers -->

Actually, I rule out an Emby server issue, probably curl is broken in Android 11? Do you know which curl version Android 11 is using?

 

Edited by quickmic
Link to comment
Share on other sites

On 1/15/2022 at 7:52 PM, red_ said:

Hi guys,

I found a workaround that workers for me. If you disable http2 in advanced settings.xml everything works as before the Android 11 upgrade!

https://github.com/xbmc/xbmc/issues/20631

I copied the advancedsettings.xml file which was already in the "Profile directory" via the Kodi File Browser to a remote SSH location, added the <disablehttp2>true</disablehttp2> part in the <network> section which was already in the file via nano/vi on the remote server and copied the file back via the Kodi File Browser.

Works like a charm again 👌🏻

Not sure what's the difference in http2 implementation between Android 10 and 11 which causes this behaviour though. 

I need to try this before i attempt a rollback to Shield 8.2.3. Has this gotta be a remote SSH location ? or can it be a windows smb location etc?

After the Nvidia Hotfix i am able to play media from Emby server via the webapp, previously before this it will just give me a no stream available error. 

I've uninstalled Kodi and at this moment i am unable to restore my backup, really not looking forward to setting up Kodi with all the settings, addons all over again. I know this is off topic, but does anybody know how I can copy the Kodi backup i have into the Android data folder, the Kodi wizard i'm trying to restore backup from cannot browse to any other locations. 

Link to comment
Share on other sites

@Jonzinstall the app x-plore on your shield from the store.

Also install the app on your phone. 

Then on the shield open the app and turn on the Wifi Server feature, which broadcasts your shield on your LAN as a file share accessible by other x-plore apps. 

Then on the x-plore phone app find the Wifi Server for your shield and you can see the shield directories and copy and paste stuff to and from any directory in the shield.

Link to comment
Share on other sites

Just an update for everyone. Thanks to everyone that has chipped in with ideas and tips to solve my issues without doing a fallback to Shield 8.2.3

I've got my Nvidia Shield Pro 2019 working to somewhat serve my purpose :-

1.) File explorers are working

2.) Emby Server is working fine, seems fast now as well. I can stream via webapp and also thru Emby Next Gen 6.2.6 in Kodi

3.) I am able to restore my Kodi build backup (this saved me a lot of time mucking around with setups etc). Got the idea to use Kodi's File Manager in another thread here to copy my backup into the Profile\Addon Data folder and the restore utility could see the backup and restore it. 

4.) Emby-next-gen 6.2.6 for Kodi is fast, building a fresh library took a jiffy.

5.) Haven't tried loading Retroarch yet, but i don't game much nowadays anyway so it's a smaller issue. 

6.) All streaming apps on the Shield is working - Netflix, Prime, other IPTV stuffs.

Keyword for everyone facing these issue are :-

a.) Install the Nvidia hotfix. remount NAS drives etc

b.) reinstall file explorers, kodi and what other apps you have that's not working and give it permissions again

  • Like 1
Link to comment
Share on other sites

On 1/16/2022 at 9:12 AM, quickmic said:

Yes, I can modify the advancedsettings.xml. I'll add an option.

Will be added in 6.2.7 (currently under development)

Edited by quickmic
Link to comment
Share on other sites

 

@red_Thanks bro, you are right. Disabling HTTP/2 solved the problem for now.

This issue was introduced by Shield Experience Upgrade 9.0 and Second HotFix (33.1.0.264) still doesn't fix the issue.
The affected range includes Kodi 18.9-20 and may include lower Kodi versions, I'm not sure. Even external calls to HTTPS streams don't play, so this has nothing to do with the Kodi Emby add-on. It may be related to a specific Emby server configuration though, maybe the server can block HTTP/2 to fix the issue.

@quickmic
Is it also possible to add the option to disable HTTP/2 to the EmbyCon add-on settings? Thanks!

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