Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Subtitles #11

Open
1 task
pietrop opened this issue Apr 6, 2019 · 1 comment
Open
1 task

Adjust Subtitles #11

pietrop opened this issue Apr 6, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed Ted Talks Ted Talks subtitles, related requests/features

Comments

@pietrop
Copy link
Owner

pietrop commented Apr 6, 2019

Is your feature request related to a problem? Please describe.

A way to automatically adjust/fix subtitles to be more in line with TED guidelines.

Describe the solution you'd like

A checkbox, on by default, that runs a separate function to provide a second pass to add those fixes programmatically.

Describe alternatives you've considered

NA

Additional context

  • There is a subfixer9 executable that provides those changes. which can be used as ./subfixer9 -file TestFile.srt 20.999 -speed_epsilon 0.5 however it be good to look a the code, and see if this can be brought into the app as a node/js module, to keep consistency with the rest of the project.

Request by Michele Gianella

@pietrop pietrop added enhancement New feature or request help wanted Extra attention is needed Ted Talks Ted Talks subtitles, related requests/features labels Apr 6, 2019
@pietrop
Copy link
Owner Author

pietrop commented Apr 6, 2019

Code is at https://github.com/chetan-prime/subfixer and it's written in Golang

$ ./subfixer9

./subfixer9: Available parameters are below

  -chars_per_line int
        Perfection Check - No. of characters/line (default 42)
  -expand_closer_than float
        Expand two subtitles closer than n seconds (default 0.5)
  -file string
        Subtitle Input File (Required)
  -forbidden_chars string
        Perfection Check - Forbidden Characters (default "{./;/!/?/,:}")
  -join_shorter_than int
        Join two lines shorter in length than (default 42)
  -limit_to string
        Limit to range or list of subtitle id's (1-2,4-10,14-16,18)
  -line_balance float
        Perfection Check - Length Balance (%) (default 50)
  -max_lines int
        Perfection Check - Max. lines (default 2)
  -min_length float
        Minimum Length for each subtitle (default 1)
  -mode string
        Operation Mode (normal/perfection) (default "normal")
  -newlines_as_chars
        Perfection Check - Treat newlines as characters
  -prefer_compact
        Perfection Check - Prefer Compact Subtitles (default true)
  -reading_speed float
        Perfection Check - Reading Speed (ch/sec) (default 21)
  -shrink_longer_than float
        Shrink a single line subtitle longer than n seconds (default 7)
  -spaces_as_chars
        Perfection Check - Treat Spaces as characters (default true)
  -speed float
        Desired Characters Per Second (default 21)
  -speed_epsilon float
        Epsilon in % of Speed value (default 1)
  -split_longer_than float
        Proportionately split a two line subtitle longer than n seconds (default 7)
  -trim_spaces int
        Trim space to left & right of each subtitle (default 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Ted Talks Ted Talks subtitles, related requests/features
Projects
None yet
Development

No branches or pull requests

1 participant