mpv-based video encoding tool. Allows you to quickly cut clips from video you're currently watching, including YouTube ones, without having to download it fully or open in another program. Currently supported encoders:
- x264/aac
- x265/aac
- svtav1/opus (default)
The main focus is simplicity and speed/size/quality tuned towards speed (30fps+ for 1080p), thus resorting to modern codecs which allow to keep size/quality ratio still bearable for the web.
TODO.
Install mpv (check out Linux packages).
To install nightly build of ninnin (for latest commit), run:
mkdir -p ~/.config/mpv/scripts
wget https://github.com/Kagami/ninnin/releases/download/nightly/ninnin.js \
-O ~/.config/mpv/scripts/ninnin.js
To update the script, simply re-run the command above.
TODO.
Which format to use for publishing on the web (2024)?
Chrome | Firefox | Safari | efficient | |
---|---|---|---|---|
H.264 | + | + | + | − |
H.265 | ± | − | + | + |
AV1 | + | + | ± | + |
H.265 if you care about Apple users more, AV1 if you care about Firefox users more. However M3+/iPhone 15+ support AV1 and it's a bit more efficient than H.265 so it's more future-proof.
You need fresh nodejs installed.
npm run build
to buildninnin.js
npm start
to watch updates and rebuild on changesnpm test
to run tests
See LICENSE. Initial code ported from mpv-webm (MoonScript) to TypeScript.