Linux HOWTO: Install Netflix on xbmcbuntu 12.0 frodo addon
#31
(2013-02-23, 21:05)fnc1 Wrote: Clad. That's odd that its not getting focus. You have a default install of the new mythbuntu?

Not mythbubtu the officially distributed XBMCbutnu, the install is rather vanilla but I have done a few things to customize the OS for the sake of Plex, SAB, Couchpotato and Sickbeard.

Good news is I fixed this but not using traditional means. I found if I launched netflix-desktop without openbox it works fine. Now to the audio issue some are having. This is becuase the XBMCbuntu desktop does not have alsa configured. Its a fairly simple process but I'll be detail oriented to make it easy..

In my case I'm using HDMI to a reciever and needed to have audio from XBMC and XBMCubuntu desktop mixed. .... so!

-First you need to break your audio config in XBMC (this is so we can test it in console as 2 services cant share the same device without mixing, which we setup later) to do this you simply navigate to 'system > system > audio output' and change the 'audio output device' to something OTHER than what works. (in my case I chose an analog device)

-Next you will need to either dump to the virtual console (ALT+CTRL+F1) or ssh to your box (either will work).

-Now we need to determine what audio devices are on your system, we do this with the command:
Code:
aplay -l

It will produce the following output (a map of all sound devices):
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC1200 Analog [ALC1200 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: ALC1200 Digital [ALC1200 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Now we need to test which device is the correct one we are going to use the speaker-test command passing it specific instruction to test each card and device.
Since I know I only care about HDMI on my Nvdia GT610 I want card 1 device 3 or 7, for device 3.
Code:
speaker-test -D plughw:1,3

say it was card 5 device 2
Code:
speaker-test -D plughw:5,2

On my configuration I found it as card 1, device 7

If it works you will hear "pink noise" more commonly known as static.

now we know the device which outputs audio!!

Next we need to create or modify the existing /etc/asound.conf file (on my new XBMCbuntu install its not there)

Code:
sudo nano /etc/asound.conf

If the file exists feel free to exit [CTRL-X] and save it 'cp /etc/asound.conf ~/' <-- puts it in your home dir just incase I'm a crazy baboon and you can get back to where you were before.

Anywho back to nano, if its not empty blitz it out by using [CTRL-K] to wipe out each line. Now paste in this crazy mess of code.

Code:
pcm.!default            { type                  plug;
                          slave.pcm             "dmix0"; }
ctl.!default            { type hw; card 1; device 7; }

pcm.dsp0                { type                  plug;
                          slave.pcm             "dmix0"; }
ctl.dsp0                { type hw; card 1; device 7; }
ctl.mixer0              { type hw; card 1; device 7; }

pcm.dmix0               { type                  dmix;
                          ipc_key               13759;

                          slave.pcm             "hw:1,7";
                          slave.channels        2;

                          slave.rate            48000;
                          slave.period_size     4096;
                          slave.buffer_size     16384;

                          slave.period_time     84000;
                          slave.buffer_time     340000;

                          # Map only the first two channels
                          bindings.0            0;
                          bindings.1            1; }

You see the 'hw:1,7' you'll need to change all these entries to what worked for your setup. Ill put links to what all this means (if you care).

Lets finish up in nano:
quit [CTRL-X]
save 'Y' and [ENTER]

The great news is 'speaker-test' reads the alsa global configuration file '/etc/asound.conf' live so theres no need to reboot or reload services (typically) so if you made a booboo or want to play around feel free to just re-edit the file and test away!

Now, a test to make sure the ubuntu system can play sounds using the configuration, this time we dont want to specify hardware or plugins we just want the configuration file to tell the 'speaker-test' binary what to do ... so ....

Code:
speaker-test

if it works you'll get sound out both your front speakers! If you want to test the 2 front channels

Code:
speaker-test -c2

You cant test all your surround sound channels because this sound is being down mixed to only two channels, dont worry this is only for apps that your not choosing the dsp0 channel (dont worry I'll explain next). If you want to learn about upmixing to 5.1 for applications, google 'alsa upmix examples'.

Unfortunately XBMC doesn't read the channel data from alsa live so a reboot will be required (yes a reboot, not just a restart of XBMC, you can probably find a way to restart everything to get around this ... well this is just a quick tutorial).

Code:
sudo reboot

Once XBMC is back up navigate back to System > System > Audio Output;
For 'Audio Output Device' find the option which includes (dsp0) mine looks like 'HDA NVidia (dsp0) HDMI 1'
For 'Passthru output device' if you changed it (which there was no need to) set it back to your same device mine looks like 'HDA NVidia, PIO SC-1222 on HDMI'

dsp0 is mapped to send audio directly to the output device (HDMI in my case) so there is no resampling or downmixing, everything should work just as it did.

Here is a link to details on ALSAs configuration and will help if you need to tweak anything.

BTW:

How is the smoothness of the video for everyone on FRODO, I'm not too happy it seems its about 18-20 FPS, I tried the latest experimental NVidia drivers and didn't see any improvement. I tested in XBMCbuntu (desktop) and see the same thing, I also applied all the PPA available updates as they have come out too.

Sad thing is I may still force myself to use this as I cant bring myself to plug my AppleTV back in Tongue
Reply
#32
Clad: nice write up. If you could check on things on your system by using the command inside of the addon dir using the command in run2.sh it will create a log file for Netflix-desktop. Then check the log to make sure there is not anything screwy going on.
Reply
#33
Fnc1, I'm going to play with it over this weekend, I had debugging on (thanks to the run2.sh script) but didn't have a lot of time to pour back through the log results (a lot of fud in it for only running for 30 seconds).
Reply
#34
FYI this does not work on Arch linux. When I click on netflix in xbmc nothing happens. I have netflix desktop installed and I wanted something that would intergrate into xbmc and possibly allow me to use my remote with it. Im hoping for something in the next few months or so. Netflix are complete asses for not supporting linux.

I dont understand why companies develop for priporitory software to begin with. MS Silverlight? Whats the point? You have to pay more money for the licensing and then they got you by the balls becuase you developed the whole thing around it. Once their MS licences are up and they realize what a complete waste of money it is and decide to not use them anymore. They have to develop the whole thing from scratch.
Reply
#35
Are you sure the run.sh has the execute bit set? ( I discussed it a page or so back ). If it is try editing the run.sh to only call the netflix-desktop binary.

Also make sure it's in the correct $PATH, it's possible that you need to call its absolute location I.e /usr/sbin/netflix-desktop . You can test the by opening terminal and typing netflix-desktop if its not found that's probably the cause.

Good luck!

Edit:

PS you MUST use a mouse with the app, keyboard/remote won't work.
Reply
#36
cladmonitor: did you get anywhere with your debug?

sirkingchase: right I only tested it on the latest mythbuntu - so clad is right, most likely you will need to make some changes to paths and what not, in order to get it working on Arch..
Reply
#37
I would lost for some help. I got paste runnign Eden, and im lost when it comes to advanced launcer, since - the example shows launcher 1.7.2- but now the only thing available is 1.13.
I am trying to run netflix- but.. nothing happens. When i exit, i see in the command prompt - (i run it from cmd prompt) - i see permission denied.
Even when as root.

Im lost.


to clarify a bit- when i exit xbmc, the command prompt shows the parth of the script- with permission denied, for every time i click the button.
I have absolutley no clue as to how to make this work. I dont know how u guy got it going.
Reply
#38
This was written specifically for the latest release of xbmcbuntu frodo... if your running eden, and want to use this, you should updated to xbmcbuntu's latest release.

No idea about Advanced launcher that's a completely separate addon
Reply
#39
Funny you say that.
i thought about doing the same excatly thing. Because- why bother with eden if i can upgrade.
SO i did.

Same error still occurs. And yes- im using the addon for frodo.

Still getting permission denied.

script.netflix_install/run.sh: Permission denied
Reply
#40
Ssh to you box and run 'chmod + x <file path/filename>'. Then retry
Reply
#41
Couldnt load XPCOM. (Firefox error)

subcool@Media-subcool:~$ sudo xbmc
Home directory /home/subcool not ours.
Home directory /home/subcool not ours.
Home directory /home/subcool not ours.
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
Openbox-Message: A window manager is already running on screen 0
Openbox-Message: A window manager is already running on screen 0


I changed the Openbox to Lightdm-
I tried to run as a normal user, but got an error.
<quote>
subcool@Media-subcool:~$ xbmc
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
Only root can run Light Display Manager. To run as a regular user for testing run with the --test-mode flag.
</quote>

So then i ran it as SU
<quote>
subcool@Media-subcool:~$ sudo xbmc
Home directory /home/subcool not ours.
Home directory /home/subcool not ours.
Home directory /home/subcool not ours.
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed

</quote>

When i clicked netflix- nothing happen. It kinda stall for a moment- But nothing popped up.
I had "better" results using lighdm, than openbox. but only because of lack of error.
I can not get this thing going. :/
Reply
#42
This add'on has become a serious pain in the ass.
Now i dont have use of firefox, becuase it updated from 17 to 18 or 19. Either or. i run into a XPCOM issue.
FOr which

http://appdb.winehq.org/objectManager.ph...&iId=27596

Entertains a fix- BuT_ since we are using a repo instead of a standard installation for this- IT doesnt work.
According to the directions listed in the winehq. - your supposed to override the dll. BUT there is no option for that in this scenario.
NOW i lost ALL use of netflix-desktop~~ im fuming.

This issue now has a circle of issues to be resolved. -
Reply
#43
Sorry about the last post, apparently I thought I was on page 5 when I was reading page 1 (needs more coffee)......

So I figured out what the issue was with my frame-rates, x11vnc server mixed with the plexhelper bugs, I was also having random crashes which seems to have been resolved.

SubCool,
You can just apt-get --purge all of netflix-desktop and start again, there is nothing magical about what this script does, and its identical to how the netflix-desktop installs works for any other Ubuntu/Debian install, it just does it automagically.

What I recommend, is to purge everything:
Remove the Netflix ddon in XBMC
In SSH or console (ALT+F1)
sudo apt-get update && sudo apt-get install ppa-purge && sudo ppa-purge ppa:ehoover/compholio && sudo apt-get purge firefox
sudo rm -Rf ~/.netflix-desktop

...And re-add using the official path:
sudo add-apt-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install netflix-desktop

After you install <reboot>
after machine is up login to XBMCbuntu and open Netflix from the Navigation Menu, if all works there then reinstall the Netflix addon. If you still cant launch in XBMC then come back here and we can work through that.

Good Luck!
Reply
#44
Also anyone test if we don't need alsa config crap in 12.1 anymore (alsa and XBMC don't get along very well).
Reply
#45
Cladmonitor what did you have to do to fix this?

(2013-03-19, 21:27)cladmonitor Wrote: So I figured out what the issue was with my frame-rates, x11vnc server mixed with the plexhelper bugs, I was also having random crashes which seems to have been resolved.

Also i just updated to 12.1 but have to head out of town... so i may not be able to get to look at this until i return
Reply

Logout Mark Read Team Forum Stats Members Help
HOWTO: Install Netflix on xbmcbuntu 12.0 frodo addon4