HMS

Home Media Server for Roku Players
git clone https://www.brianlane.com/git/HMS
Log | Files | Refs | README | LICENSE

README (4580B)


      1 Home Media Server
      2 by Brian C. Lane <bcl@brianlane.com>
      3 
      4 
      5 1. Server Installation
      6   == REQUIREMENTS ==
      7 
      8   A web server that can handle HTTP range requests. Apache and lighttpd are two
      9   examples. The server needs to be setup to serve up plain html directory
     10   listings. lighttpd works out of the box, Apache needs to have the fancy
     11   indexing disabled.
     12 
     13   A Roku player with developer mode.
     14 
     15   == Port 80 ==
     16 
     17   Currently most of the Roku player's APIs work with alternate ports. But not all
     18   of them. So it is best if you can run the server on port 80. Under Linux the
     19   easiest way to do this is to just connect port 80 to port 8888 of the server by
     20   adding this to your /etc/sysconfig/iptables (or similar) file:
     21 
     22   *nat
     23   -A PREROUTING -p tcp -d 192.168.101.4 --dport 80 -j REDIRECT --to-ports 8888
     24   COMMIT
     25 
     26   Replace the IP with the IP of the server it is running on. It will direct all 
     27   port 80 traffic to port 8888.
     28 
     29   Or if you can, just run your webserver on port 80.
     30 
     31   == Configuration ==
     32 
     33   Setup the webserver so that the top level directories are your categories.
     34   These names will be displayed as a scrolling list on the left side of the screen.
     35   The contents of the directories will be displayed as cover images that can be
     36   selected and played from the poster grid on the right.
     37 
     38   They type of files to display for a directory is controlled by an empty file inside
     39   the directory named:
     40 
     41   movies    A list of movies to play (mp4, wmv, mov, m4v)
     42   episodes  Episode selector for the files in the directory (mp4, wmv, mov, m4v)
     43   songs     Play the songs using the song player (mp3)
     44   photos    Show the images as a slideshow (jpg)
     45 
     46   Support for playback of songs and photos has not been added yet.
     47 
     48   Videos should be valid files supported by the Roku (mp4, wmv, mov, m4v). HandBrake
     49   as several Roku presets that work fine.
     50 
     51   == Cover Images ==
     52 
     53   If the directory contains a png or jpg file named for the video with a SD, HD,
     54   or FHD suffix it will use that as the poster. Eg. Goonies-SD.jpg
     55   If there is no is no specific poster file for the video it will use 'default'
     56   instead. eg. default-SD.jpg
     57 
     58   Sample directory listing:
     59     Firefly/
     60     Home_Movies/
     61     Movies/
     62 
     63     ./Firefly:
     64     default-SD.png
     65     episodes
     66     Firefly-S01E01-Serenity.mp4
     67     Firefly-S01E01-Serenity-SD.bif
     68     Firefly-S01E02-TrainJob.mp4
     69     Firefly-S01E02-TrainJob-SD.bif
     70 
     71     ./Movies:
     72     101Dalmations.mp4
     73     101Dalmations-SD.bif
     74     101Dalmations-SD.jpg
     75     movies
     76 
     77   == Keystore ==
     78 
     79   An optional keystore is supported at URL + /keystore/<key>
     80 
     81   If present it will be used to save the last playback position of each video.
     82 
     83   The keystore is detected by looking for URL + /keystore/version
     84   and values are stored by POST with value=<value>
     85 
     86   You can use my clortho project as the keystore by proxying requests to the
     87   /keystore/ prefix to it with lighttpd like this:
     88 
     89     $HTTP["host"] =~ "^movies\.lan(:[0-9]*)?$" {
     90         server.document-root = "/Movies/"
     91         dir-listing.activate = "enable"
     92 
     93         $HTTP["url"] =~ "(^/keystore/)" {
     94             proxy.debug = 1
     95             proxy.balance = "fair"
     96             proxy.server = ( "" =>
     97                                (( "host" => "127.0.0.1", "port" => 9002))
     98                              )
     99         }
    100     }
    101 
    102   See https://www.brianlane.com/clortho-a-simple-keyvalue-server.html for a
    103   blog post about the keyserver.
    104 
    105 
    106 2. Client Installation
    107 
    108   Make sure your Roku is in developer mode, change to the HMS directory and
    109   and set the target IP for the install (you can find the IP on the Roku's
    110   network information screen).
    111 
    112   https://developer.roku.com/docs/developer-program/getting-started/developer-setup.md
    113 
    114   (which is - HOME, HOME, HOME, UP, UP, RIGHT, LEFT, RIGHT, LEFT, RIGHT) and then set
    115   a password.
    116 
    117   export ROKU_DEV_TARGET=192.168.101.143
    118 
    119   You may also need to set the user and password, if one is set for your device:
    120   export ROKU_DEV_USER=rokudev
    121   export DEVPASSWORD=password
    122 
    123   And then install the application with:
    124   make install
    125 
    126   You can also install the .zip file generated by 'make install' using the web interface.
    127   Visit the device with a web browser, log in, and upload the zip.
    128 
    129 3. Debugging
    130 
    131 The Roku has a couple of open ports on it for debugging:
    132 
    133 * 8085 is the console output from the running app
    134 * 8080 is the debug server
    135 
    136 Port 8080 can be used to examine the loaded plugins, memory usage, or even send
    137 simulated remote keypresses.
    138 
    139 4. Support/Contribute
    140 
    141   https://github.com/bcl/HMS/
    142   homemedia@googlegroups.com
    143   https://groups.google.com/group/homemedia
    144 
    145