Skip to content

Command-line tool and Node.js library for converting Flipnote Studio and Flipnote Studio 3D animations to video

License

Notifications You must be signed in to change notification settings

jaames/flipnote-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flipnote-video

A Node.js library to convert Flipnotes to video

Prerequisites

Usage as a Command Line Tool

Get started

Use npm to install flipnote-video globally:

npm i -g flipnote-video --save

Examples

Convert Flipnote to MP4

flipnote-video -i flipnote.ppm -o -c:v libx264 -c:a aac -pix_fmt yuv420p video.mp4

Show Flipnote metadata

flipnote-video -i flipnote.ppm --meta

Usage as a Library

Get started

Use npm to add flipnote-video into your project:

npm i flipnote-video --save

Code Examples

Convert Flipnote to MP4

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');

About

Command-line tool and Node.js library for converting Flipnote Studio and Flipnote Studio 3D animations to video

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published