• Stars
    star
    163
  • Rank 231,141 (Top 5 %)
  • Language
    TypeScript
  • License
    GNU General Publi...
  • Created almost 11 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Playing DVD in JavaScript for the sake of interoperability

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... ^^;

More Repositories

1

grunt-closure-compiler

A Grunt task for Closure Compiler
JavaScript
181
star
2

jsSMS

JavaScript Sega Master System & Game Gear dynamic recompiling emulator.
JavaScript
145
star
3

xgettext

Extracts translatable strings from source. Identical to xgettext but for template languages.
JavaScript
77
star
4

x-video

An enhanced video player for modern browsers with a consistent UI and extra features!
JavaScript
61
star
5

hough-transform-js

A simple script to perform Hough transform in JavaScript given a canvas.
JavaScript
56
star
6

web-workers-benchmark

Benchmark various aspects of Web workers.
JavaScript
44
star
7

SCD.js

Pixel based video scene change detection in JavaScript.
JavaScript
35
star
8

jsMSX

The first MSX emulator 100% written in Javascript (unofficial mirror)
JavaScript
12
star
9

image8bit

jQuery plugin to give images the aspect of good old 8-bit graphics.
JavaScript
11
star
10

all-saints-ar

An AR experiment using computer vision in the browser.
JavaScript
10
star
11

vsop87

🪐 A fast implementation of the VSOP87 theory in JavaScript.
JavaScript
8
star
12

wifi-columns

Play Columns with your friends locally, no Internet connection required!
JavaScript
8
star
13

Mozilla-Dev-Derby-2011-07

My submission to the Mozilla Dev Derby of July 2011
JavaScript
7
star
14

Editor.js

Web-based video editor in JavaScript. Requires Firefogg extension.
JavaScript
5
star
15

c2js

A collection of regexp to speed porting of C applications to JavaScript.
JavaScript
5
star
16

nesCompiler

Please welcome the first webifier of NES games!
TypeScript
4
star
17

photo-browse

Display photos of Hello Kitty, one thread at a time
JavaScript
4
star
18

syntactic-machine-translation

Hacking a quick and dirty syntactic machine translation for English and Japanese.
JavaScript
3
star
19

Mozilla-Dev-Derby-2011-08

My submission to the Mozilla Dev Derby of August 2011
JavaScript
3
star
20

wordlist-generator

Generate words list XML files suitable for IME dictionaries.
Python
3
star
21

scumm-nes

An app to explore and modify the game Maniac Mansion on NES 🎮.
JavaScript
2
star
22

blog

A blog by G.C. Marty
Astro
2
star
23

VR-diary

VR Diary (VRにっき)
2
star
24

fxos-physical-web

Walk up and use anything
JavaScript
2
star
25

vr-landscapes

Imaginary virtual landscapes
HTML
1
star
26

jsconf-2014-talk-play-dvd-in-js

Slides for my talk at JS Conf 2014 - Playing DVD in JavaScript for the sake of interoperability
1
star
27

2015-06-MLOC.js

Slides for crash course in compile-to-the-web
1
star
28

bluetooth-demo

Experiment with Bluetooth
JavaScript
1
star
29

media-experiments

1
star
30

fxos-homescreen-template

A home screen template for Firefox OS with the bare minimum structure
JavaScript
1
star
31

pluto99

♇ A fast implementation of the so-called pluto99 theory in JavaScript.
JavaScript
1
star
32

latin-editor

An editor to ease the reading and understanding of texts written in classical Latin.
Python
1
star
33

2018-05-Unusual-Career-Paths

Slides for a talk about unusual career paths
JavaScript
1
star
34

SMSStaRec

[DEPRECATED] An attempt to compile statically SMS/GG ROMs to pure JavaScript.
JavaScript
1
star