Jump to content

Raspberry Pi


Luke

Recommended Posts

Laurent_Hubaut

Hi,

I succesfully installed emby on a banana pi (jessie).

Sometimes, the server gets killed by the low memory killer

 

killing 'mono-sgen' to free XXX on behalf of kswapd0 because cache 5112KB is below 6144kB for oom_score_adj

Any advice?

Thanks

Link to comment
Share on other sites

Bernie V

Hi,

I succesfully installed emby on a banana pi (jessie).

Sometimes, the server gets killed by the low memory killer

Any advice?

Thanks

I use a USB stick in my pi for swapping.

Link to comment
Share on other sites

Laurent_Hubaut

Thanks for the advice.

I tested with a USB stick (2GB), but same issue. Seems that there is a leak

My server version : 3.0.5870.0

Link to comment
Share on other sites

Bernie V

It was hard for me to find all the info to tweak the rpi for Emby. With the default settings running OSMC the device crashed a lot. 

This is a short list what I did to prevent crashing due to memory:

 

-  USB stick to swap of 2GB with vm.swappiness=70 in /etc/sysctl.conf

 

- tweak mono options:

MONO_ENV="MONO_THREADS_PER_CPU=500 MONO_GC_PARAMS=soft-heap-limit=256m,nursery-size=64m"

MONO_OPTS="--optimize=all"
 

in

/etc/emby-server.conf

 

- Memory management (add in/etc/sysctl.conf)
vm.min_free_kbytes = 32768
vm.vfs_cache_pressure = 300

 

- Overlcloaking -> don't use this. In the begin I tried but I had regular crashes. These are my overcloak settings in /boot/config.txt:

arm_freq 850
sdram_freq 400
core_freq 375
init_turbo 0
over_voltage 0
sdram_over_voltage 0

force turbo 0

 

- Memory split settings in /boot/config.txt:

gpu_mem_256=112

gpu_mem_512=144

gpu_mem_1024=256

 

- Emby service in /etc/systemd/system/multi-user.target.wants/emby-server.service

 

set restart=Always -> when the service should crash it restarts automatic

 

Hope this helps you ;)

 

 

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

hurricanehrndz

First is an example, do not touch. Second is where you can write your changes. Copy the line you wish to change from the first file to the second and edit in second file as you wish

 

Sent from my D6603 using Tapatalk

Link to comment
Share on other sites

dimitrijp

Hi,

 

 

 

Since I'm planning to move away from Plex, and like Emby more, I have problems with setup on RPI2. Everything installs ok, I added test media to my server, but I cant play it to remote client. I don’t want to use transcoding, but this doesn’t seem to work in emby at least on RPI2. I have 100/100Mb internet line, so bandwidth is not a problem.

 

All media including flac music is being transcoded even if I try to use external player on Android like MX player. (BTW this was working for me on plex).

 

 

 

Does someone have any idea how to use direct play only with RPI2 and Emby? If I go to user settings and disable option to play transcoded media, I get notification on client side that no suitable streams are available. Also in server logs I can see error: Info App: Bitrate exceeds DirectPlay limit

 

thanks for help

 

 

 

server_log.txt

transcoding_log.txt

Link to comment
Share on other sites

Iorifly
Reading calmly instruction of the first post ...

   Which system should I run the commands?

  OSMC ??

 

This being taken in considering which system installed in raspberry?

 

 

*****************************************************

 


 

****** Forget I saw that is / raspbian-jessie

Edited by Iorifly
Link to comment
Share on other sites

  • 2 weeks later...
blindpet

I'd like to make a request to add libav-tools support instead of ffmpeg. Compiling from source is a pain for the end user and as far as I know it offers no benefit compared to the new (non-contentious) libav-tools. All current debian-based repositories do have libav-tools and no ffmpeg. WIth other media software like Madsonic and Subsonic you can use libav by symlinking it to /usr/bin/ffmpeg (same with avprobe to /usr/bin/ffprobe). I did that with this installation to test transcoding in the web browser but it fails, the logs only tell me this (even with debug logging enabled):

 

Warn, App, ffmpeg is missing decoder h264_qsv
Warn, App, ffmpeg is missing decoder mpeg2_qsv
Warn, App, ffmpeg is missing decoder vc1_qsv
Warn, App, ffmpeg is missing encoder libx265
Warn, App, ffmpeg is missing encoder srt
Link to comment
Share on other sites

hurricanehrndz

There is precompiled ffmpeg I have posted earlier. That is statically built other than one library. Its in my plans to finish developing the static builds ffmpeg, I have just been super busy and I have a ton on my plate. I'm only one guy and it's a lot of work.

 

 

Sent from my D6603 using Tapatalk

Link to comment
Share on other sites

djonnie

I re-installed my RPI 2 Model B with Emby today
 
since I couldn't find a 100% working procedure, I thought I'd share it here:
 

write Raspbian Jessie to a micro SD card and boot your RPI 2 from it
 
configure your network
 
connect to the RPI using Putty
 
sudo raspi-config
 
choose option 1 to expand the filesystem to the size of the micro SD card
 
choose option 3, B2 Console Autologin if you do not want to boot the GUI
 
close raspi-config and reboot your RPI (sudo reboot)

Installing Emby:

wget -qO - http://download.opensuse.org/repositories/home:emby/xUbuntu_14.04/Release.key | sudo apt-key add -
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/emby/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/emby-server.list"
sudo apt-get update
sudo apt-get install emby-server

Make Emby autostart on boot:

sudo systemctl enable emby-server

Compile ffmpeg or you won't be able to play anything:

cd /usr/src
sudo git clone git://git.videolan.org/x264
cd x264
sudo ./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
sudo make
sudo make install

cd ..
sudo git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264
sudo make
sudo make install

Make Emby use this ffmpeg version:

sudo nano /usr/bin/emby-server
 
change:
 
FFMPEG_BIN=$(command -v ffmpeg)
 
to
 
#FFMPEG_BIN=$(command -v ffmpeg)
FFMPEG_BIN=/usr/local/bin/ffmpeg
 
and change:
 
FFPROBE_BIN=$(command -v ffprobe)
 
to
 
#FFPROBE_BIN=$(command -v ffprobe)
FFPROBE_BIN=/usr/local/bin/ffprobe
 
sudo service emby-server restart

Almost ready...

follow the wizard on the Emby server using http://<IP>:8096

in Emby Configuration add an "On application startup" trigger to the "Scan media library" task or you'll end up with an empty library after restarting Emby
Edited by djonnie
  • Like 2
Link to comment
Share on other sites

Raspi2 Server

Make Emby use this ffmpeg version:

sudo nano /usr/bin/emby-server
 
change:
 
FFMPEG_BIN=$(which ffmpeg)
 
to
 
#FFMPEG_BIN=$(which ffmpeg)
FFMPEG_BIN=/usr/local/bin/ffmpeg
 
and change:
 
FFPROBE_BIN=$(which ffprobe)
 
to
 
#FFPROBE_BIN=$(which ffprobe)
FFPROBE_BIN=/usr/local/bin/ffprobe

Regarding this part of your post, When I nano /usr/bin/emby-server, I can only find this which doesn't quite match your example:

 

 

# ffmpeg

FFMPEG_BIN=$(command -v ffmpeg)

[ -n "$FFMPEG_BIN" ] && FFMPEG_OPTS="-ffmpeg $FFMPEG_BIN"

 

# ffprobe

FFPROBE_BIN=$(command -v ffprobe)

[ -n "$FFPROBE_BIN" ] && FFPROBE_OPTS="-ffprobe $FFPROBE_BIN"

Should I comment out both "FFMPEG_BIN=$(command -v ffmpeg)" and "[ -n "$FFMPEG_BIN" ] && FFMPEG_OPTS="-ffmpeg $FFMPEG_BIN" as well as "FFPROBE_BIN=$(command -v ffprobe)" and "[ -n "$FFPROBE_BIN" ] && FFPROBE_OPTS="-ffprobe $FFPROBE_BIN"?

 

If I do comment those line out, do I replace it with "FFMPEG_BIN=/usr/local/bin/ffmpeg)" and "FFPROBE_BIN=/usr/local/bin/ffprobe" respectively?

 

Thanks!

 

Edited by Raspi2 Server
Link to comment
Share on other sites

Raspi2 Server

Sorry, there was an error in these steps. I updated the instructions.

Thanks.

 

My /usr/bin/emby-server file now looks like this:

 

# ffmpeg

#FFMPEG_BIN=$(command -v ffmpeg)

FFMPEG_BIN=/usr/local/bin/ffmpeg

[ -n "$FFMPEG_BIN" ] && FFMPEG_OPTS="-ffmpeg $FFMPEG_BIN"

 

# ffprobe

#FFPROBE_BIN=$(command -v ffprobe)

FFPROBE_BIN=/usr/local/bin/ffprobe

[ -n "$FFPROBE_BIN" ] && FFPROBE_OPTS="-ffprobe $FFPROBE_BIN"

 

I followed through the wizard on the Emby server and selected /mnt as the source directory for my music collection. I have a 16GB thumb drive attached to the Pi for testing purposes with a bunch of music on it. Eventually I want to use a 1.5TB HDD. Both are formatted as NTFS. I am not able to see any of the music files. I've tried with my computer's browser and my Android App but it still won't show anything. I click on "Suggestions", "Albums", "Album Artists", etc. and nothing appears. I SSH'd into the Pi and there's nothing in the /mnt folder. Do I have to do something to get the Pi to recognize the thumb drive?

 

Also, how do I edit the "Emby Configuration"? I looked through the "Advance Options" in the left pane of the Emby dashboard and couldn't find anything. In post #133 of this thread they mention that there is a configuration file in /etc/emby-server.conf . Is that where I add the trigger? If so how do I do that?

 

Thanks!

Link to comment
Share on other sites

djonnie

Also, how do I edit the "Emby Configuration"? I looked through the "Advance Options" in the left pane of the Emby dashboard and couldn't find anything. In post #133 of this thread they mention that there is a configuration file in /etc/emby-server.conf . Is that where I add the trigger? If so how do I do that?

 

 

Connect to the Emby Server using your webbrowser, http://<IP-adres>:8096, go to the settings page, scroll down to scheduled tasks, find " Scan media library" and click on it and then add the trigger

Link to comment
Share on other sites

djonnie

 

I followed through the wizard on the Emby server and selected /mnt as the source directory for my music collection. I have a 16GB thumb drive attached to the Pi for testing purposes with a bunch of music on it. Eventually I want to use a 1.5TB HDD. Both are formatted as NTFS. I am not able to see any of the music files. I've tried with my computer's browser and my Android App but it still won't show anything. I click on "Suggestions", "Albums", "Album Artists", etc. and nothing appears. I SSH'd into the Pi and there's nothing in the /mnt folder. Do I have to do something to get the Pi to recognize the thumb drive?

 

 

you can try these steps from a SSH session:

 

sudo fdisk -l

 

find your USB device (easiest is to check the size column) and note the device name, for example /dev/sda1

 

sudo mkdir /mnt/emby_disk

 

sudo nano /etc/fstab

 

at the end of the file add a new line:

 

<the device name>   /mnt/emby_disk    auto

 

for example:

 

/dev/sda1    /mnt/emby_disk    auto

 

close the file

 

sudo mount -a

 

the disk is mounted and now you can add libraries containing the files on this disk to your Emby Server configuration

 

The disk must be available during boot, or Raspberry will not boot. So when replacing your USB stick with an USB HDD, you need to remove the USB stick from the fstab file before rebooting.

Edited by djonnie
Link to comment
Share on other sites

My Ubuntu sever died so I got a rpi3 and followed the instructions from djonnie thanks btw but cant see my nas now. ( wd my cloud). I set it up just like Ubuntu but must have forgot something. I can see it if I go to its address in the address bar. but if I put it in the address in add media in emby it will not see it.

Link to comment
Share on other sites

ChunkyKev

Hi Djonnie, an excelent post explaining how to set up Emby on Raspberry PI 2, something I have been looking for, for some time.  I am not hugely techie so this was easy to follow. 

 

I dont seem to be able to get into emby via webpage though.  I have checked my IP address is correct, I set it to static at beginning of tutorial, but when I go to browser nothing, cannot connect.  Any ideas?  I have now tried by enabling the Gui on start up, hoping to see Emby running, and I don't see anything there either?

 

Any help would be great.

Link to comment
Share on other sites

Raspi2 Server
I dont seem to be able to get into emby via webpage though.  I have checked my IP address is correct, I set it to static at beginning of tutorial, but when I go to browser nothing, cannot connect.  Any ideas?  I have now tried by enabling the Gui on start up, hoping to see Emby running, and I don't see anything there either?

 

 

Did you make sure that Emby starts up automatically when the Pi boots? It's the 3rd step in Djonnie's guide. At the command line enter:

 

sudo systemctl enable emby-server

 

Reboot your Pi and see if you can access Emby's server on the Pi.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...