A MediaCenter controlled from your smartphone tested on Ubuntu / Raspbian (Raspberry Pi) and developed as a birthday gift for Benthe ;)
This project it written in Javascript using Node.js and Sails.js (a realtime MVC Framework for Node.js). To play media files it is using OMXPlayer (on Raspian) or ffplay (on Ubuntu).
- On Ubuntu:
sudo apt-get install nodejs
- On Raspbian follow this instructions.
Bower to install cliend site dependencies
sudo npm install -g bower
Forever for run the mediacenter as daemon
sudo npm install forever -g
Unclutter for hide the mouse if unused
sudo apt-get install unclutter
sudo apt-get install ffmpeg
- If you can't find this package on Ubuntu use this ppa:
sudo apt-add-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
sudo apt-get install ffmpeg
- On Ubuntu:
sudo apt-get install ttf-ubuntu-font-family
- On Raspbian:
wget http://de.archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-font-family-sources/ttf-ubuntu-font-family_0.80-0ubuntu6_all.deb
sudo dpkg -i ttf-ubuntu-font-family_*.deb
- Clone this repo and change directory:
git clone git@github.com:JumpLink/mediacenter.git
cd mediacenter/src
- Install server side dependencies:
npm install
- Install client side dependencies:
bower install
- Get movie database keys on
- TMDb Key: https://www.themoviedb.org/documentation/api
- TVDB Key: http://thetvdb.com/?tab=apiregister
- Copy the config/local.js.example to config/local.js and modify to insert the keys:
cp config/local.js.example config/local.js
[your favourite editor] config/local.js
- Be sure to be in mediacenter/src and run:
node mediacenter.js
- Scan the QR-Code or type the Address in your Browser
- Install Raspbian
- Set start LXDE on boot
- Setup WiFi/Ethernet
- Set pcmanf to automount devices and but not show them on mount.
- Setup autostart
- Modify
/etc/xdg/lxsession/LXDE/autostart
to
# show all gui apps on mediacenter
export DISPLAY=:0.0
#@lxpanel --profile LXDE
# we need pcmanfm for automount devices
@pcmanfm --desktop --profile LXDE
# turn off the screen saver
#@xscreensaver -no-splash
@xset s off
# disable the power management using dpms to power the monitor down
@xset -dpms
# turn off blanking
@xset s noblank
# hide the mouse if unused
@unclutter
# remove old logs
@forever cleanlogs
# start mediacenter
@sh -c 'cd /home/pi/mediacenter/src && forever start -l mediacenter.log mediacenter.js'
- Restart mediacenter:
forever restart -l mediacenter.log mediacenter.js
- Stop mediacenter:
forever stop mediacenter.js
- Start mediacenter:
cd /home/pi/mediacenter/src && forever start -l mediacenter.log mediacenter.js
- Print logs
forever logs
Output:
info: Logs for running Forever processes
data: script logfile
data: [0] mediacenter.js /home/pi/.forever/mediacenter.log
forever logs 0
Output:
[...]
data: mediacenter.js:3601 - Sails <|
data: mediacenter.js:3601 - v0.10.0-rc8 |\
data: mediacenter.js:3601 - /|.\
data: mediacenter.js:3601 - / || \
data: mediacenter.js:3601 - ,' |' \
data: mediacenter.js:3601 - .-'.-==|/_--'
data: mediacenter.js:3601 - `--'-------'
data: mediacenter.js:3601 - __---___--___---___--___---___--___
data: mediacenter.js:3601 - ____---___--___---___--___---___--___-__
data: mediacenter.js:3601 - Server lifted in `/home/pi/mediacenter/src`
data: mediacenter.js:3601 - To see your app, visit http://localhost:1337
data: mediacenter.js:3601 - To shut down Sails, press <CTRL> + C at any time.
[...]
- Build your own Google TV Using RaspberryPi, NodeJS and Socket.io
- Designing For TV
- Setting up Node.js
- Boot your Raspberry Pi into a fullscreen browser kiosk
- Raspberry Pi als Kiosk mit resourcenschonendem Browser und VESA Mount
- restart networking
- Sails.js
- 52 movies APIs
- Similar Projects
- PiR.tv
- angular-rpitv
- ludovision