Giter Club home page Giter Club logo

mkvcast's Introduction

mkvcast

A barebones on the fly video transcoder for Chromecasts.

Installation

Mac OS X

The easiest way to install this is via Homebrew

brew install git
brew install ffmpeg
brew install node
git clone https://github.com/maherbeg/mkvcast.git
cd mkvcast
npm install
npm install -g bower
bower install
./bin/mkvcast <config file>
open 'http://localhost:1338/list'

FreeBsd

You should install everything from a FreeBSD Jail

pkg install ffmpeg
pkg install node
pkg install npm
pkg install git
git clone https://github.com/maherbeg/mkvcast.git
cd mkvcast
npm install
npm install -g bower
bower install
./bin/mkvcast <config file>
open 'http://localhost:1338/list'

Windows

Currently broken, path handling needs to be fixed for this platform. See #18

Download and run an installer from http://nodejs.org/download/ (you will also need git installed from http://git-scm.com/download/win) Then from cmd or powershell:

git clone https://github.com/maherbeg/mkvcast.git
cd mkvcast
npm install
npm install -g bower
bower install
node lib\mkvcast.js C:\full\path\to\config.json

Note: For the moment on Windows, you'll need to escape paths in config.json - e.g. C:\Movies becomes C:\Movies

Configuration

config.json

The following keys need to be saved in a config.json that is passed into the application.

{
    "mediaDirectories" : [
        "/Users/someuser/Downloads/",
        "/Volumes/harddrive/Media/"
    ]
}

channels

A channel is a set of directories to randomly view videos from. Think of it as a shuffled playlist based on your content. You can create channels for genres, directors etc.

Just simply add another configuration option to your config.json file called channels. The key is the channel name with an entry of directories specifying the directories you would like to view.

Note It is not traversing nested directories yet.

{
    "channels" : {
        "new" : {
            "directories" : ["/Users/someuser/Downloads", "/Volumes/harddrive/Media/NotWatched"]
        }
    }
}

Todo

  • A responsive sender UI that will show all the files to serve as well as a list of Chromecasts to serve.
  • Interface for pausing/playing/setting the volume of the Chromecast
  • Better documentation
  • Testing
  • Playlist functionality
  • Channel functionality. Assign a folder list to a channel and serve up random videos from these folders.

Things it can't do

  • Fast forward/reverse through a video

Contributing

Pull requests are graciously accepted. Feel free to open up issues as well.

This code is MIT Licensed.

mkvcast's People

Contributors

atanarro avatar berstend avatar maherbeg avatar voltagex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mkvcast's Issues

Better session request management

The app will now request a new session on every page load. This helps to ensure a session will be created.

The popup appears every time which is annoying. If we can successfully rejoin a session we should not request a new one.

When we load new media, if a session hasn't been joined, we should request one and then submit a load request.

Fix file/path loading on Windows

When browsing to a file on the server, e.g. http://10.1.1.76:1338/stream/Y:/_watch/some-file.mkv, I get the following error:

`Error: ENOENT, no such file or directory 'C:\Y:_watch\some-file.mkv'
at Object.fs.statSync (fs.js:689:18)
at module.exports (C:\Users\Adam\Documents\mkvcast\lib\controllers\stream-file.js:6:22)
at Layer.handle [as handle_request] (C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\layer.js:76:5)
at next (C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\route.js:100:13)
at Route.dispatch (C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\route.js:81:3)
at Layer.handle [as handle_request] (C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\layer.js:76:5)
at C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\index.js:227:24
at Function.proto.process_params (C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\index.js:305:12)
at C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\index.js:221:12
at Function.match_layer (C:\Users\Adam\Documents\mkvcast\node_modules\express\lib\router\index.js:288:3)``

Note that the file is in Y:\ but the application is running out of C: and for some reason trying to look up the file there.

Channel functionality

Allow the creation of playlist channels that allow users to specify a set of folders and randomly select and queue up videos from the folder.

  • Create REST endpoint that takes in a channel name and returns a URL to play next.
  • UI to view
  • UI to edit and save

Refactor into separate files

Extract out:

  • route controllers
  • config mapping/parsing
  • websocket handling code

Move:

  • views in static directory to views directory

Use Grunt

  • JSHint Integration
  • Forever/psmon target
  • Target to pull ffmpeg
  • Target to build platform executables - #5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.