Jump to content


Photo

Emby Theater on Raspberry Pi


  • Please log in to reply
452 replies to this topic

#41 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138077 posts
  • Local time: 12:47 PM

Posted 25 December 2016 - 04:03 PM

@haraldov thanks for the info !



#42 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 26 December 2016 - 07:02 AM

Howto build libcec 4.0.x from source (git) and make a raspberry .deb package

# Step 1 from https://help.ubuntu.com/community/CompilingEasyHowTo
sudo apt-get install build-essential checkinstall
sudo apt-get install cvs subversion git-core mercurial

# To compile libCEC 4.0.x on a new Raspbian installation. 
# From https://github.com/Pulse-Eight/libcec/blob/master/docs/README.raspberrypi.md
sudo apt-get update
sudo apt-get install cmake libudev-dev libxrandr-dev python-dev swig
cd
git clone https://github.com/Pulse-Eight/platform.git
mkdir platform/build
cd platform/build
cmake ..
make
sudo make install
cd
git clone https://github.com/Pulse-Eight/libcec.git
mkdir libcec/build
cd libcec/build
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
make -j4
sudo make install
sudo ldconfig

# From Step 4 https://help.ubuntu.com/community/CompilingEasyHowTo
# If you want a .deb package replace sudo make install with:
sudo checkinstall

# Install the raspberry .deb package
sudo dpkg -i /usr/local/src/libcebuild/build_20161226-1_armhf.deb


#43 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 26 December 2016 - 07:15 AM

Check that cec-client have found the device by running:

pi@raspberrypi:~ $ cec-client -l
libCEC version: 4.0.0, git revision: libcec-4.0.0-3+4-12fa275, compiled on Mon 26 Dec 10:42:22 UTC 2016 by pi@raspberrypi on Linux 4.4.38-v7+ (armv7l), features: P8_USB, DRM, P8_detect, randr, RPi
Found devices: 1

device:              1
com port:            RPI
vendor id:           2708
product id:          1001
firmware version:    1
type:                Raspberry Pi


#44 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 26 December 2016 - 09:42 AM

I have no problems to use libcec 3.0.1 which comes with rasbian jessie with pixel on my Samsung LCD tv. I only wanted to give information to @barat how to make a .deb package for upgrading to libcec 4.0.x if he wanted to try building himself. Sorry for that.



#45 barat OFFLINE  

barat

    Advanced Member

  • Members
  • 127 posts
  • Local time: 06:47 PM

Posted 27 December 2016 - 05:29 AM

But then I found out that I need to give the GPU (graphic processing unit) more memory when playing 1080 videos. I placed this line gpu_mem=128

in the /boot/config.txt.

 

AFAIK OSMC is configured to give 256M for GPU. I dunno why they gave so much, but I suppose that it was tested in some way :) Maybe this will speedup ET GUI?



#46 barat OFFLINE  

barat

    Advanced Member

  • Members
  • 127 posts
  • Local time: 06:47 PM

Posted 27 December 2016 - 06:19 AM

Example forum post:

https://discourse.os...ble-memory/7061

 

Here another one from moderator:

https://discourse.os...ettings/18349/2

 

But if You really want I can paste here my config when I return home :)

There might be some other settings which can help to tune-up raspbian for ET purposes :)


Edited by barat, 27 December 2016 - 06:25 AM.


#47 barat OFFLINE  

barat

    Advanced Member

  • Members
  • 127 posts
  • Local time: 06:47 PM

Posted 27 December 2016 - 08:33 AM

I'm not suggesting, I just wonder ... maybe they gave 256M because it best fits KODI req, but if electron uses GPU to speedup things then 256M might make ET more responsive ...

If someone is linux freak then he can install OSMC KODI17 beta, kill mediacenter (remove from "autostart") and install ET there (since OSMC is tuned-up and lightened raspbian) ...

BTW - osmc KODI allows for two video backends/players omx/mmal - but I don't know what's the difference between them.

I don't have time now to play this ET build on pi2 ... so I'll stick with OSMC a while and will be just following/read this thread :)


Edited by barat, 27 December 2016 - 08:39 AM.


#48 denz OFFLINE  

denz

    Advanced Member

  • Members
  • 2170 posts
  • Local time: 12:47 AM
  • LocationPerth, Australia

Posted 27 December 2016 - 09:33 AM

I have experimented with removing pixel desktop manager and just have xorg but it made no noticeable difference it is still jumpy and not for long term usage so it's not pixel that is cause of emby not being smooth.

I have watched two movies on it today one in hd and other in sd and both played without a single issue. I think for mem I put 280.

I have ordered pi 3 and hopefully by Friday it will be here I wanted to get it for awhile so it is good excuse.

As it currently stands pi 2 is just too slow great for kodi but not for emby will see how I go. I doubt it can make kodi any faster since it already can start live TV instantly it will probably just make it even more fluid.

I will give feedback once pi 3.

I will give osmc a whirl as well.

Edited by denz, 27 December 2016 - 09:34 AM.


#49 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 27 December 2016 - 04:25 PM

Some notes about my experience running Emby Theater on raspberry pi 3.

 

I find Emby Theater navigation smooth and without to much lagging. I have no problems to use my tv remote for browsing the folders. For playing recordings and live tv (tvheadend live streams) from Emby server 3.1.1.0 it should be quicker.

 

1) Use gpu_mem=256 not gpu_mem=128 as noted earlier. The raspberry pi 3 have 1024 MB memory to share. Remember to update the firmware with rpi-update.

Omxplayer need a minimum of 128 MB GPU memory for rendering the subtitles.

https://github.com/h...omment-15452919

 

2) I have tried to use the experimental open gl graphics driver to optimize Emby Theater, but you only get sound and no video when you play recording. You can install the driver with raspi-config. 

 

3) I have issues with subtitles not showing when playing the file with omxplayer for some of my mkv movies. I think it has to do with gpu_mem issue mention above or because S_DVBSUB is not supported. 

 

Why do you need to use omxplayer? You can install hardware accelerated mpv for raspberry pi 1/2/3 which works better than omxplayer. For more information look here: https://nwgat.ninja/...raspberry-pi/. 

Text #1
ID                                       : 2
Format                                   : S_DVBSUB
Codec ID                                 : S_DVBSUB
Language                                 : Norwegian
Default                                  : Yes
Forced                                   : No

Text #2
ID                                       : 3
Format                                   : S_DVBSUB
Codec ID                                 : S_DVBSUB
Language                                 : Norwegian
Default                                  : Yes
Forced                                   : No

pi@raspberrypi:~/emby-theater-pi $ mpv /home/pi/Desktop/Parker.mkv 
Playing: /home/pi/Desktop/Parker.mkv
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=nor (*) (aac)
     Audio --aid=2 --alang=nor (*) (ac3)
 (+) Subs  --sid=1 --slang=nor (*) (dvb_subtitle)
     Subs  --sid=2 --slang=nor (*) (dvb_subtitle)
File tags:
 Title: Parker
[ffmpeg/audio] aac: element type mismatch 1 != 0
AO: [alsa] 48000Hz stereo 2ch s16
[ffmpeg/audio] aac: element type mismatch 1 != 0
[ffmpeg/audio] aac: element type mismatch 1 != 0
[ffmpeg/audio] aac: element type mismatch 1 != 0
[ffmpeg/audio] aac: element type mismatch 1 != 0
[ffmpeg/audio] aac: element type mismatch 1 != 0
Using hardware decoding (rpi).
VO: [rpi] 1280x720 mmal
[osd/libass] PlayResX undefined, setting to -1
[ffmpeg/audio] aac: element type mismatch 1 != 0 


#50 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 27 December 2016 - 05:45 PM

Sorry, but I forget to mention about  the issues with subtitles not showing.

I can see the norwegian subtitle with Emby Theater for Windows 2.5.32 and with mpv. 

When the same file play in Emby Theater for raspberry pi I can choose which subtitle I want (ID 2 or 3), but no text displays on the movie.

 

5862e0f44448c_Skjermbilde.png

 

Any advice for this issue? 

 

Some info about the S_DVBSUB subtitle.

https://tvheadend.or...ds/5/topics/848

http://ffmpeg.org/pi...ary/060202.html



#51 denz OFFLINE  

denz

    Advanced Member

  • Members
  • 2170 posts
  • Local time: 12:47 AM
  • LocationPerth, Australia

Posted 28 December 2016 - 07:36 AM

I have tried the opengl driver yesterday and the sound only lasts for few seconds before lockup. There is a libgl error so need to test is opengl actually running. I tried it again today running without pixel by going to console and then use xinitrc to start theater but couldnt get it full screen and the same lockup occurs even in windowed mode.

I am now trying to make it like librelec to go direct to emby I am nearly there just got to figure out full screen.

Kodi doesnt use omxplayer anymore they use mmal player.

#52 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 28 December 2016 - 08:58 AM

For me is the limitations of omxplayer that it can not render image based subtitles bad. Most of my recordings have embedded or burned in subtitles.

Yesterday when I tried to find out why omxplayer could not show s_dvbsub, I found out that mpv have hardware acceleration for rpi and support for s_dvbsub. I don't know if mpv works better than omxplayer for other things.

I also found out that Emby Theater for linux used mpv. See here: https://emby.media/c...r-linux/?hl=mpv 



#53 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138077 posts
  • Local time: 12:47 PM

Posted 28 December 2016 - 03:11 PM

@haraldov, can you try the linux install on your PI and report your feedback? We are considering making the switch to mpv and thus, unifying the efforts, so that feedback would be helpful. thanks !



#54 Mayankel OFFLINE  

Mayankel

    Advanced Member

  • Members
  • 41 posts
  • Local time: 06:47 PM

Posted 28 December 2016 - 07:34 PM

Please, could someone help me on how to make Emby work on the start in the Raspberry Pi?

I'm trying to test it with my Pi 2 but i don't want to have a keyboard connected to my pi, so, auto start is needed. I tried to launch it eith the rc.local fila but doesn't works.

Thanks


Enviado desde mi iPhone utilizando Tapatalk

#55 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138077 posts
  • Local time: 12:47 PM

Posted 28 December 2016 - 10:00 PM

Please, could someone help me on how to make Emby work on the start in the Raspberry Pi?

I'm trying to test it with my Pi 2 but i don't want to have a keyboard connected to my pi, so, auto start is needed. I tried to launch it eith the rc.local fila but doesn't works.

Thanks


Enviado desde mi iPhone utilizando Tapatalk

 

Hi @Mayankel, thanks for the feedback. This is still very new so we just haven't worked out instructions for that yet. 



#56 fairct OFFLINE  

fairct

    Newbie

  • Members
  • 8 posts
  • Local time: 12:47 PM

Posted 28 December 2016 - 10:26 PM

@Mayankel I recommend VNC. That's how I'm using mine with no mouse or keyboard.



#57 fairct OFFLINE  

fairct

    Newbie

  • Members
  • 8 posts
  • Local time: 12:47 PM

Posted 28 December 2016 - 10:54 PM

Also, I have a Harmony Hub remote that I paired to my Pi 3 using the onboard bluetooth. From the harmony side, I said that it was a windows PC, which surprisingly resulted in some commands that work. I'm still working on fine-tuning the configuration, but navigation and playback controls are working! Thanks for all the hard work guys.


  • mgworek likes this

#58 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138077 posts
  • Local time: 12:47 PM

Posted 28 December 2016 - 11:35 PM

Also, I have a Harmony Hub remote that I paired to my Pi 3 using the onboard bluetooth. From the harmony side, I said that it was a windows PC, which surprisingly resulted in some commands that work. I'm still working on fine-tuning the configuration, but navigation and playback controls are working! Thanks for all the hard work guys.

 

Thanks for the feedback !



#59 denz OFFLINE  

denz

    Advanced Member

  • Members
  • 2170 posts
  • Local time: 12:47 AM
  • LocationPerth, Australia

Posted 29 December 2016 - 07:24 AM

I have gotten pi 3 today but emby theater is not working the first time I tried it it took be back to pixel log in screen and since then all i get is blank screen the log file it just has cec info and nothing else. If no suggestions I will copy the raspbian image again just in case there are some pi2 leftovers but i was sure that they are the same.

Edit: Done a new install and pi3 is way better not smooth as i liked but it is usable hopefully it will be improved will see how kodi is with this supercharged rpi. Now just waiting for the mpeg key to try videos.

Edited by denz, 29 December 2016 - 08:08 AM.


#60 haraldov OFFLINE  

haraldov

    Advanced Member

  • Members
  • 122 posts
  • Local time: 06:47 PM

Posted 29 December 2016 - 10:26 AM

I have tried the linux install on me PI3 and playing recordings and livetv works. I start the program with the shell script like so:

 

 

./et.sh

From the log I see the script tries to initialize the cec-client. It gives me ERROR about cec-client not installed, running without cec functionality. Maybe a path issue because I have installed the cec-utils package.

Then I get a lot of ECONNREFUSED when it tries to connect to /tmp/emby.sock

When playing the mkv videofiles it start up with the same speed as with omxplayer (plays after 1-2 seconds). With livetv the speed is more slower than playing recorded movies (plays after 12-13 seconds). The S_DVBSUB and the burned in subtitles are showing on my recorded movies and livetv. 

omxplayer allowed me to set the alpha of the video window so I could show the OSD of Emby Theater

The OSD of the Emby Theater video windows is jerky and slow when the video start playing and the OSD starts to disapper. Maybe a mpv issue?

 

I have not tried all the keyboard controls but fast forwarding with left and right arrow works.

 

The mpv player version tested is mpv 0.20 which maybe is to old. I installed it from https://nwgat.ninja/...or-raspberry-pi . 

The mpv config file (/home/pi/.config/mpv) I use have this line:

vo=rpi

which enable the mmal api video driver for rpi. In /boot/config.txt I have put the line gpu_mem=256 for giving the GPU 256 MB. 

 

I am going to compile mpv 0.23 to see if it gives any difference. I give you feedback after I have tried the new version.

 

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users