Jump to content

Emby Theater for Linux


xnappo

Recommended Posts

 

Use the command whereis for searching in the path

pi@raspberrypi:~/emby-theater-electron $ whereis electron
electron: /usr/lib/electron /usr/local/bin/electron /opt/nodejs/bin/electron

Edit et.sh and write in the correct electron path like this:

/usr/local/bin/electron --enable-transparent-visual main.js

/opt/nodejs/bin/electron works.....but this # After ET startup choose Setting --> Video Setting --> Hardware acceleration mode --> RPI  I don't see this, it's all windows options.....

Link to post
Share on other sites

@@Luke

Here is my et.sh without -enable-transparent-visual. Works without problem. Thanks for the tip.

#!/bin/bash

# The command xset are available when you install the package x11-xserver-utils
# sudo apt install x11-xserver-utils
xset s off         # don't activate screensaver
xset -dpms         # disable DPMS (Energy Star) features.
xset s noblank     # don't blank the video device

# sudo apt install xdotool
xdotool mousemove 2000 2000

electron main.js

@@geaves

After ET startup choose Setting --> Video Setting --> Hardware acceleration mode --> RPI  I don't see this, it's all windows options.....

Have you done a update of the repository?

pi@raspberrypi:~ $ cd emby-theater-electron/
pi@raspberrypi:~/emby-theater-electron $ git pull
Already up-to-date.
pi@raspberrypi:~/emby-theater-electron $
Edited by haraldov
Link to post
Share on other sites

 

@@Luke

Here is my et.sh without -enable-transparent-visual. Works without problem. Thanks for the tip.

#!/bin/bash

# The command xset are available when you install the package x11-xserver-utils
# sudo apt install x11-xserver-utils
xset s off         # don't activate screensaver
xset -dpms         # disable DPMS (Energy Star) features.
xset s noblank     # don't blank the video device

# sudo apt install xdotool
xdotool mousemove 2000 2000

electron main.js

@@geaves

Have you done a update of the repository?

pi@raspberrypi:~ $ cd emby-theater-electron/
pi@raspberrypi:~/emby-theater-electron $ git pull
Already up-to-date.
pi@raspberrypi:~/emby-theater-electron $

 

That returns the same as above

Link to post
Share on other sites

@@geaves

 

As a workaround for the missing RPI option in ET you can make a mpv.config with the same mpv option for rpi video output.

pi@raspberrypi:~ $ mkdir .config/mpv
pi@raspberrypi:~ $ touch .config/mpv/mpv.conf 

Here are mine choosen mpv option

# Use rpi video output by default.
vo=opengl
# Use rpi hardware acceleration
#hwdec=rpi
# Mpv start up fullscreen
fs
# No youtube-dl intergration
no-ytdl
# No probing of the video stream
demuxer-lavf-probe-info=no
Link to post
Share on other sites

Ok this is working now, complete with RPI hardware set  :) however as of yet I don't have a Premiere, so the 1 minute timer seems to stop a movie playing, (I thought this was set for 5 originally) although it attempts too, but it's 'windowed' obviously there is something to set for full screen will backtrack to see if I can find anything.....running from the chromium browser and signing into emby this does work as I expected.

Link to post
Share on other sites

I gave it another go I have upgraded to debian scratch installed mpv no errors but video is so slow. I then compiled new mpv build per instructions by haraldov installed it installs mpv in the same location but still the same error.

 

Edit: Restarted my pi run emby theater no error and live tv starts faster than my i5 kaby lake pc both hd and sd channels. What a huge excercise at least it is working now will give it a lot of testing on the weekend.

Edited by denz
Link to post
Share on other sites

It is very impressive so far

 

Very strange issue the first time I start theatre no issues close theatre start it again error that I previously have pops up try to play something just a spinning circle start again same issues restart pi start it again no issue close theatre start again error again nothing plays restart pi again start theatre works again I have done this 8 times and the same thing happens. I thought Linux is not like windows. 

 

 

Out of the 16 channels only two are not getting displayed properly the deinterlace is not being applied and after so many start and stopping live tv and recorded tv have managed to freeze the pi video is frozen and keyboard is not responding.   

Link to post
Share on other sites

I did more testing I discovered the issue with frozen picture is to do with keyboard not responding i keep pressing buttons to find which one will exit mpv but none work so as i am pressing i eventually press pause so i think it is frozen but it is not and after some seconds keyboard starts responding but still only pause and play button works so the only way to recover is to use putty to shutdown mpv. I have managed to reproduce this few times but it seems random and i think it is related to error below.

 

Regarding the mpv I have removed everything this time noticed that apt-get was letting me know to use autoremove so I did and that removed ffmpeg etc and then I installed 0.26 version and have only managed to reproduce the error twice and the only way to recover is to restart but it wasn't the same error it is actually different.

 

 

599587d460110_Capture.jpg

Edited by denz
Link to post
Share on other sites

I have tried it with clean install of raspbian stretch as it was just released and this time theater can´t find the built in mpv or the one I compiled. I have even tried copying mpv to emby-theater-electron folder and still the same. Where the hell is it looking for it.  

Link to post
Share on other sites

theater can´t find the built in mpv or the one I compiled

@denz 

Have you remembered to install the node-mpv package? I have done a clean install of raspbian stretch and I have no problem to use ET with this release. But the install of the node-mpv package gives a error message about No license field.

pi@raspberrypi:~/emby-theater-electron/node_modules $ npm install node-mpv/
npm WARN package.json node-mpv@1.0.3 No license field.
node-mpv@1.0.3 node-mpv
├── promise@7.3.1 (asap@2.0.6)
├── cuid@1.3.8 (node-fingerprint@0.0.2, browser-fingerprint@0.0.1, core-js@1.2.7)
└── lodash@4.17.4
pi@raspberrypi:~/emby-theater-electron/node_modules $
Edited by haraldov
Link to post
Share on other sites

Videos play and I am able to control them -- BUT... there are no onscreen controls displayed.  Mpv(git) seems to render in the top most layer with nothing else being able to be overlayed on that layer.  This also happens if I start mpv from the desktop not in fs mode -- it renders the movie, but you can not place another window over the render.

 

I see the same problem with ET as @@mitomac reported. When I use the mpv fullscreen option mpv play the video fullscreen in ET. But the onscreen control do not display.

Without the mpv fullscreen option the video play in the middel of the screen and it is half in size. The onscreen control displays under the video. 

5999254d70787_20170820072654_1920x1080_s

Edited by haraldov
Link to post
Share on other sites
I installed stretch again and I am noticing that your version is different than mine.
 
 
pi@raspberrypi:~/emby-theater-electron $ npm install node-mpv
node-mpv@1.2.1 node_modules/node-mpv
├── promise@7.3.1 (asap@2.0.6)
├── cuid@1.3.8 (node-fingerprint@0.0.2, browser-fingerprint@0.0.1, core-js@1.2.7)
└── lodash@4.17.4
pi@raspberrypi:~/emby-theater-electron $ 
 
I also installed your version and still the same error. 
 
59997aea169f4_Error_002.png
 

 

59997b008d8e8_piraspberrypi_003.png

Link to post
Share on other sites

Having problems installing ET on Linux Mint. I followed the steps from the 1st post and ran into some problems:

 

Everything was going good until this step: (note the warnings at the bottom)

 

gene@gene-desktop ~ $ sudo npm install node-mpv
/home/gene
└─┬ node-mpv@1.3.1
  ├─┬ cuid@1.3.8
  │ ├── browser-fingerprint@0.0.1
  │ ├── core-js@1.2.7
  │ └── node-fingerprint@0.0.2
  ├── lodash@4.17.4
  └─┬ promise@7.3.1
    └── asap@2.0.6

npm WARN enoent ENOENT: no such file or directory, open '/home/gene/package.json'
npm WARN gene No description
npm WARN gene No repository field.
npm WARN gene No README data
npm WARN gene No license field.


then a few more steps later.....it says to: cd emby-theater-linux
But I don't have that directory, I have a emby-theater-electron and inside there, I see the et.sh file but when I type ./et.sh, I get:

gene@gene-desktop ~/emby-theater-electron $ ./et.sh
bash: ./et.sh: Permission denied
 

Link to post
Share on other sites

you need to go to emby-theater-electron folder and then run sudo npm install node-mpv

 

 

for the et.sh you need to right click on it and in permissions execute select anyone. 

 

 

Anyone else has issues with mpv running on rpi I still cannot get it to run on pi it is frustrating. I copied mpv file to all bin folders and still nothing. 

 

The /tmp/emby.sock file is never created 

 

Warning: loadFile() is deprecated. Use load() instead
{ Error: spawn "main.js" ENOENT
    at exports._errnoException (util.js:1026:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn "main.js"',
  path: '"main.js"',
  spawnargs: 
   [ '--input-unix-socket=/tmp/emby.sock',
     '--idle',
     '--really-quiet',
     '--hwdec=no',
     '--deinterlace=auto',
     '--video-output-levels=auto',
     '--audio-channels=auto-safe',
     '--ad-lavc-ac3drc=0',
     '--wid=35651585',
     '--no-osc' ] }
{ Error: connect ENOENT /tmp/emby.sock
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'connect',
  address: '/tmp/emby.sock' }
MPV Player seems to have died. Restarting...
Edited by denz
Link to post
Share on other sites

I think I am getting somewhere now for some unkown reason when i type npm install node-mpv it downloads the one from the internet and replaces the version that is there and when I type install npm install node-mpv@1.0.3 that again downloads the one from internet it does not install the one that is already there and it produces the mpv error. I tried typing npm ls that gave me what is missing then i went inside node-mpv and run the command to install dependency but again no error in theater only a spinning circle and i can see that no sock file has been created.

 

If I overwrite the node-mpv folder with the custom node-mpv all I get is a spinning circle.

Edited by denz
Link to post
Share on other sites

I just noticed upon reading haraldov instructions once I remove this --enable-transparent-visuals from et.sh I dont get the error any more. I am compiling mpv from source as the version with stretch is only using software how rubbish is that what is point of including it without rpi support. 

Link to post
Share on other sites

 

No HDMI CEC work has been done (I don't have a device to debug with)

 

When trying to run Emby Theater on Raspbian Strech with HDMI-CEC I get an error:

# Install HDMI CEC Support
sudo apt-get install cec-utils

# Run Emby Theater with HDMI-CEC:
electron main.js cec-client

59a81409a88f1_Skjermbilde.png

I have tracked it down to line 110 in cec.js which checks for initialization of the cec-client.

// check for initialization
        if (!initialized) {
            var dataAsString = data.toString().replace(/\s+/g, "");
            var indexOfAdapter = dataAsString.includes("CECclientregistered");
            if (indexOfAdapter) {
                console.log("\nCEC Client successfully registered.\n");
                var initVals = dataAsString.split(",");
                var cecAdapterVals = initVals[4].split("(");
                var cecBaseVals = initVals[5].split("(");
                CEC_ADAPTER.device = cecAdapterVals[1].substr(4);
                CEC_ADAPTER.lAddr = cecAdapterVals[2][0];
                console.log("CEC Adapter Device:\t" + JSON.stringify(CEC_ADAPTER, null, "  "));
                initialized = true;

The ET startup log says the CEC Client is  successfully registered:

Initializing cec-client...

{ cecExePath: 'cec-client',
  cecEmitter:
   EventEmitter {
     domain: null,
     _events: {},
     _eventsCount: 0,
     _maxListeners: undefined } }

CEC Client successfully registered.
 

cec-client.log

et-31082017.log

post-174117-0-52602100-1504188091_thumb.png

Link to post
Share on other sites

To work on rpi stretch you need electron@1.4.16 and also when installing node-mpv you need to type sudo npm install node-mpv@1.0.3 and lastly adjust et.sh to remove the extra commands and have only electron main.js and that is what I missed from the detailed instructions given by @@haraldov

Edited by denz
Link to post
Share on other sites

Thanks @@denz for feedback. 

 

I have updated my instruction https://emby.media/community/index.php?/topic/42868-emby-theater-for-linux/?p=455189 to adjust et.sh to remove the extra commands and use sudo to install the local node-modules.

 

Make sure you install the local node-mpv package and not the package from the npm nodesource because ET is using a customized version https://emby.media/community/index.php?/topic/42868-emby-theater-for-linux/?p=455028

This is specified in package.json and npm install these packages if you are in the directory /home/pi/emby-theater-electron

Edited by haraldov
Link to post
Share on other sites

Just wondering if this version is the one that should be installed on a Raspberry Pi. Should I follow the instructions here or... should I better stick with the old thread on Raspi?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...