You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.9KB

7 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # MMPC2
  2. The second version of Mort's Media PC.
  3. ## Goal
  4. MMPC2 is meant to be running constantly on a HTPC, letting you stream media to
  5. a TV and control the playback remotely, all through a web interface. It allows
  6. you to stream three kinds of movies:
  7. * URLs - YouTube, Vimeo, Dailymotion, plain HTTP streams, anything supported by
  8. mpv and youtube-dl.
  9. * Magnet Links - Stream any torrent.
  10. * Files - Upload files and have them play.
  11. For magnet links and files, subtitles will automatically be downloaded if you
  12. want and subtitles exist for it in OpenSubtitles.
  13. ## Installation
  14. Install git, a recent version of node, and npm, clone the repository, run `npm
  15. install`, copy `conf.json.example` to `conf.json`, and run `node server.js`.
  16. git clone https://github.com/mortie/mmpc2.git
  17. cd mmpc2
  18. npm install
  19. cp conf.json.example
  20. node server.js
  21. ### Getting a recent version of node.js
  22. Many distros ship old versions of node, which won't work with MMPC2. To fix
  23. this, install node.js and npm (`sudo apt-get install nodejs-legacy npm` on
  24. Debian and Ubuntu), then install `n` and install a new version of node with
  25. that.
  26. sudo apt-get install nodejs-legacy npm
  27. sudo npm install -g n
  28. sudo n stable
  29. With rolling release distros, the version of node in the package manager will
  30. generally be new enough - e.g `sudo pacman -S npm node` in arch is enough.
  31. ### Getting a recent version of mpv
  32. MMPC2 requires a relatively new version of mpv, newer than what's currently in
  33. Debian and Ubuntu. For Ubuntu, you could just add this ppa to your system:
  34. https://launchpad.net/~mc3man/+archive/Ubuntu/mpv-tests
  35. sudo add-apt-repository ppa:mc3man/mpv-tests
  36. sudo apt-get update
  37. sudo apt-get install mpv
  38. For Debian, you will probably have to either use the testing repositories to
  39. install mpv, get some binary from somewhere, or compile it from source. I
  40. compiled from source when installing it on the Debian stable (jessie), and the
  41. instructions are a bit too long to include here, but you can get the source
  42. from here: https://github.com/mpv-player/mpv/releases/latest and get the source
  43. there. Make sure to compile with luajit support for youtube-dl, and libpulse
  44. for pulseaudio (if you use that).
  45. ### Getting a recent version of youtbe-dl
  46. Debian may ship a version of youtube-dl that's so old it doesn't really work
  47. anymore - I had that problem with my Debian box. To fix that, uninstall
  48. youtube-dl if you installed with apt-get (`apt-get remove youtube-dl`), and
  49. install it through pip (installing pip if necessary)
  50. sudo apt-get install python-pip
  51. sudo pip install youtube-dl
  52. ## Configuration
  53. `conf.json` contains a couple of configuration options (assuming you copied
  54. `conf.json.example` to `conf.json`). These are:
  55. {
  56. "tmpdir": String. The directory to store temporary files in. Default:
  57. `"tmp"`
  58. "subtitles": String (or `false`). The language code for the subtitles,
  59. or `false` for no subtitles. Default: `"en"` (english).
  60. }