• Stars
    star
    325
  • Rank 129,350 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 5 years ago

Reviews

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

Repository Details

A video player for studying foreign languages (esp. Japanese)

Voracious

Download Voracious (alpha)

Voracious is a video player app for Mac/Windows/Linux with special features for studying foreign languages (esp. Japanese).

screenshot

Voracious lets you:

  • Scan and browse your media collection ala Kodi or Plex
  • Simultaneously display multiple subtitle languages/tracks (all common formats supported)
  • Quickly replay the current subtitle and navigate forward and back by subtitle using the keyboard
  • Train your listen/reading/comprehension with special viewing modes that automatically pause and hide/reveal subtitles
  • Automatically generate furigana annotations (Japanese only)
  • Hover over words to see dictionary definitions (Japanese only)
  • Import and use EPWING dictionaries (limited to certain popular Japanese EPWINGs)
  • Export subtitles as sentence cards to Anki (with audio and/or image, ala subs2srs), instantly via AnkiConnect
  • (coming soon) Search for words/phrases over your entire library of subtitles

Using Voracious (Quick Start)

Before using Voracious, you need to have a media collection that's organized and named the same way you would for Kodi or Plex (each show/movie in its own directory, subtitle filename matching video filenames, etc.). Note that Voracious cannot currently play some popular video/audio codecs, including H.265 and AC3. Also, keep in mind that Voracious won't be useful unless you have subtitles in the language you're trying to learn.

If your media collection is ready to go, open Voracious and hit the Add Collection link. Select the folder where your collection lives, and give it name, and add it. On the Library page, you can browse your collection and play videos (videos without any available subtitles will appear grey). In the player, check the help overlay for keyboard controls, and try different subtitle modes.

Development

Overview and repo structure

Voracious is mostly built as a single-page web app with React (using create-react-app), and then packaged as a cross-platform desktop app using Electron. As with a normal create-react-app-based app, the bulk of the code is in src/ with some static resources in public/. The output of webpack (after yarn react-build) will go into build/. Electron-builder is used to package the resulting build into an Electron-based app, with its output going to dist/.

The app/ dir contains a small amount of code and config related to Electron. The main Electron entry point is app/electron-main.js, and app/package.json is the package.json that's distributed in the final app.

Most third-party dependencies are pure JS (react, immutable, etc.) and are declared in the root package.json. Those are bundled with the the Voracious code (by webpack) into a single JS file. That means that the root node_modules/ does not needed to be distributed with the final Electron app. This sort of bundling isn't generally necessary to do for Electron apps, but it's convenient for various reasons.

Dependencies that use native code (e.g. sqlite) need to be compiled against the Electron V8 runtime, and are declared in app/package.json. The corresponding app/node_modules/ is packaged into the final distributed Electron app.

Electron-builder is configured via electron-builder.json. The current config has it basically combine the contents of build/ and app/ to form the distributed archive.

Installing for development

To install for development you'll first need NodeJS, Yarn, and some extra build tools for node-gyp (see here). Then:

$ yarn # install pure-JS and development dependencies
$ cd app
$ yarn # install dependencies that include native code in app/ subdir
$ cd ..
$ yarn rebuild-native # rebuild native deps in app/node_modules against correct Electron V8 runtime

Running in development mode

Start the React development server with:

$ yarn react-start

Once the React server has started up, in a separate terminal run:

$ yarn electron-start

The Electron app will open, with the main window serving from the development server (localhost:3000). Edits to the source will cause it to automatically reload.

Building for release

First build the JS:

$ yarn react-build

Then build the distributable desktop app:

$ yarn dist

The output archive/executable can then be found in the dist dir.

If you just want to run the built app and don't need it packed into an archive/executable for distribution, then run:

$ yarn dist-nopack

Building a Linux release in a VM

Download and install VirtualBox and Vagrant. Then run:

vagrant up

This will download an Ubuntu image, spin it up in a VM, and do a clean clone and build in that VM. When it's done (it takes quite a while), it will copy the resulting .AppImage file to the dist dir of your working copy. After that, you can run:

vagrant destroy

and confirm to tear down and delete the VM. If you want to inspect the build environment before you destroy the VM, you can run:

vagrant ssh
cd voracious

and check it out.

Inspecting the distributed archive

It's often useful to check exactly what files have been included in the archive distributed with the Electron app. An easy way to do that is to install the asar tool (yarn global add asar) and then (on mac) run:

$ asar list dist/mac/Voracious.app/Contents/Resources/app.asar

More Repositories

1

subadub

Chrome+Firefox extension for studying foreign languages using Netflix subtitles
Shell
126
star
2

plinth

Modular synthesizer style audio components for the web
JavaScript
89
star
3

isovoxel

Isometric voxel generative art
JavaScript
78
star
4

fastidious-envelope-generator

Envelope generator (aka ADSR) for the Web Audio API that aims to be free of artifacts and handle edge cases well
JavaScript
58
star
5

massif

TypeScript
57
star
6

tomoji

A command-line tool to extract accurate text subtitles (SRT format) from DVD and Blu-ray disc formats
Python
16
star
7

anki-cropro

Anki Add-on: Cross-Profile Search and Import. Find notes in another profile and import them into current profile
Python
12
star
8

riv

A Javascript library for building reactive programs using declarative, composable stream-functions
TypeScript
5
star
9

rindel

A functional reactive programming language that compiles to Javascript
JavaScript
4
star
10

iroha-sesame

Generate random Japanese-sounding passwords with specified entropy
Python
1
star
11

spectraloop

Transform a short audio sample into a longer smoothly looping sample
JavaScript
1
star
12

temporal-splendor

Explorations in dataflow/FRP programming
JavaScript
1
star
13

rindel3

Experiment with synchronous dataflow and visual patching
JavaScript
1
star
14

snair

Tool to artfully transform images to laser cutting instructions
JavaScript
1
star
15

yukawa

Python
1
star
16

margolus-optimization

Some experiments with optimizing the implementation of 2d block cellular automata based on Margolus neighborhoods
C
1
star
17

sonibloc-prototype

Attempt at spec for browser-based audio components using the Web Audio API.
JavaScript
1
star