videobeaux

Logo

The friendly multilateral video toolkit built for artists by artists.

View the Project on GitHub schwwaaa/videobeaux

subs_convert

Description

Converts subtitle files between formats (e.g., SRT, VTT, ASS) while preserving timing, text, and (where possible) style metadata.

Purpose

The subs_convert program standardizes subtitle workflows by:

It is especially helpful when preparing subtitles for caption-burning, translations, or multi-version deliverables.

How It Works

  1. Input Inspection
    Reads subtitle streams from the input media file (or compatible subtitle sources).
  2. Track Selection
    • list shows all available subtitle tracks with indices and metadata.
    • indexes selects specific tracks by index.
    • langs filters tracks by language codes (e.g., eng, spa).
    • all overrides filters and selects every subtitle track.
  3. Filtering & Cleaning
    • forced_only restricts output to forced subtitles only (e.g., foreign-language dialogue).
    • exclude_hi strips hearing-impaired (HI) descriptors like sound effects or music tags.
  4. Format Conversion
    Converts the selected tracks into the requested output format (SRT, VTT, ASS, etc.).
  5. Timing Adjustment
    Applies an optional time_shift so subtitles can be nudged earlier or later to stay in sync.
  6. Output Writing
    Writes one or more subtitle files to an output directory or a specific outputfile path.

Program Template

videobeaux -P subs_convert \
  -i input.mp4 \
  -o output.mp4 \
  --list VALUE \
  --indexes VALUE \
  --langs VALUE \
  --all VALUE \
  --forced_only VALUE \
  --exclude_hi VALUE \
  --format VALUE \
  --outdir VALUE \
  --outputfile VALUE \
  --time_shift VALUE

Arguments

Real World Example

videobeaux -P subs_convert \
  -i documentary.mp4 \
  -o documentary_fixed.mp4 \
  --langs eng \
  --exclude_hi \
  --format vtt \
  --time_shift -0.25 \
  --outdir subs_output

Technical Notes