User avatar
ruralguru
Posts: 23
Joined: Sat Jul 02, 2016 11:08 pm
Location: USA
Contact: Website

Re: Netflix on Pi 2

Sun Jul 10, 2016 11:44 pm

kusti8 wrote:
mikerr wrote:Didn't work for me (did the huge download and extract above) - maybe because I'm still on v50 ?
To get V51, add dev to the end of the deb statement in /etc/apt/sources.list
And the usual
sudo apt-get update
sudo apt-get dist-upgrade
I assume from what I have read that this is from your repo... how do I go about adding your repo?
Laptop: Dell Inspiron 7746, touch screen, Ubuntu 16.04
Desktop: Raspberry Pi 3, Raspian LXDE (Slight overclock).
New to *nix , glad to be here.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Netflix on Pi 2

Mon Jul 11, 2016 12:17 am

ruralguru wrote:
kusti8 wrote:
mikerr wrote:Didn't work for me (did the huge download and extract above) - maybe because I'm still on v50 ?
To get V51, add dev to the end of the deb statement in /etc/apt/sources.list
And the usual
sudo apt-get update
sudo apt-get dist-upgrade
I assume from what I have read that this is from your repo... how do I go about adding your repo?
viewtopic.php?f=63&t=121195&hilit=Chromium
There are 10 types of people: those who understand binary and those who don't.

User avatar
ruralguru
Posts: 23
Joined: Sat Jul 02, 2016 11:08 pm
Location: USA
Contact: Website

Re: Netflix on Pi 2

Mon Jul 11, 2016 2:43 am

dom wrote: Interesting. Might be worth trying with "framebuffer_depth=32" in config.txt which may improve performance.
Can you get Chromium 50 (or later) to work?
I looked into the framebuffer_depth it seems to add to the color depth rather than making the video buffer deeper. wouldnt this cause the rendering to to be worse due to the system capabilities rather than better?
Laptop: Dell Inspiron 7746, touch screen, Ubuntu 16.04
Desktop: Raspberry Pi 3, Raspian LXDE (Slight overclock).
New to *nix , glad to be here.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Netflix on Pi 2

Mon Jul 11, 2016 11:02 am

ruralguru wrote:I looked into the framebuffer_depth it seems to add to the color depth rather than making the video buffer deeper. wouldnt this cause the rendering to to be worse due to the system capabilities rather than better?
In the default (non experimental gl driver) case, the video is composited to the normal X framebuffer.
We've noticed that the composition functions use a more optimised code path when the framebuffer is 32-bit rather than 16-bit.

User avatar
ruralguru
Posts: 23
Joined: Sat Jul 02, 2016 11:08 pm
Location: USA
Contact: Website

Re: Netflix on Pi 2

Tue Jul 12, 2016 1:00 am

I know this isn't applicable but I am filing this under beerware license for me. Meaning if I meet any of the 3 of you that got it working I will so buy you a beer (or rootbeer float if you prefer) If you live along I-70 between NY and KS i will be through at the end of the month
TY folks for all your time and effort... below I am posting what I had to do different for mine to work on raspian lxde on a non-pi account
Last edited by ruralguru on Tue Jul 12, 2016 1:57 am, edited 1 time in total.
Laptop: Dell Inspiron 7746, touch screen, Ubuntu 16.04
Desktop: Raspberry Pi 3, Raspian LXDE (Slight overclock).
New to *nix , glad to be here.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Netflix on Pi 2

Tue Jul 12, 2016 1:02 am

ruralguru wrote:I know this isn't applicable but I am filing this under beerware license for me. Meaning if I meet any of the 3 of you that got it working I will so buy you a beer (or rootbeer float if you prefer) If you live along I-70 between NY and KS i will be through at the end of the month
TY folks for all your time and effort... below I am posting what I had to do different for mine to work on raspian lxde on a non-pi account
I'm sub 21, so sorry. ;)
There are 10 types of people: those who understand binary and those who don't.

User avatar
ruralguru
Posts: 23
Joined: Sat Jul 02, 2016 11:08 pm
Location: USA
Contact: Website

Re: Netflix on Pi 2

Tue Jul 12, 2016 2:21 am

UPDATED:
Thankyou to:
Kusti wrote:
dom wrote:
mikerr wrote:
NOTE: the $ indicate from the <your_user_name> needs replaced
0. open terminal (yeah its like the laws of thermodynamics. i had the rest so i counted backwards)
1. get kusti's chrome repo by following directions in kusti's 1st post
viewtopic.php?f=63&t=121195&hilit=Chromium
2.
kusti8 wrote:To get V51, add dev to the end of the deb statement in /etc/apt/sources.list
And the usual
$sudo apt-get update
$sudo apt-get dist-upgrade
3. Get the recovery image
$wget https://dl.google.com/dl/edgedl/chromeo ... ecovery.sh
$sudo WORKDIR=/mnt sh linux_recovery.sh
4. select 14(may have to type 14 in twice) and wait for it to download.
5. when prompted after it is extracted type 0 to quit
6. Do whatever this does to mount the drive
$cd /mnt
$sudo apt-get install kpartx
$sudo kpartx -avs chromeos*.bin
$sudo mkdir -p /media/<you_user_name>/chromeos
$sudo mount -t ext2 /dev/mapper/loop0p3 -o ro /media/<your_user_name>/chromeos/
$mkdir ~/libvinewide
$sudo cp ./opt/google/chrome/libwidevine*.so ~/libvinewide
7. Check that both files are in proper location(plus easy to move offcard for future needs)
$cd ~/libvinewide
$ls -l
8. if both files there continue. else something went wrong above.
$cp ~/libvinewide/libwidevine*.so /usr/lib/chromium-browser
9. make a shortcut
$cd
$nano netflix
paste the following purple text into the file
chromium-browser --use-gl=egl --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36" http://netflix.com
10. use "CTRL+o" then "ENTER" to write, Then "CTRL+x" to write file
$ chmod -x netflix
11. now from terminal in the home directory ./netflix will run the app.

To add the framebuffer_depth=32 (can be added anywhere, i recommend adding things at the bottom for easy locating)
$sudo nano /boot/.config.txt file
I have horrible network speed where I am so I feel like i noticed a difference.
it is running 65C with heat sink
Over-clocked to 1350 and devoting half my ram to gpu
half my ram(~250MB) used
20-40% CPU usage.
Samsung SD EVO+ 32GB card.
-update- openGL seems to not work on my TV.
note: on RPi3 with Raspian Jessie 8.
Last edited by ruralguru on Thu Jul 14, 2016 1:16 am, edited 2 times in total.
Laptop: Dell Inspiron 7746, touch screen, Ubuntu 16.04
Desktop: Raspberry Pi 3, Raspian LXDE (Slight overclock).
New to *nix , glad to be here.

DNPNWO
Posts: 126
Joined: Fri Jul 08, 2016 1:51 am

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:25 am


3. Get the recovery image
$wget https://dl.google.com/dl/edgedl/chromeo ... ecovery.sh
$sudo WORKDIR=/mnt sh linux_recovery.sh
4. select 14(may have to type 14 in twice) and wait for it to download.
5. when prompted after it is extracted type 0 to quit
6. Do whatever this does to mount the drive
$cd /mnt
$sudo apt-get install kpartx
$sudo kpartx -avs chromeos*.bin
$sudo mkdir -p /media/<you_user_name>/chromeos
$sudo mount -t ext2 /dev/mapper/loop0p3 -o ro /media/<your_user_name>/chromeos/
$sudo cp ./opt/google/chrome/libwidevine*.so ~/
7. I added the above step to make sure I got the files.
$cp ~/libwidevine*.so /usr/lib/chromium-browser
9. make a shortcut
$cd
$nano netflix
paste the following purple text into the file
chromium-browser --use-gl=egl --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36" http://netflix.com
Are you not getting prompted on netflix to install Silverlight?

User avatar
ruralguru
Posts: 23
Joined: Sat Jul 02, 2016 11:08 pm
Location: USA
Contact: Website

Re: Netflix on Pi 2

Tue Jul 12, 2016 6:39 am

DNPNWO wrote:Are you not getting prompted on netflix to install Silverlight?
No. where the 2 libwidevine*.so files in the directory temp location? Verified 14., the hp chromebook os?(please somebody post the name for more feedback). Do you get any errors like "can't stat()" ?
Laptop: Dell Inspiron 7746, touch screen, Ubuntu 16.04
Desktop: Raspberry Pi 3, Raspian LXDE (Slight overclock).
New to *nix , glad to be here.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Netflix on Pi 2

Tue Jul 12, 2016 11:39 am

ruralguru wrote: To get V51, add dev to the end of the deb statement in /etc/apt/sources.list
I think 51 is now the default and so doesn't need "dev".
$sudo mkdir -p /media/<you_user_name>/chromeos

Code: Select all

$sudo mkdir -p /media/${USER}/chromeos
should work.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Netflix on Pi 2

Tue Jul 12, 2016 12:17 pm

Yes, 51 is now the default.
There are 10 types of people: those who understand binary and those who don't.

DNPNWO
Posts: 126
Joined: Fri Jul 08, 2016 1:51 am

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:36 pm

ruralguru wrote:
DNPNWO wrote:Are you not getting prompted on netflix to install Silverlight?
No. where the 2 libwidevine*.so files in the directory temp location? Verified 14., the hp chromebook os?(please somebody post the name for more feedback). Do you get any errors like "can't stat()" ?

Code: Select all


[email protected]:/mnt $ sudo cp ./opt/google/chrome/libwidevine*.so ~/
cp: cannot stat ‘./opt/google/chrome/libwidevine*.so’: No such file or directory
[email protected]:/mnt $ cp ~/libwidevine*.so /usr/lib/chromium-browser
cp: cannot stat ‘/home/fis/libwidevine*.so’: No such file or directory
[email protected]:/mnt $ cd
Last edited by DNPNWO on Tue Jul 12, 2016 4:54 pm, edited 2 times in total.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:38 pm

You have to change directory into the mounted partition at /media/${USER}/chrome is before you copy it. Always check with ls to see if it is there.
There are 10 types of people: those who understand binary and those who don't.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:40 pm

Yes, changing the instructions to:

Code: Select all

$ sudo cp /media/${USER}/chromeos/opt/google/chrome/libwidevine*.so  /usr/lib/chromium-browser
would be clearer.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:42 pm

dom wrote:Yes, changing the instructions to:

Code: Select all

$sudo cp /media/${USER}/chromeos/opt/google/chrome/libwidevine*.so ~/
would be clearer.
Yes, I'll change it.
There are 10 types of people: those who understand binary and those who don't.

DNPNWO
Posts: 126
Joined: Fri Jul 08, 2016 1:51 am

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:45 pm

kusti8 wrote:You have to change directory into the mounted partition at /media/${USER}/chrome is before you copy it. Always check with ls to see if it is there.

I thought I did, what is incorrect?

wget https://dl.google.com/dl/edgedl/chromeo ... ecovery.sh
sudo WORKDIR=/mnt sh linux_recovery.sh

at prompt hit 'enter', then '14' to select recovery image to download

when image download is completed/unpacked/inflated, at prompt, select '0' to quit

cd /mnt
sudo apt-get install kpartx

sudo kpartx -avs chromeos*.bin
sudo mkdir -p /media/${USER}/chromeos
sudo mount -t ext2 /dev/mapper/loop0p3 -o ro /media/${USER}/chromeos/
sudo cp ./opt/google/chrome/libwidevine*.so ~/
cp ~/libwidevine*.so /usr/lib/chromium-browser
cd

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Netflix on Pi 2

Tue Jul 12, 2016 4:46 pm

Check with pwd and ls. Looking at what you did, you seem to be in /mnt. The files are in /media/{$USER}/chromeos
There are 10 types of people: those who understand binary and those who don't.

SqyD
Posts: 4
Joined: Wed Jul 25, 2012 8:48 am

Re: Netflix on Pi 2

Sun Jul 24, 2016 6:15 pm

Using the steps from this thread and a couple hacks I'll document below (WIP, crashes sometimes,but basics are working) , I've managed to get flix2kodi working on the raspberry pi 3. It works by exiting Kodi alltogether and starting an openbox session with the fullscreen chromium browser in it. Demo video here

* Using the full raspbian distro, the chromium browser with the libwidevine as installed as described in this thread.
* I limited the screen resulution to 1024x786 as explained here
* Installed Kodi 16.1 from pipplware repo. Also installed the kodi-send command in the kodi-eventclients-xbmc-send package.
* Installed the flix2kodi plugin.
* Replacing the chromium launcher script in ~/.kodi/addons/plugin.video.kodiflix/resources/scripts/launchers/linux/chromium with what's below. It will save the netflix url to a file and quit kodi

Code: Select all

#!/bin/bash

# Save the url to a file.
echo $1 > ~/.kodi/userdata/netflix.url

# Quit Kodi
kodi-send --action=Quit
* Create this file ~/.config/openbox/autostart. It will launch chromium in full screen kiosk mode and show the URL saved from kodiflix earlier.

Code: Select all

#!/bin/bash

# based on from https://github.com/andrewleech/plugin.video.netflixbmc/blob/master/browser.sh

# lets find out if xdotool actually exist before we try to call them.
command -v xdotool >/dev/null 2>&1
XDOTOOL=$?

# Pick up the netflix URL from the file it was saved to
URL=$(<~/.kodi/userdata/netflix.url)

# notice the ampersand to send google chrome into back ground so that the script continues and we execute the xdotool below
/usr/bin/chromium-browser --use-gl=egl --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36" --start-maximized --disable-translate --disable-new-tab-first-run --no-default-browser-check --no-first-run --kiosk $URL &
CHROME_PID=$!

if [ $XDOTOOL -eq 0 ]; then
        # no point sleeping if xdotool is not installed.
        sleep 5
        xdotool mousemove 9999 9999 click 1
else
        echo "xdotool is not installed, can't remove cursor"
fi
# wait for google-chrome to be killed
wait $CHROME_PID

# Clean up the url file.
rm ~/.kodi/userdata/netflix.url
# leave openbox
openbox --exit
* Create this ~/.xinitrc to start openbox with startx.

Code: Select all

exec openbox-session
* Use raspi-conf to make the pi login as pi in a commandline environment instead of the graphical desktop one.
* Create this wrapper script in ~/.kodi/system/kodiflix-wrapper

Code: Select all

#!/bin/bash

# Wrapper script that will wrap around kodi and an openbox session for netflix viewing.

URL_FILE=/home/pi/.kodi/userdata/netflix.url

rm $URL_FILE

while [ ! -f $URL_FILE ]
do
  # Check if kodi is running already
  if [  -z "$(pgrep kodi-standalone)" ]
    then
      # Start Kodi
      /usr/bin/kodi-standalone
      KODI_PID=$!
  fi

  if [ -f $URL_FILE ]
  then
    /usr/bin/kodi-send --action=Quit
    sleep 1
    kill -1 $KODI_PID
    startx
    X11_PID=$!
    wait $X11_PID
  else
    break
  fi
  sleep 1
done

rm $URL_FILE
* Start the wrapper script from bashrc. Turns out this is not a very good approach. Will refactor into a proper service later on.

Code: Select all

echo 'exec ~/.kodi/system/kodiflix-wrapper' >> ~/.bashrc

Pulpnet74
Posts: 2
Joined: Thu Aug 11, 2016 8:34 am

Re: Netflix on Pi 2

Thu Aug 11, 2016 8:45 am

Hi SqyD,

I tried to follow your "guide" and mainly it works for me: anyway this last part is a bit confused for me...

- Does ".sh" extention matter for this "autostart" script or not?
* Create this file ~/.config/openbox/autostart. It will launch chromium in full screen kiosk mode and show the URL saved from kodiflix earlier.
- Does ".sh" extention matter for this "xinitrc" script or not?
* Create this ~/.xinitrc to start openbox with startx.
- Does ".sh" extention matter for this "kodiflix-wrapper" script or not?
* Create this wrapper script in ~/.kodi/system/kodiflix-wrapper
- Any progress on this:
* Start the wrapper script from bashrc. Turns out this is not a very good approach. Will refactor into a proper service later on.
Code: Select all
echo 'exec ~/.kodi/system/kodiflix-wrapper' >> ~/.bashrc
?

Thank you very much.

SqyD
Posts: 4
Joined: Wed Jul 25, 2012 8:48 am

Re: Netflix on Pi 2

Thu Aug 11, 2016 9:12 am

On the .sh script file extension:
You cannot just rename these files. If they don't execute you should probably do a

Code: Select all

chmod 755 [file] 
On bashrc alternative: I've tried to fine a nicer way to do this, but so far all alternatives I tried, mostly init.d/service scripts from this page http://kodi.wiki/view/HOW-TO:Autostart_Kodi_for_Linux , all had some issues. Perhaps a more robust version of the bashrc that checks if it's a local session and if other instances Kodi are already running is a better way.

Pulpnet74
Posts: 2
Joined: Thu Aug 11, 2016 8:34 am

Re: Netflix on Pi 2

Thu Aug 11, 2016 10:26 am

One more question: "~/.xinitrc" shall start with "#!/bin/bash" or not?

Thanks

Falco251
Posts: 1
Joined: Fri Aug 12, 2016 9:47 am

Re: Netflix on Pi 2

Fri Aug 12, 2016 9:58 am

Hi all!

I followed SqyD steps and after a little bit of tweaking I almost got everything working.
Don't forget to chmod the scripts, otherwise raspi login won't finish if kodi wrapper is called from the bashrc. I personally like starting Kodi manually, so I don't need to add anything to bashrc.

At the moment kodi launches, I can access all Natflix content from it and select the movie, chromium starts in the openbox session but:
- I had to manually enter the credential for Netflix website in Chromium openbox -> is it normal or should it be automatic?
- I always get an error C7121-1331-P5 and the movie doesn't start. I read on this forum that somebody else had the same, but there was no follow up -> what does this error mean? How can I solve it?

@Pulpnet74: the script works even without "#!/bin/bash"

EDIT: after installing again Widivine from the image I don't get the Netflix error any more, but I get prompted for Silverlight. As some other users experienced the same, how do I solve this? Is there a way to force HTML5?

curropar
Posts: 1
Joined: Sun Sep 11, 2016 8:26 pm

Re: Netflix on Pi 2

Sun Sep 11, 2016 8:47 pm

Hi,

I´m new to the RPI world (just got my first RPI3 3 days ago!) and I'm quite excited about it, specially since I saw it's possible to run Netflix on it (it was not the main purposeI bought it, but still is quite good news!).

That said, after following the very detailed steps from @ruralguru (except v51 is now default, chmod +x), I have the same problem: I can run Netflix, select the show, but just before start playing, I get this error C7121-1331-P5, and asks to try again. Rebooting does not solve it.

Any hint? Thanks!

User avatar
ruralguru
Posts: 23
Joined: Sat Jul 02, 2016 11:08 pm
Location: USA
Contact: Website

Re: Netflix on Pi 2

Wed Sep 28, 2016 8:25 pm

curropar wrote:Hi,

I´m new to the RPI world (just got my first RPI3 3 days ago!) and I'm quite excited about it, specially since I saw it's possible to run Netflix on it (it was not the main purposeI bought it, but still is quite good news!).

That said, after following the very detailed steps from @ruralguru (except v51 is now default, chmod +x), I have the same problem: I can run Netflix, select the show, but just before start playing, I get this error C7121-1331-P5, and asks to try again. Rebooting does not solve it.

Any hint? Thanks!
Greetings. I updated everything and now its not working, I haven't had a chance to hit the forums to report this yet so here I am. I'll see I can't talk some folks with the know how into helping again.
Laptop: Dell Inspiron 7746, touch screen, Ubuntu 16.04
Desktop: Raspberry Pi 3, Raspian LXDE (Slight overclock).
New to *nix , glad to be here.

thatguruguy
Posts: 6
Joined: Tue Oct 11, 2016 3:00 pm

Re: Netflix on Pi 2

Wed Oct 12, 2016 3:25 pm

Has anyone been able to get this up and running on the newest version of Raspbian with the included Chromium? Following the instructions given above, I now have Widevine showing up under chrome://plugins, but neither Netflix nor Amazon Prime recognize that I have Widevine installed.

Return to “Media centres”