2017 © Pedro Peláez
 

project airflix

An AirPlay friendly web interface to stream your movies and TV shows from a home server.

image

airflix/airflix

An AirPlay friendly web interface to stream your movies and TV shows from a home server.

  • Saturday, July 7, 2018
  • by wells
  • Repository
  • 19 Watchers
  • 357 Stars
  • 133 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 56 Forks
  • 0 Open issues
  • 10 Versions
  • 9 % Grown

The README.md

Airflix

Build Status Total Downloads Latest Stable Version License, (*1)

Airflix is a web application for browsing and playing movies and TV shows from a local home server. The overall goal of the project is to provide a beautiful HTTP interface to AirPlay or Chromecast media onto your TV screen from a phone or tablet., (*2)

Airflix Demo, (*3)

Installation

You can download Airflix either through GitHub or composer., (*4)

Via GitHub

$ git clone --depth=1 git@github.com:wells/airflix.git airflix.local

Via Composer Create-Project

You may also install Airflix by issuing the Composer create-project command in your terminal:, (*5)

$ composer create-project --prefer-dist airflix/airflix airflix.local

We recommend that you use the following servers to run Airflix., (*6)

When trying this application out in a development environment, please note that Laravel Valet currently does not play video files. We recommend you either use Laravel Homestead or a local install of nginx (i.e. from homebrew). Hopefully this will change soon, so we can ngrok our Airflix installs. You could always just setup a tinc VPN with some avahi for your home network., (*7)

Create a Database

We recommend you use a database with utf8mb4 encoding and utf8mb4_unicode_520_ci collation. Make sure you also update your .env file with your database credentials and other configuration options., (*8)

Apply for an API Token

Airflix requires an API token from themoviedb.org to gather information and images. You will need to create an account and apply there to acquire a key for access to this API., (*9)

Configuration

Once you have an API key ready to use, you can simply run php artisan airflix:install to run migrations, configure your folders, and enter API keys. This command will also perform an initial scan of your movies and TV shows folders for content, which will take time on the first run., (*10)

Documentation

Airflix has api documentation., (*11)

Folders

The folders that contain movies and TV shows follow certain naming conventions., (*12)

Each movie is contained inside a folder named with either the movie title (i.e. /Films/Serenity/Serenity.m4v) or the movie title with the release year in parenthesis (i.e. /Films/Avatar (2009)/Avatar (2009).m4v)., (*13)

TV Shows are contained inside a folder with a similar naming convention to a movie, except each episode file has a S##E##.m4v naming format (i.e. /TV Shows/Stargate Atlantis/S01E01.m4v)., (*14)

If you use a different file extension from m4v (i.e. mp4) for your video files, you can edit the AIRFLIX_EXTENSIONS_VIDEO in your .env file., (*15)

Jobs

We recommend you run redis-server on your home server so that Airflix can queue up jobs. This is required for the Settings page to function properly., (*16)

Please see the Laravel documentation to learn how to setup a queue daemon. We recommend limiting to one queue:work process since most of the jobs are synchronous in nature., (*17)

We have provided a sample /etc/supervisor/conf.d/airflix-worker.conf file below:, (*18)

[program:airflix-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /srv/www/airflix.local/current/artisan queue:work redis --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=www-data
numprocs=1
redirect_stderr=true
stdout_logfile=/srv/www/airflix.local/storage/logs/airflix-worker.log

Schedule

Airflix has a number of scheduled tasks to refresh your folder list on a weekly basis. Just add something like the following into your server's cron:, (*19)

* * * * * php /srv/www/airflix.local/current/artisan schedule:run >> /dev/null 2>&1

Commands

We have provided a number of Laravel Artisan commands including airflix:history, airflix:install, airflix:folders, airflix:genres, airflix:movies, airflix:shows, and airflix:keys. For more information about each command, you can run php artisan help <command> to find out what options are available for each command., (*20)

Testing

bash $ phpunit, (*21)

License

Airflix is open-sourced software licensed under the MIT license, (*22)

The Versions