plexinc / plex-for-kodi

Offical Plex for Kodi add-on releases.
GNU General Public License v2.0
249 stars 122 forks source link

Can´t play movies and series recorded with DVR in Plex #139

Open r100gs opened 6 years ago

r100gs commented 6 years ago

Hello together,

I tried Plex DVR. Recording works fine and the records are played in web and on my android devices but not in pley kodi. The video is shown but if I hit play it takes some time and than I get an error. Its with all my recordings from plex dvr.

What can I do?

Best regards, Stefan

pbathuk commented 6 years ago

Hi, to add to this I am also getting the same issue "file can't be played" but I use NextPVR to record all my TV. I have turned debug on within the app & have seen (removed tokens etc for obvious reasons):

If I try to go (within chrome) to the web address listed it provides me the plex web, which I can then select and play the file from.

It does not happen on all files, it seems to be ones with a mbps > 6000, as another recording from BBC1 plays fine, recorded on the same day.

I have attached the log, where I opened a mkv that does work followed by one that does not: I believe these lines show something interesting:

Worked: 15:49:05.227 T:8856 NOTICE: script.plex: API: MDE: MediaChoice: direct playable=True version=1080p, 2.6 Mbps container=mkv videoCodec=hevc audioCodec=aac audioChannels=2 id=126199 15:49:05.227 T:8856 NOTICE: script.plex: API: Forced Transcode; allowDirectStream=False

Failed: 15:49:30.644 T:8856 NOTICE: script.plex: API: MDE: MediaChoice: direct playable=True version=1080p, 6.6 Mbps container=mkv videoCodec=h264 audioCodec=ac3 audioChannels=2 id=126778 15:49:30.644 T:8856 NOTICE: script.plex: API: Forced Transcode; allowDirectStream=False

Weirdly both are mkv h.264 kodi - Copy.log

pbathuk commented 6 years ago

So I have just changed a few things on my server & the program now plays perfectly I have changed two things: I am not 100% on which one it was, but changing both made my plex for kodi work for all streams again change_network change_remote_access

Hope this helps you as well

pbathuk commented 6 years ago

To add to this, again, I have hit the Same issue recently with Plex & a few files. Playing it through any other Plex app (android / windows etc) all play it, just not Plex through kodi

pbathuk commented 6 years ago

I have just read in another issue on here about downgrading your PMS to 1.09 I was on 1.11 when it broke again. I can confirm Going to 1.09 allowed me to turn on http pipelining as well

CrouchingWorm commented 6 years ago

I'm having the same issue and versions too. I tried downgrading to 1.9.3 again (from 1.11) no luck - still not working. Seems to be for 1080P content mostly for me too (i.e. > 6Mbps) I'll remove pipelining and see if that helps.

Great thread - thanks.

CrouchingWorm commented 6 years ago

Well that seemed to have worked. Can play one of my 1080 DVRs now. Yay!

pbathuk commented 6 years ago

Good to know. I reinstalled the latest Plex beta & not had any issues so far. However I'm sure it will return..

CrouchingWorm commented 6 years ago

False alarm here - it's still broken - but I can play some 1080P content and not others (that have worked before).. sigh It works on the PC but not on Kodi. So perhaps this is now a Kodi only issue?

cybergrimes commented 6 years ago

PFK now working on my Nvidia Shield for local Plex DVR content after disabling HTTP Pipelining, setting the internet upload speed and limiting remote stream bit rate as suggested here. I didn't step into the changes so unsure which did it but I am now playing all my DVR content (480i. 720p and 1080i) without issue (nothing played previously). This is on PMS 1.10.1.4602, PFK is from the beta/testing repo (only because I was trying to see if it would fix the issue before I found this issue thread)

pbathuk commented 6 years ago

I am going to be doing some deeper mining of the logs for this issue (as I also had it) & was wondering if anyone could share (from their Kodi logs) if the file attempting to be played was from : External_ip.token.plex.direct Or Internal_io.token.plex.direct

The reason I ask is that my working assumption is that DNS rebinding is not working for some routers & the above will allow me to rule that in or out as the full cause (it is the case for me).

CrouchingWorm commented 6 years ago

kodi_1.zip Here's my log.. I can't find that reference in my log file..

I'm stuck on Libreelec 8.1.8 at the moment - can't upgrade beyond that. Not sure it's Kodi or Libreelec..

pbathuk commented 6 years ago

Cheers for the attached, So from I can see your connection appears to be external then back to internal (DNS rebinding).

Could you test the following : Open CMD line on windows (might need admin privileges) Then type :

Nslookup https://BLAHBLAH.6e9aae89b8a641018da4bc657071e700.plex.direct (Replacing blah blah for your internal IP)

Then see what it comes back with, my suspicion is it will say unreachable

Then try Nslookup https://BLAHBLAH.6e9aae89b8a641018da4bc657071e700.plex.direct 8.8.8.8

That should then return your IP address.

CrouchingWorm commented 6 years ago

I've only got my obscured (BLAH BLAH) log file.. Misplaced my raw one.. Doh. However I've grabbed a new one - but for 8.1.8 - which works. When I look at this It is all: https://192-168-1-67.6e9aae89b8a641018da4bc657071e700.plex.direct:32400/

so an IP address of sorts. No DNS for me.

CrouchingWorm commented 6 years ago

nslookup https://192-168-1-67.6e9aae89b8a641018da4bc657071e700.plex.direct 8.8.8.8 Server: google-public-dns-a.google.com Address: 8.8.8.8

Name: https://192-168-1-67.6e9aae89b8a641018da4bc657071e700.plex.direct

so my files play - just very badly - so it's resolving?..

pbathuk commented 6 years ago

Hi,

Sorry been a little busy, so from the above I don't see the return lines from the nslookup, the top one should return 192.168.1.67, the nslookup without 8.8.8.8 at the end will most likely have said cannot resolve.

If that's the case, there are three ways to work around it : 1) turn off remote access, Plex.tv then returns the actual IP of the server (192.168.1.67 in this case) 2) up the remote bandwidth to a silly high value (I used 500 upload speedbas an example and never hit the issue again) - you are basically tricking the PMS streaming brain to never got a limit. 3) modify the hosts file to include a fix for IP resolve.

For me, because I actually have remote users, 1) is a no go, I did run with 2) for a while, but was annoyed as it caused buffing issues for my remote users (as the PMS did not know what it could / could not support). I have therefore moved to 3) and accept the risk that if the server passcode changed the .6e9.... Part above, I will need to change the hosts file again. (For this I am looking at building a powershell script that will automatically check and fix it for me on the pcs that have it on).

Hopefully this helps.

The only other option, but I don't want to go down that route myself is to have secure access either off (would mitigate this all together) or prefered and then modify the P4K scripts to work around DNS lookup failures (however I don't know how to do that so would require the support of the Devs - I did get a working solution, but it was pretty duct tape approach)

CrouchingWorm commented 6 years ago

Couple of thoughts: The machine I did an nslookup from has a /etc/hosts entry for .1.67 (it's called blacky).

The Plex clients I have issue with are libreelec machines - I could add a hosts entry for the server and test on one of the machine (have x3).

I would have throught if DNS was indeed broken it wouldn't work at all (i.e. no name resolution to start streaming at all). It begines to work and then fails (stutters and eventaully dies).

Intriguing. I'll give it crack when I get a moment - it's a little annoying, I'll build an SD boot disc... Thanks fella! It's nice to someone else to bounce this off of.