npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

toyunda2ass

v1.0.12

Published

Convert Epitanime Toyunda karaoke files to ASS files

Downloads

7

Readme

Toyunda2ASS

This is a converter for Epitanime Toyunda karaoke format to ASS, written in nodeJS.

History

Epitanime is a french school club running an anime convention at the Epita computer school. Their karaoke software suite, Toyunda, uses a proprietary file format, but this tool can convert it to standardized ASS karaoke format.

Toyunda was made during a time when soft-subbing (rendering ASS subtitles on the fly) was not possible with video players (in the late 90s-early 2000s).

The format should be deprecated given it relies on an old, unmaintained version of mplayer, but people (including Epitanime) still continue to use it despite there being better alternatives.

¯\_(ツ)_/¯

Toyunda2ASS was a fun side-project which took me about a day.

Installation

Run npm install -g toyunda2ass to install as a global module (and get the CLI version)

Run npm install toyunda2ass to install as a module for your project.

Usage

Module

As a module here are the three methods you can call :

splitTime(time: string)

Splits a TimingV3 generated file into frm+lyr information. It will only work if the frm+lyr are embedded into the time (.txt) file.

Returns an object with lyrics and frames properties containing an array of strings (1 per line)

Note that this script won't work with V1/V2 Toyunda files

findFPS(videofile: string)

Returns the FPS (frames per second) of videofile. FPS is needed to calculate precisely the karaoke timing. You need ffmpeg in your PATH for this to work.

convertToASS({lyrics: string[], frames: string[]}, fps: number)

Returns a correctly formatted ASS file as a string. You need to provide the frm+lyr data as the first parameter and FPS as the second one.

CLI

The CLI version is used as follows :

toyunda2ass myfile.frm myfile.lyr 23.98

It produces an ASS file on stdout.

You can also provide a txt file instead of frm+lyr. In this case splitTime() is called. Of course the FPS number becomes the second parameter.

FPS is optional. If not provided it'll strip the .frm on the first file and try to find a matching .avi file.

You need to have ffmpeg installed in your PATH so Toyunda2ASS can read fps info from a video file

Build

If you wish to build from source, use npm run-script build to get standard JS in the dist folder.

Test

You can test code with the frm and lyr files included in the test directory :

node dist/index.js test/HaruhiOP.frm test/HaruhiOP.lyr 23.98

License

MIT