Git Product home page Git Product logo

dvd.js's Introduction

DVD.js

Playing DVD in JavaScript for the sake of interoperability

Talk

For more details on this project, have a look at the video of the talk I gave at JS Conf 2014.

The slide deck is also available.

Approach

This branch, named converter, contains an encoder of DVD to web format. For the attempt to play DVD on-the-fly, look into the master branch.

I ported libdvdread and libdvdnav to JavaScript. Several passes are applied to the content of a DVD to make it playable on a browser using native features:

  1. IFO files are parsed to JSON
  2. Chapters are generated as WebVTT
  3. NAV packets are extracted to JSON
  4. The buttons size/position are saved to CSS
  5. The menu still frames are saved to PNG (to be done)
  6. VM commands are compiled into JavaScript
  7. The video is encoded to Webm

Install

Clone the repo locally and install the dependencies with:

$ npm install
$ bower install
$ grunt install

You'll need to install the latest version of ffmpeg.

Then, compile the TS files to JavaScript with:

$ grunt

If you see a message saying 'Done, without errors' then the compilation to JavaScript was successful.

Create the folder that will hold your DVD, e.g.:

$ cd /home/user/
$ mkdir dvd
$ pwd
/home/user/dvd

Then update the dvdPath property of the config file in config/app.json to match the path to the folder created above.

Copy an unprotected DVD into a subfolder of dvd/ (e.g. in /home/user/dvd/Sita Sings the Blues/)

To convert the DVD, do:

$ node bin/convert /home/user/dvd/Sita Sings the Blues/

Wait for a while (reencoding video takes a loooooong time).

Start the web server:

node bin/http-server

Finally, point your browser to:

http://localhost:3000/

... and enjoy your DVD from your browser!

Support

All browsers supporting the following features:

  • <video> tag
  • <track> tag and WebVTT.

FAQ

Do you need help?

Yes, please, use it, open issues and send pull requests.

Why doing that?

There are several reasons:

  • I am frustrated with the current VOD offer and I don't want to buy movies or TV series to watch on my mobile if I already own the DVD.
  • I noticed I'm listening to my CD more often now that I'm using Google Play Music and am looking for a similar solution for my DVD.

Why don't you just convert the video for the web?

There's more in DVD than the video. You can select audio track, subtitles, navigate through the menu, play interactive game or browse a gallery of still images.

Why not using Emscripten?

I wanted to understand the logic in the JavaScript.

Also I don't do C and wasn't even able to compile the programs coming with libdvdread and libdvdnav on my PC... ^^;

dvd.js's People

Contributors

gmarty avatar divergentdave avatar balr0g avatar

Watchers

James Cloos avatar

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.