asciidisco / plugin.video.netflix

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

CPU goes sometimes over 200% while playing video on RPi 3B #653

Closed Argentino84 closed 5 years ago

Argentino84 commented 5 years ago

I'm submitting a ...

General information

As suggested for similar issues I have set ImputStream Adaptive to max 720p. This didn't help at all.

Prerequisites

Raspberry Pi 3B XBian OS KODI 18.1 plugin.video.xstream incl. libwidevine

Description

CPU sometimes goes even over 230% while playing video. Video shutters while audio is running smoothly and because of this video gets out of sync. After some time video pauses automatically and is reloaded to match audio position then the playback proceeds. When video is paused manually audio pauses immediately but video goes on til it matches where audio position has paused. This happens after a freshly installed OS with only the plugin.video.xstream and dependencies installed. No other changes have been made to the system nor addons installed.

Steps to Reproduce

  1. install XBian OS on RPi 3B
  2. install plugin.video.xstream from GitHub
  3. login to netflix
  4. try to playback any video
  5. install libwidevine
  6. video plays and issue occurs

Expected behavior: [What you expected to happen] Video plays smoothly and stays on sync with audio.

Actual behavior: [What actually happened] Video shutters while audio is running smoothly and because of this video gets out of sync.

Installation

Operating System

Additional information on the environment

As mentioned I use latest XBian with KODI 18.1

Debug log

http://pasted.co/e63e50de

bast69 commented 5 years ago

Have you tried with libreelec ? I've a rpi 3b, don't have any problemes

Argentino84 commented 5 years ago

Thanks yes I've tried libreelec too but not on RPi. I'll try it.

Argentino84 commented 5 years ago

Freshly intalled LibreELEC and Netflix. Nothing changed. Still high CPU and shuttering. Maybe even worse than XBian.

Argentino84 commented 5 years ago

I was tweaking around and found a workaround that is not perfect but at least I can watch something. I've set lower maximum bandwidth Bit/s value in the ImputStream Adaptive Addon. The Video resolution goes down depending on the set value. This is the downside.

jakermx commented 5 years ago

While playing a video, SSH into the RPi then use "top - H" to display info about Threads and no Processes, on the top screen type "I" (capital "i" ) and you will see the real CPU utilization , remember RPI is multicore proc,that means that any stats you see Is overall and not per Core, so it could show up to 400% on Irix mode, It will show up to 100% per core.

Cheers

jakermx commented 5 years ago

SSH into the Rpi, then type "top" press "H" (Capital h), then press 1, so you can see,Usage per Threads so if you sum usage of cpu1 cpu2 cpu3 and cpu4, it will be equal of you almost 200%.... based on this, look for a high cpu consuming proccess and keep us posted.

Argentino84 commented 5 years ago

While I was trying to test your suggestions I broke somehow my sd card. Bad luck I have to get a new one. When I've done the testing I'll tell you. I hope with your help I'll find out why video isn't playing without shuttering and why the CPU goes up that much. By the way sorry for my bad English.

Argentino84 commented 5 years ago

Finally, I can answer you. This is what I get (top -> H -> 1):

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
789 root 20 0 735372 177828 45460 R 99.9 23.2 2:42.75 VideoPlayer
790 root 20 0 735372 177828 45460 R 96.9 23.2 2:41.69 VideoPlayer
792 root 20 0 735372 177828 45460 S 54.4 23.2 1:19.69 VideoPlayer
786 root 20 0 735372 177828 45460 S 28.3 23.2 0:08.67 VideoPlayer
... (The rest is CPU < 5)

jakermx commented 5 years ago

Que extraño....pregunta, por que usas usas XBian y no LibreElec o CoreElec? me podrias pasar el log completo por favor?

Argentino84 commented 5 years ago

Dedujiste correctamente que hablo español pero mi alemán es mucho mejor ya que vivo en suiza casi toda mi vida. However, I guess it's better we write on English so other people can participate too.

Like bast69 suggested I'm now running a freshly installed LibreELEC. I was trying to use the LibreELEC built in log uploader but it failed over and over. On other pasting sites it said that it's too large. So I restarted launched a video on Netflix and stopped after some seconds. Then the upload worked but left less information for you: ix.io/1Gb8

jakermx commented 5 years ago

plaese run and upload the results of dmesg command

Argentino84 commented 5 years ago

http://ix.io/1GbR

Argentino84 commented 5 years ago

I guess the decryption is too much for the hardware because I'm able to watch movies with other addons in 1080 resolution without a problem. It works even without a MPG2 or WVC1 license like a charm. I've bought both licenses in the hope it would help to solve the problem with netflix but it doesn't change anything.

jakermx commented 5 years ago

Netflix uses software based encryption, It does not help at all, so setting 720 is the only workaround, and since RPi just have 1 GB of RAM, it will not improve, unless you use a hugher buffer, but it will slutter...

It is what it is....

Argentino84 commented 5 years ago

The only strange thing is bast69 says he hasn't any problems:

Quote > Have you tried with libreelec ? I've a rpi 3b, don't have any problemes

I've installed a clean libreelec system on rpi 3b. And only installed this plugin. I would like to ask one last time if someone has any idea. I see no logic that bast69 has no problems and I have severe ones. So before I close this thread does anyone have some suggestions?

jakermx commented 5 years ago

Please Update your Input Stream Adptive, there are some issues on Max Resolution Setting....some of them have been posted on this forum and some others on ISA AddOn...

Since Netflix uses a propetary codec, widevine for encryption and DASH for MPD, MPG and VPC Licences are not required and will not improve performance... I would suggest you to test using manual stream selection and check the performance for each option.

Cheerz.

Argentino84 commented 5 years ago

@jakermx many thanks for your answer. Which repository do you use as source to update the ISA-Addon?

jakermx commented 5 years ago

LibreElec Test Builds, but you can use lastest LibreElec Release

http://releases.libreelec.tv/LibreELEC-RPi2.arm-9.0.2.img.gz

I dont use overclocking and I would suggest disabling OMX Hardware Acceleration for Netflix, dont mind if you have bought hardware acceleration licences, because Netflix does not use them, disable it, set ISA MAx resolution to 720 and Secure 480, and have fun....

Argentino84 commented 5 years ago

Thanks I have this version installed already and it doesn't work. I'm trying to use Lastship (Addon to watch movies and series in German) to watch Netflix and it works as far as I can tell now. However, I don't understand how this is possible without inserting any Netflix account credentials. I will close this now. I have perseverance but now it is enough. Thanks to everyone who has answered and tried to help. :-)