asciidisco / plugin.video.netflix

Inputstream based Netflix plugin for Kodi
MIT License
1.24k stars 226 forks source link

Video playback is not working in 0.13.18 #555

Closed Essam315 closed 5 years ago

Essam315 commented 5 years ago

I'm submitting a ...

General infomration

Prerequisites

Description

The video playback is not working in the release 0.13.18, when i try to play a video nothing happens, I'm not using any VPN, inputstream.adaptive is updated to the latest release 2.3.11, and this problem happened today, and not related in anyway with the problem in 0.13.19 which has been fixed for me here https://github.com/asciidisco/plugin.video.netflix/commit/5d363569b025247f5005a2266e69efddb1476cc7 (it seems that the plugin is working now on the android devices).

Context (Environment)

Installation

Operating System

Additional informatin on the environment

Kodi 18 Leia RC, Windows 10

Debug log

https://pastebin.com/BSYAg2jM

Other information

Here is manifest.json.

manifest.zip

HiassofT commented 5 years ago

@peak3d good catch, thanks a lot for the hint!

Disabling "prefer default streams" did the trick, now I get English 5.1ch again.

jakermx commented 5 years ago

.kodi/user_data/addondata/plugin.video.netflix/

Interesting. In that folder are only msl_data.json file. Fishy situation.

Try /storage/.kodi/userdata/addon_data/plugin.video.netflix

VLPilot commented 5 years ago

.kodi/user_data/addondata/plugin.video.netflix/

Interesting. In that folder are only msl_data.json file. Fishy situation.

Try /storage/.kodi/userdata/addon_data/plugin.video.netflix

Hi

There is no path /storage found on Rpi osmc. Weard.

rsantirso commented 5 years ago

.kodi/user_data/addondata/plugin.video.netflix/

Interesting. In that folder are only msl_data.json file. Fishy situation.

Try /storage/.kodi/userdata/addon_data/plugin.video.netflix

Hi

There is no path /storage found on Rpi osmc. Weard.

Try to look for it using unix command 'find',

$> find / -name "*netflix*

would list you all netflix related files and dirs.

Anyway, I have also tried jakermx's workaround on Rpi 3B+ and video&audio plays fine. I got no subtitles at all, but I can download them from subs sources.

Thanks a lot for the fix and the rest of the info.

Terrorhawk commented 5 years ago

/home/osmc/.kodi/

Notice the dot !

asplundj commented 5 years ago

Works on coreelec on a odroid c2 but the resolution is really low.

peak3d commented 5 years ago

https://github.com/asciidisco/plugin.video.netflix/archive/msl2.zip

contains subtitles now

StelArian commented 5 years ago

thanks a lot, with the msl2 branch audio and video work fine again!

One minor issue: automatic audio stream selection doesn't seem to work as before. It now selects German 2ch instead of English (original) 6ch by default (checked with Black Mirror S01E01, Marvel's Daredevil S03E01)

Maybe because of 'languages': ['de-US'], in lines 85, 247 and 264 of MSLv2.py

peak3d commented 5 years ago

@StelArian It's more a matter how audio streams are tagged and then handled inside kodi core. Tags are slightly different as before (wanted).

PPaques commented 5 years ago

@asplundj working also on odrooid c2. I got better video quality with scaling mode bilinear and pass-throug enabled.

toasterboy1 commented 5 years ago

Can verify msl2 branch working on LibreELEC Generic.x86_64 (Milhouse) Build #1124 with no tweaks or patches. Nice work guys.

polyv0x commented 5 years ago

Confirmed working as well on LibreELEC x86_64 Build #1126, however there seems to be a lot of new overhead that slows my decoding to under 60fps (the KODI-CPU reads over 100%)

Is video acceleration not working or is something else just hogging a lot of resources? I did not have this issue with the previous builds.

(My device is an nvidia ION based atom device, so it can't really pull much on the CPU..)

flolilo commented 5 years ago

https://github.com/asciidisco/plugin.video.netflix/archive/msl2.zip

contains subtitles now

I'm using an Odroid C2 with CoreELEC nightly (which means Kodi 18.0 Beta 5).

Playback works, audio tracks work, Subtitles are activated by default, but there are none to select (of course I tried several shows that I know have subtitles.)

Given the circumstances, this of course is a minor issue. But I just wanted to give some feedback (if a log would help, just tell me). Great work!

arpruss commented 5 years ago

The msl2.zip first worked on my rpi3 and then stopped (I have to confess to calibrating the aspect ratio in Kodi's system settings in between, but I wouldn't think this was the problem). Log: http://pruss.mobi/dl/msl2.log manifest: http://pruss.mobi/dl/msl2.manifest

Environment: Raspbian Stretch, RPI3B+, 4:3 TV-out, default settings in Netflix plugin

Update: Also fails on my GalliumOS laptop.

jakermx commented 5 years ago

The msl2.zip first worked on my rpi3 and then stopped (I have to confess to calibrating the aspect ratio in Kodi's system settings in between, but I wouldn't think this was the problem). Log: http://pruss.mobi/dl/msl2.log manifest: http://pruss.mobi/dl/msl2.manifest

Environment: Raspbian Stretch, RPI3B+, 4:3 TV-out, default settings in Netflix plugin

Update: Also fails on my GalliumOS laptop.

19:05:35.830 T:1706877680 ERROR: return b64decode(s) 19:05:35.830 T:1706877680 ERROR: File "/usr/lib/python2.7/base64.py", line 75, in b64decode 19:05:35.830 T:1706877680 ERROR: return binascii.a2b_base64(s) 19:05:35.830 T:1706877680 ERROR: TypeError: a2b_base64() argument 1 must be string or buffer, not bool 19:05:36.070 T:1563284208 ERROR: AddOnLog: InputStream Adaptive: License update not successful (no keys) 19:05:36.070 T:1563284208 ERROR: AddOnLog: InputStream Adaptive: Initialize failed (SingleSampleDecrypter)

You are getting True/False instead of the license string, so I think you have need to remove you version and settings, reinstall and try again.... because this usually happens when you have difffrent file versions some process is asking for something to another process,but this one is returning what its thougth it was asked for...

I would suggest to clone the msl2 branch, and install it from zip instead of installl from repository, also, diseble the auto update thing..

asplundj commented 5 years ago

@asplundj working also on odrooid c2. I got better video quality with scaling mode bilinear and pass-throug enabled.

I set inputstream.adaptive to manual stream selection and now I can select a better resolution. If set to auto it just selects the lowest resolution. It works fine on other addons

monkz commented 5 years ago

Hiho, great work! Is there anything I can do to help to create a release from this? Testing, etc...

StelArian commented 5 years ago

@asplundj working also on odrooid c2. I got better video quality with scaling mode bilinear and pass-throug enabled.

I set inputstream.adaptive to manual stream selection and now I can select a better resolution. If set to auto it just selects the lowest resolution. It works fine on other addons

Official Netflix Android TV app starts streaming from low res and step-by-step goes higher to the best possible, depending on your internet performance and your screen's resolution. I guess that's complicated to be implement. I guess the add-on should request stream according to KODI's screen settings and also have the ability to override inside add-on's settings.

dupohuj commented 5 years ago

liberty-developer Fix parameter values for stream play is that mean it work I download it but can`t install it Rpi2 libreelec

hlashbrooke commented 5 years ago

Can confirm that the msl2.zip file above works on Rpi3b+ running OSMC (latest nightly build for Leia). Subtitles working and no issues with video or audio.

ryangodammit commented 5 years ago

Msl2.zip is working on libreelec for me. Haven’t done extensive testing, just video playback

tsioukas commented 5 years ago

Msl2.zip is working on Kodi x64 RC1 on Windows 10 also for me (in my both machines), but I see that it doesn't select 5:1 audio channels by default as the older version did (0.13.18). Also it reaches up to 1280x720 videos instead 1920x1080.

peak3d commented 5 years ago

@tsioukas : https://github.com/asciidisco/plugin.video.netflix/issues/555#issuecomment-442556556

tsioukas commented 5 years ago

@peak3d , now it selects 5:1 channel... interesting this thread takes fire from yesterday and I missed that ;) Thanks

Terrorhawk commented 5 years ago

Just a small update:

changed: de-US and de-DE to en-US changed fixed timestamp: 'timestamp': 1467733923 to 'timestamp': int(time.time())

could not find a reason to have a fixed timestamp in it that was from 07/05/2016

MSLv2.py.zip

asplundj commented 5 years ago

I get subtitles on windows but not on CoreElec. Could that be because on CoreElec I'm running leia beta 5 and inputstream.adaptive 2.3.6 (it won't update to latest version) and on Windows I'm running RC 1 of leia and inputstream.adaptive 2.3.11

iTaybb commented 5 years ago

Watching this thread is better than Netflix.

On Thu, Nov 29, 2018 at 1:11 PM Essam315 notifications@github.com wrote:

I get subtitles on windows but not on CoreElec. Could that be because on CoreElec I'm running leia beta 5 and inputstream.adaptive 2.3.6 (it won't update to latest version) and on Windows I'm running RC 1 of leia and inputstream.adaptive 2.3.11

Use this release and the subtitles will work for you on CoreElec, uninstall everything first.

https://mega.nz/#!VglyiYIa!1BXdy0_q4dFRIku9KcEg5t3xKeTuTZerduI0grMzS-c

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/asciidisco/plugin.video.netflix/issues/555#issuecomment-442796214, or mute the thread https://github.com/notifications/unsubscribe-auth/ADcpBm0WGMmWLtVo2KGVlrH5sy_khv-0ks5uz8DxgaJpZM4Y1Fx8 .

liberty-developer commented 5 years ago

Just a small update:

changed: de-US and de-DE to en-US changed fixed timestamp: 'timestamp': 1467733923 to 'timestamp': int(time.time())

could not find a reason to have a fixed timestamp in it that was from 07/05/2016

MSLv2.py.zip

@Terrorhawk This should not be set hardcoded, we should respect locale settings / and or kodi language settings.

asciidisco commented 5 years ago

@Terrorhawk @liberty-developer I remember toying around with this 1 1/2 years ago or such, Kodis locale wasn't a reliable source (also, in some cases, also not one Netflix would be able to match), so I proposed (but never implemented) to load/parse the language settings provided by Netflix itself. That way, the behaviour would be as close as it gets to the native clients, see my comment here: https://github.com/asciidisco/plugin.video.netflix/pull/212#issuecomment-340482949

and feel free to finish that unfinished business for me ;)

Terrorhawk commented 5 years ago

i think the simple way would be to add a sort of selectbox in de plugin settings. this way it can be easy updated with the plugin it self. trusting on the kodi settings is as u say not the best source for this. But that is something that can build in later. the main goal was to get it working. and en-US is a more common setting than de-US in my point of view.

liberty-developer commented 5 years ago

de_US is exactly what my web broser uses, so it may be more stable for you, but most likely not for others.

Edit: I guess that you get the correct locale somewhere in the login process of the addon, same place where the ESN is retrieved from. There are tons of values which can be used for further processing.

Manual selection feels wrong for me.

HiassofT commented 5 years ago

quick test with the 0.13.20 tag looks good - thanks a lot to everyone involved!

jakermx commented 5 years ago

It is defined by the locale function on any system, maybe you are using DE language but you are on US, mine is en_MX, because I have my OS configured for English but I am in Mexico... also it is used to get the repeater nodes, so you could have faster streams by location, configuring it as you really are is better.

liberty-developer commented 5 years ago

This is what reactContext (NetflixSession.py) provides:

        "memberContext": {
            "data": {
                "type": "memberContext",
                "geo": {
                    "locale": {
                        "default": false,
                        "dir": "ltr",
                        "displayName": "Deutsch\x20\x28Vereinigte\x20Staaten\x29",
                        "id": "de-US",
                        "language": "de",
                        "isCursive": false,
                        "doubleByte": false,
                        "hasExtendedDiacritics": false,
                        "durationFormat": "hoursAndMinutes",
                        "fallbacks": ["de", "en"]
                    },
                    "preferredLocale": {
                        "country": "DE",
                        "language": "de",
                        "dir": "ltr",
                        "isCursive": false,
                        "doubleByte": false,
                        "hasExtendedDiacritics": false,
                        "default": false,
                        "id": "de-US"
                    },
                    "supportedLocales": [{
jakermx commented 5 years ago

This is what Libreelec OS (Linux) returns....

RPI3:~ # locale LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL=

So it is better to define it as where we are and what we use, caus, netflix uses itin order to locate peering partners given in the streams URLs in the manifest since + GeoLocalization and IP Domain info.

liberty-developer commented 5 years ago

If you look into manifest.json you'll notice that netflix uses much more information for choosing peer. I'll implement netflix default behaviour (using locales returned by browser) to minimize later side effects.

jakermx commented 5 years ago

Agreed

krisdeg commented 5 years ago

thanks to all everything works on rpi 3b+

chichino84 commented 5 years ago

Hi everybody, first of all a big thanks for all your great work! 0.13.20 works almost fine for me, only issue is resolution max at 720 as @tsioukas already pointed. Shouldn't be InputStream Adaptive related because it works regularly at 1080 with other plugins (i.e. Amazon VOD). My setup is Leia v18 rc1 on Win7.1 x64 Am I missing something? Thx for your help

jakermx commented 5 years ago

These are the options available for InputStream Adaptive

    <setting id="MAXRESOLUTION" type="integer" label="30110">
      <level>0</level>
      <default>0</default>
      <constraints>
        <options>
          <option label="30150">0</option> <!-- Max -->
          <option label="30151">1</option>  <!-- 480p -->
          <option label="30153">2</option>  <!-- 720p -->
          <option label="30154">3</option> <!-- 1080p -->
        </options>
      </constraints>
      <control type="spinner" format="string" />
    </setting>
    <setting id="MAXRESOLUTIONSECURE" type="integer" label="30113">
      <level>0</level>
      <default>0</default>
      <constraints>
        <options>
          <option label="30150">0</option> <!-- Max -->
          <option label="30151">1</option>  <!-- 480p -->
          <option label="30152">2</option>  <!-- 640p -->
          <option label="30153">3</option>  <!-- 720p -->
          <option label="30154">4</option> <!-- 1080p -->
        </options>
      </constraints>
      <control type="spinner" format="string" />
    </setting>

Taken from

https://github.com/peak3d/inputstream.adaptive/blob/master/inputstream.adaptive/resources/settings.xml.in

I dont know why these limitations, but usally means system stabillity or system complience.

In the case of Netflix plugin, think about it as a Multimedia System Broker, that gets URLs from Netflix and passes them to InputStream Adaptive Codec/Demuxer and it find the better system option to play it back, based on OS capabilities and user preferences...

Could It be much better?, yes, but it takes some time to get it done...

jakermx commented 5 years ago

@liberty-developer I just finish the get_license function over MSL2.. I am testing it right now, once done, I will share it..

:)

liberty-developer commented 5 years ago

@chichino84 pls. provide your manifest.json file, it can be found in your addon's userdata folder

liberty-developer commented 5 years ago

@jakermx cool! looking forward to it! What was the main reason for the HTTP 400 ?

tsioukas commented 5 years ago

@jakermx, I made some further tests on my system. fast.com give me 29Mbps speed (as my fiber network does) and I am using my Intel NUC7i3BNH that it have a lot of resources. My network monitor gives me the average speed of stream at 3Mbps (like a normal 720p stream). Finally my Netflix app plays normally on 1080p. Why I do that, just in case that player process info gives me wrong resolution but unfortunately looks correct. I hope to find what's wrong... keep going.... you are too close congrats again.

VLPilot commented 5 years ago

Im not sure what I have messed up with, but i still cannot find manifest.json file nowhere to debug errors. OSMC has Leia latest nighly build. Version 0.13.20 is installed.

image

There files can be found in image

Still getting same error kodi.log: 17:25:56.071 T:1500504816 NOTICE: Creating InputStream 17:25:57.869 T:1500504816 ERROR: AddOnLog: InputStream Adaptive: Could not ope n / parse mpdURL (http://localhost:47679/manifest?id=80192149&dolby=true&hevc=fa lse&hdr=false&dolbyvision=false&vp9=false)

Any ideas?

jakermx commented 5 years ago

@jakermx cool! looking forward to it! What was the main reason for the HTTP 400 ?

URL + HTTP Headers

BASE_URL = 'https://www.netflix.com/nq/msl_v1/cadmium'

ENDPOINTS = { 'manifest': BASE_URL + '/pbo_manifests/^1.0.0/router', 'license': BASE_URL + '/pbo_licenses/^1.0.0/router', }

    header = {
        'entityauthdata': {
            'scheme': 'NONE',
            'authdata': {
                'identity': self.msl_session['esn'],
            }
        },
        'signature': '',
    }

    header['headerdata'] = base64.b64encode(
        mymsl2.utils.dumps(self.header).encode('utf8')
    ).decode('utf8')

    payload = {
        'signature': ''
    }

    payload['payload'] = base64.b64encode(mymsl2.utils.dumps({
        'sequencenumber': 1,
        'messageid': self.msl_session['message_id'],
        'endofmsg': True,
        'data': ''
    }).encode('utf8')).decode('utf8')

    request = mymsl2.utils.dumps(header) + mymsl2.utils.dumps(payload)

The big trick is that Manifest License Path information should be used as URL on License Json Request

    license_request_data = {
        'version': 2,
        'url': self.msl_session['license_path'],
        'id': '15429961788811',
        'esn': self.msl_session['esn'],
        'languages': self.msl_session['languages'],
        'uiVersion': 'shakti-v4bf615c3',
        'clientVersion': '6.0011.511.011',
        'params': [{
            'sessionId': session_id,
            'clientTime': int(time.time()),
            #'challengeBase64': base64.b64encode(challenge).decode('utf8'),
            'challengeBase64':  challenge,
            'xid': int((int(time.time()) + 0.1612) * 1000)
        }],
        'echo': 'sessionId'
    }
jakermx commented 5 years ago

Im not sure what I have messed up with, but i still cannot find manifest.json file nowhere to debug errors. OSMC has Leia latest nighly build. Version 0.13.20 is installed.

image

There files can be found in image

Still getting same error kodi.log: 17:25:56.071 T:1500504816 NOTICE: Creating InputStream 17:25:57.869 T:1500504816 ERROR: AddOnLog: InputStream Adaptive: Could not ope n / parse mpdURL (http://localhost:47679/manifest?id=80192149&dolby=true&hevc=fa lse&hdr=false&dolbyvision=false&vp9=false)

Any ideas?

Please share the whole log...

tsioukas commented 5 years ago

@VLPilot, please upload this log on a free text sharing site (like https://pastebin.com etc). thank you....

VLPilot commented 5 years ago

Sorry for excessive flood. I will put pastebin on the way.

jakermx commented 5 years ago

@VLPilot it is not fully loading

File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py", line 1053, in call_netflix_service data = urllib2.urlopen(full_url).read() File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused> -->End of Python script error report<--

Just restart it, and then go Add-ons, Netflix, select your profile, go to My List or New releases, select some title and play it....if it crashes, post back you log file...