GitXplorerGitXplorer
J

mediacenter

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
1ad8f25d1724c91e82650ab75186f88d922f935e

Update README.md

JJumpLink committed 11 years ago
Unverified
ce60eb152d99e8b4616e4306d838b7ae7454580a

Update README.md

JJumpLink committed 11 years ago
Unverified
e016fb77b1f82f7b77321af0bab070c00e6348e2

Merge branch 'master' of github.com:JumpLink/mediacenter

JJumpLink committed 11 years ago
Unverified
f0a56808be5691b0310c8c15242e2a914b661ce7

added screenshots

JJumpLink committed 11 years ago
Unverified
c9a84d41089c147f00cca50cc7b4bb05f305ccae

Update README.md

JJumpLink committed 11 years ago
Unverified
3c270d48721745a1bd004d6cf92e4d591a85f70d

Update README.md

JJumpLink committed 11 years ago

README

The README file for this repository.

Benthe's MediaCenter

A MediaCenter controlled from your smartphone tested on Ubuntu / Raspbian (Raspberry Pi) and developed as a birthday gift for Benthe ;)

Screenshot

Technical Background

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).

Install

Dependencies

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

Ffmpeg for media file parsing and ffplay for play audio/video files

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

Build the mediacenter itself

  • 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

Configure

cp config/local.js.example config/local.js
[your favourite editor] config/local.js

Try to start

  • Be sure to be in mediacenter/src and run: node mediacenter.js
  • Scan the QR-Code or type the Address in your Browser

Setup Raspberry Pi with Raspbian (optional)

  • 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'

Control

  • 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.
[...]

Links

Bugs