https://github.com/kagami/ninnin
:film_strip: mpv-based video encoding tool
https://github.com/kagami/ninnin
av1 avc hevc mpv-script
Last synced: 4 months ago
JSON representation
:film_strip: mpv-based video encoding tool
- Host: GitHub
- URL: https://github.com/kagami/ninnin
- Owner: Kagami
- License: mit
- Created: 2024-01-15T20:23:12.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-06T19:52:27.000Z (over 1 year ago)
- Last Synced: 2025-03-31T21:31:37.574Z (7 months ago)
- Topics: av1, avc, hevc, mpv-script
- Language: TypeScript
- Homepage:
- Size: 210 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ninnin
[mpv](https://mpv.io/)-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.
## Install
### Windows
TODO.
### Linux
Install mpv (check out [Linux packages](https://mpv.io/installation/#:~:text=Linux%20packages)).
To install nightly build of ninnin (for latest commit), run:
```bash
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.
### macOS
TODO.
## Formats
Which format to use for publishing on the web (2024)?
| | Chrome | Firefox | Safari | efficient |
| --------------------------------: | :----: | :-----: | :----: | :-------: |
| H.264 | + | + | + | − |
| [H.265](https://caniuse.com/hevc) | ± | − | + | + |
| [AV1](https://caniuse.com/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.
## Development
You need fresh nodejs installed.
- `npm run build` to build `ninnin.js`
- `npm start` to watch updates and rebuild on changes
- `npm test` to run tests
## License
See [LICENSE](LICENSE). Initial code ported from [mpv-webm](https://github.com/ekisu/mpv-webm) (MoonScript) to TypeScript.