https://github.com/jaames/flipnote-video
Command-line tool and Node.js library for converting Flipnote Studio and Flipnote Studio 3D animations to video
https://github.com/jaames/flipnote-video
ffmpeg-command flipnote flipnotestudio kwz nintendo-3ds nintendo-dsi nintendo-hacking ppm
Last synced: 2 months ago
JSON representation
Command-line tool and Node.js library for converting Flipnote Studio and Flipnote Studio 3D animations to video
- Host: GitHub
- URL: https://github.com/jaames/flipnote-video
- Owner: jaames
- License: mit
- Created: 2019-08-11T16:35:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T16:43:56.000Z (almost 3 years ago)
- Last Synced: 2025-03-27T15:52:36.593Z (3 months ago)
- Topics: ffmpeg-command, flipnote, flipnotestudio, kwz, nintendo-3ds, nintendo-dsi, nintendo-hacking, ppm
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
## flipnote-video
A Node.js library to convert Flipnotes to video
## Prerequisites
* [Node.js environment](https://nodejs.org)
* [FFmpeg](https://ffmpeg.org/) - at least version 3.4 or above. You may want to check the [node-fluent-ffmpeg readme](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#prerequisites) for more information.## Usage as a Command Line Tool
### Get started
Use npm to install flipnote-video globally:
```bash
npm i -g flipnote-video --save
```### Examples
#### Convert Flipnote to MP4
```bash
flipnote-video -i flipnote.ppm -o -c:v libx264 -c:a aac -pix_fmt yuv420p video.mp4
```#### Show Flipnote metadata
```bash
flipnote-video -i flipnote.ppm --meta
```## Usage as a Library
### Get started
Use npm to add flipnote-video into your project:
```bash
npm i flipnote-video --save
```### Code Examples
#### Convert Flipnote to MP4
```js
const fs = require('fs');
const { parseFlipnote, FlipnoteConverter } = require('flipnote-video');async function convert(inpath, outpath) {
// read input file
const file = fs.readFileSync(inpath);
// parse file as flipnote
const flipnote = await parseFlipnote(file.buffer);
// FlipnoteConverter extends node-fluent-ffmpeg's command object
// https://github.com/fluent-ffmpeg/node-fluent-ffmpeg
const converter = new FlipnoteConverter(flipnote);// Web-friendly MP4 codec settings
converter.outputOptions([
'-c:v libx264',
'-c:a aac',
'-pix_fmt yuv420p',
]);
converter.output(outpath);
converter.run();
}convert('./flipnote.ppm', './video.mp4');
```