Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/subPublic

A toolkit for subtitling projects.

License

NotificationsYou must be signed in to change notification settings

Daiz/sub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sub is a scripting toolkit made for automating various subbing tasks.It can help with premux creation, release muxing, CRC32 hashing, torrent creation, and can also help make life easy for projects with multiple subtitle tracks.

How to use it

  • Before you start, you should make sure you havexdelta3 andmkvtoolnix available in your PATH. (Look up environment variables if you're unsure what that is.)
  • First, installNode.js.
  • Next, you need to pop open command line and installLiveScript globally by runningnpm install -g livescript
  • Now, you should have some sort of work folder that hosts all your project folders. Let's say it's called Work, so you would have a folder setup like so:
  /Work/  /Work/Show/  /Work/ShowTwo/  /Work/AnotherShow/
  • What you need to do is copy thepackage.json file from this repository to Work (so you have it at/Work/package.json), then navigate to this folder via command line and runnpm install. This will install the modules required by sub into/Work/node_modules/.
  • Next up, copysub.ls to a project folder, eg./Work/Show/sub.ls
  • Now, open the file, go through it and edit in your project details.
  • After your subfile is set up, you use it via command line by running commands like the following:
$ lsc sub swaps 01$ lsc sub mux 02-04$ lsc sub premux 03-05 07$ lsc sub v2 03
  • To usesub with another project, simply copysub.ls to its folder and edit accordingly.

Making multiple subtitle tracks

sub enables you to have a single master ASS script that can be used to generate multiple scripts for the actual episode with the use of a swapping syntax. Usage of this syntax is fairly simple. Let's say you have the following lines:

What is it, Haruka{**-chan}?Nothing, {*}Dad{*Otou-san}!

For the swapped version, it will turn these lines into:

What is it, Haruka{*}-chan{*}?Nothing, {*}Otou-san{*Dad}!

By default, the swapping will be only performed on lines with styles thatstart with either "Default" or "Alternative". You can also make it work onadditional styles by passing a regular expression to thesubswap function. Additional instructions can be found in the file itself.

There is also a way to swap whether a line is a comment or not. Simply set the line's effect to***. This is mainly useful if you need to have multiple versions of a typeset sign - you can have one uncommented version as the default, another commented one with the necessary changes, then set the Effect for both to*** and they will be enabled and disabled accordingly for the appropriate subtitle tracks. Pseudo-ASS example:

    Dialogue: {\an9}Oh no!*** Dialogue: {\an7}Haruka!*** Comment:  {\an7}Haruka-chan!    Dialogue: {\an1}Yet Another Sign

Filename Scheme

Usingsub assumes that you are using a specific kind of filenaming schemefor your project files. It's probably best to demonstrate by example. Any files marked with* are used by the script, so they're the important bits as far as usage is concerned.

Note: You will never need to touch the generated language-tagged script files yourself. The only thing that matters for work is the master script.

## Common Files ##Show.00.premux.720p.mkv *  - premux filesShow.00.premux.720p.ass *  - master scriptsShow.00.fonts.zip *        - all episode fonts in a zipShow.00.chapters.xml *     - chapter filesShow.00.release.lang.ass * - subswap-generated scriptsShow.00.keyframes.txt      - keyframesShow.00.wraw.720p.mkv      - wraws## Encoder Files ##Show.00.CR.1080p.mkv *      - (softsubbed) simulcast ripsShow.00/0.part.mkv *        - encodes done in multiple partsShow.00.mux.video.mkv *     - final video for the episodeShow.00.mux.audio.mka *     - final audio for the episodeShow.00.avs                 - the avs fileShow.00.chapters.qpfile     - self-explanatoryShow.00.work.keyframes.avs  - keyframe generation avsShow.00.work.video-720p.avs - wraw video encoding avs

TheShow.00 part above is what's calledprefix in the code definitions ofsub's commands. If you want to change that, you'll need to edit all the prefix definitions at the start of the command functions accordingly. For example, if you had all the episodes in their own subfolders, you'd change the prefix to"#num/#name.#num" and then you would run the script from theparent directory (so that you only need one copy of it). To demonstrate:

/Work/Show//Work/Show/sub.ls/Work/Show/01/Show.01.premux.720p.mkv/Work/Show/01/Show.01.premux.720p.ass... etc ...Run commands from /Work/Show/ where sub.ls is located

About

A toolkit for subtitling projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp