peno64 / service.subtitles.localsubtitle

addon to add a local subtitle to a kodi movie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to download subtitle file from DLNA server

githubdebugger opened this issue · comments

I get "failed to download subtitle" error when I am trying to download from a DLNA/UPnP server running on NAS.

https://imgur.com/gWqtPHh

I am on latest Kodi 18.5 Leia, with Mimic skin (that is why I am using your add-on). The steps are the same:

  1. Click on subtitle -> Download
  2. Click on local subtitle, which then opens browse window
  3. Wherein I chose the DLNA server and browse to select subtitle (just like browsing and selecting local storage)
  4. On choosing the .srt file I get "failed to download subtitle"

If I use "Browse for subtitle" from Kodi's built-in feature (without addons like Mimic and localsubtitle), and chose .srt file from same DLNA server, it downloads and loads subtitle file without any issues.

2 questions:

  • Does it work with the localsubtitle addon without the Mimic skin?
  • Does it work when you download a subtitle not from a DLNA/UPnP server (NAS) but from the device where kodi is on? With and without the Mimic skin.

My answers inline:

2 questions:

* Does it work with the localsubtitle addon without the Mimic skin?

Without Mimic skin (basically with default Kodi Estuary skin), I see Kodi's default "Browse for subtitle" in subtitle window and I do NOT see "LocalSubtitle" at all even when the Localsubtitle addon is installed/enabled.
And like I mentioned earlier download of subtitle from DLNA/UPnP server works fine from Kodi's "Browse for subtitle" in this case and loads fine.

* Does it work when you download a subtitle not from a DLNA/UPnP server (NAS) but from the > device where kodi is on? With and without the Mimic skin.

"LocalSubtitle" loads subtitle and works fine when I load the file from local storage (where Kodi is running) with Mimic skin without issues.
Without Mimic skin like I said earlier, I do not see "LocalSubtitle" option at all, all I see is Kodi's default "Browse for subtitle" and that works fine.

From what I see "Localsubtitle" works fine except when loading subtitles from DLNA/UPnP server, where I see "failed to download subtitle" error. I have tested this on Windows PC, android phone/TV as well, getting same error on all devices.

Hope this helps.

With the default skin the LocalSubtitle addon is there in the "Download subtitle..." menu item like all other subtitle addons

Do you have a link on how to setup DLNA/UPnP server? I have never used it. I use smb (samba)

Do you have a link on how to setup DLNA/UPnP server? I have never used it. I use smb (samba)

The setup is pretty easy, depending on the device you are setting up. Please use minidlna its lightweight and good support is there.

Setting up miniDLNA on Raspberry Pi:
https://www.instructables.com/id/Raspberry-Pi-Media-Server-MiniDLNA/

Setting up miniDLNA on openwrt:
https://openwrt.org/docs/guide-user/services/media_server/minidlna
On OpenWRT you can use luci-app-minidlna too.

MiniDLNA on openWRT: https://www.youtube.com/watch?v=G0uq8Df_5VI

BTW, I tried loading same SRT using "LocalSubtitle" from SMB (I had SMB disabled) and SMB works fine, for media playing via DLNA. So, I have back up until you fix the issue :)

I had SMB installed earlier, but disabled as I kept hitting performance issues as the buffering is bad with SMB (its good for file transfers and it was made for file transfers), with DLNA I face no issues while seeking back and forth and buffering is good too. Try it out.

After setting up DLNA/UPnP server, you need to enable DLNA/UPnP on Kodi, by going to:
Services -> DLNA/UPnP and enable.

Then add source (just like you would for SMB) for UPnP and you should be able to find your DLNA server automatically listed (if not then some issue with your server) and thats all.

I am using dd-wrt on my router so I will have to check if I can enable that protocol there.
I have no problems at all with buffering on smb. You must however change caching settings in kodi such that it caches data in kodi while playing the video and then there are no problems at all. smb provides the data to kodi much faster than that kodi plays the stream but you must allow kodi to use that cache which is standard disabled. It is in advancedsettings.xml

With the default skin the LocalSubtitle addon is there in the "Download subtitle..." menu item like all other subtitle addons

Thanks, I can see that option now. Tried with "Localsubtitle" which is inside "Download subtitle" in default skin and it FAILS to load subtitle with same error when tried loading subtitle from DLNA server

So it is not skin related.

For the caching, set buffermode to 1 in advancedsettings.xml

So it is not skin related.

Yep, issue with "LocalSubtitles" loading from DLNA, but I do not see any protocol specific code in your .py files (I do not understand Kodi API calls).

For the caching, set buffermode to 1 in advancedsettings.xml

Sure, will check it out on PC/Android phone/TV.

I am using dd-wrt on my router so I will have to check if I can enable that protocol there.

This is what I found: https://wiki.dd-wrt.com/wiki/index.php/Ushare_uPnP_media_server

I have no problems at all with buffering on smb. You must however change caching settings in kodi such that it caches data in kodi while playing the video and then there are no problems at all. smb provides the data to kodi much faster than that kodi plays the stream but you must allow kodi to use that cache which is standard disabled. It is in advancedsettings.xml

I have not played tweaked around Kodi's settings, when I had buffering issues with SMB I checked out online and most people had moved from SMB to DLNA, hence I did too :) I will check out the setting in xml file that you mentioned :)

Thanks! appreciate your help/quick reverts and of course this add-on :)

If you stream the video via your NAS, can you then choose the subtitle via the default kodi feature 'Browse for subtitle...' ?

So when you stream the video via DLNA/UPnP, why aren't you using the 'Browse for subtitle... ' option from kodi to add the subtitle?
If that doesn't work, then I think the issue is a kodi problem and not a problem in the localsubtitle addon. I would not be surprised if you just can't add subtitles via the DLNA/UPnP protocol. As I understand it this is a protocol only ment to stream video's

If you stream the video via your NAS, can you then choose the subtitle via the default kodi feature 'Browse for subtitle...' ?

Yes. Streaming from DLNA server with default Kodi skin and browse for subtitles work fine.

So you should also be able to use that with your other skin...

So when you stream the video via DLNA/UPnP, why aren't you using the 'Browse for subtitle... ' option from kodi to add the subtitle?
If that doesn't work, then I think the issue is a kodi problem and not a problem in the localsubtitle addon. I would not be surprised if you just can't add subtitles via the DLNA/UPnP protocol. As I understand it this is a protocol only ment to stream video's

The issue is I use Mimic which hides browse for subtitles button, that is how I came across your add on and hit another issue of subs not loading from DLNA when using LocalSubtitle add-on.

I think it stops here...
https://forum.kodi.tv/showthread.php?tid=126521

I came across this thread too while I was searching for my issue, but you can see some confirming it works/partially it working + this thread is quite old, Kodi has improved a lot from then. I can confirm DLNA sub works for my files but ya with default skin. With Mimic skin it hides the browse for subtitles button, with loadsubtitles it fails to load subs from DLNA.

But with your help I got a backup now (until you decide to fix or fix it) to load from SMB at the moment using localsubtitle (from SMB) + Mimic skin + media player via DLNA. Also will check advancedsetttings.xml.

Thanks!!

Update: Tried buffermode set to 1 in advancedsettings.xml on my FireTV stick, and it would stop playing on some large files while playing from SMB and some stop playing when I am seeking + or - surprisingly same files play quite well without that advancedsetting via SMB and plays absolutely fine with good buffering when played from DLNA.

For the subtitle loading from my NAS I will continue to run SMB and play media via DLNA, that is the only solution for now!

Thanks!

I was able to setup IPnP in kodi and I can play video's but browsing for subtitles does not work. Even via the standard kodi way via browse for subtitle. It only shows the movie files and not the subtitle files!. So it is really a kodi issue according to me

This is really a lost cause. Put a subtitle file on your system with a name not equal to your video and extension srt and browse for the file via UPnP and you will not even see that file in the browser.
Kodi really doesn't support using subtitles via UPnP

Here it is also stated: https://www.futeko.com/newforum/index.php?topic=1347.0

"UPnP or DLNA not support external subtitle like SRT with any player andorid /linux/windows."

Thanks! I renamed and checked an SRT file.
Appreciate your help and time.