Giter VIP home page Giter VIP logo

normalasser's Introduction

normalasser

Normalasser extracts ASS subtitles from MKV video files and normalizes their appearance to enhance readability and ensure consistency. Unlike the simpler SRT format, ASS subtitles include embedded styles that dictate font, color, and size, leaving no room for viewer preferences. Normalasser selectively overrides these styles to ensure that subtitles maintain a consistent size across different series and sources, while preserving other stylistic elements such as font choice, color, and positioning. This approach not only improves viewer experience but also upholds the original artistic intent of the subtitles.

Preview

Before After

Prerequisites

Install

npm install -g normalasser

Usage

To use Normalasser from the command line, simply run the tool followed by the absolute paths to the MKV files or directories containing MKV files. Normalasser will recursively scan directories to find all MKV files to extract and normalize ASS subtitles according to your specifications.

normalasser /path/to/video.mkv

You can also pass multiple paths:

normalasser /path/to/directory /path/to/video.mkv

Customize Normalasser's behavior with the following options:

  • --check-ass: Normalize already extracted ASS subtitles.
  • --force-mkv: Extract and normalize even if external ASS subtitles already exist.
  • --size: Set the size of the subtitles (tiny, small, normal, large or huge).

Example with multiple options:

normalasser --check-ass --size large /path/to/directory

Webserver

If no absolute paths are specified when launching Normalasser, it operates as a webserver on port 7883. This mode enables other applications to send POST requests with JSON payloads containing absolute paths to the MKV files or directories containing MKV files.

normalasser

To send a request, use any HTTP client capable of sending POST requests with JSON:

curl -X POST -d '{"path": "/path/to/video.mkv"}' http://127.0.0.1:7883

Normalasser scans the entire JSON object, extracting absolute paths from any part of its structure, regardless of how it is formatted. This flexibility ensures that Normalasser is compatible with a wide range of input sources and can be integrated with automation tools like Sonarr and Radarr that may send structured data in different formats.

Contributions

We welcome contributions from the community! If you have suggestions for improvements, bug fixes, or new features, please feel free to submit a pull request or open an issue on our GitHub page. Your feedback and contributions make Normalasser better for everyone.

normalasser's People

Contributors

deathspike avatar

Stargazers

 avatar Jan Pingel avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.