Git Product home page Git Product logo

pwrsub's Introduction

PWRsub

Subtitle Extraction & Styling for large libraries


GPL 3.0


Getting Started

This software is designed to extract and style subtitles from your .mkv video library. To help achieve this, there are three distinct modes you can choose to run this program in.

Extract Mode: $ python pwrsub.py extract file_path

  • Example: python pwrsub.py "media/user/shows/Cool Show/subtitles"
  • This mode will extract all subtitles from .mkv files in file_path and put them into a folder named PWRsub_Exctact.
  • IMPORTANT: use quotes to surround your file path if that file path contains spaces

Style Mode: $ python pwrsub.py style master_file child_file

  • Example: python pwrsub.py media/user/shows/master/subs.ass "media/user/shows/Cool Show/subtitles"
  • This mode will take all of the styles applied to master_file and apply them to child_file
  • Only supports .ass file format as .srt and .pgs do not support styles
  • IMPORTANT: use quotes to surround your file path if that file path contains spaces

Extract & Style Mode: $ python pwrsub.py extract_style file_path "font:Fira Sans Compressed"

  • Example: python pwrsub.py extract_style "media/user/shows/Cool Show/subtitles" "font:Fira Sans Compressed" "bold:-1"
  • Takes a directory and a list of style changes from CLI and modifies the subtitles with the listed style changes
  • Only supports .ass file format as .srt and .pgs do not support styles
  • Only a small number of style changes are supported, more can be added. If the style change you want is not supported, open an issue.

Dependencies

MKVMerge is needed to do extract the subtitles from the files

Halo is used for the in progress indicator

Anitopy is used to parse file names in order to group the correct files together for muxing


Tips

Use Aegis Subs (Windows/Linux) to manually edit the styles of extracted subtitles to your liking then push those changes from a master file to the rest of the subtitles.

Look for subtitles that have the following:

  • are in .ass format
  • Actors correctly listed
  • Multiple styles for different parts of the show

Avoid subtitles that have the following:

  • Only one style for the entire subtitle
  • Have custom styling done outside of standard styling
    • Standard styling is a style format applied to lines of dialogue that belong to that style
    • Non-Standard styling is styling that is applied directly to lines of dialogue and not through a style format
  • Ideally, subtitles should NOT have dialogue lines belonging to no style

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.