mirror of
https://github.com/vondas-network/videobeaux.git
synced 2026-01-27 01:01:13 +01:00
175 lines
10 KiB
HTML
175 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-US">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
|
<title>subs_convert</title>
|
|
<meta name="generator" content="Jekyll v3.10.0" />
|
|
<meta property="og:title" content="subs_convert" />
|
|
<meta property="og:locale" content="en_US" />
|
|
<meta name="description" content="The friendly multilateral video toolkit built for artists by artists." />
|
|
<meta property="og:description" content="The friendly multilateral video toolkit built for artists by artists." />
|
|
<link rel="canonical" href="http://localhost:4000/videobeaux/programs/utilities/subs_convert.html" />
|
|
<meta property="og:url" content="http://localhost:4000/videobeaux/programs/utilities/subs_convert.html" />
|
|
<meta property="og:type" content="website" />
|
|
<meta name="twitter:card" content="summary" />
|
|
<meta property="twitter:title" content="subs_convert" />
|
|
<script type="application/ld+json">
|
|
{"@context":"https://schema.org","@type":"WebPage","description":"The friendly multilateral video toolkit built for artists by artists.","headline":"subs_convert","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/videobeaux/assets/img/videobeaux.png"}},"url":"http://localhost:4000/videobeaux/programs/utilities/subs_convert.html"}</script>
|
|
<!-- End Jekyll SEO tag -->
|
|
|
|
<link rel="stylesheet" href="/videobeaux/assets/css/style.css?v=5e23701ed3967d38bab12937d79f95fae74b2a53">
|
|
<!--[if lt IE 9]>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
<![endif]-->
|
|
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
|
|
|
|
<!-- Setup Google Analytics -->
|
|
|
|
|
|
|
|
<!-- You can set your favicon here -->
|
|
<!-- link rel="shortcut icon" type="image/x-icon" href="/videobeaux/favicon.ico" -->
|
|
|
|
<!-- end custom head snippets -->
|
|
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
<header>
|
|
<h1><a href="http://localhost:4000/videobeaux/">videobeaux</a></h1>
|
|
|
|
|
|
<img src="/videobeaux/assets/img/videobeaux.png" alt="Logo" />
|
|
|
|
|
|
<p>The friendly multilateral video toolkit built for artists by artists.</p>
|
|
|
|
|
|
<p class="view"><a href="https://github.com/schwwaaa/videobeaux">View the Project on GitHub <small>schwwaaa/videobeaux</small></a></p>
|
|
|
|
|
|
|
|
|
|
|
|
</header>
|
|
<section>
|
|
|
|
<h1 id="subs_convert">subs_convert</h1>
|
|
|
|
<h2 id="description">Description</h2>
|
|
<p>Converts subtitle files between formats (e.g., SRT, VTT, ASS) while preserving timing, text, and (where possible) style metadata.</p>
|
|
|
|
<h2 id="purpose">Purpose</h2>
|
|
<p>The <code class="language-plaintext highlighter-rouge">subs_convert</code> program standardizes subtitle workflows by:</p>
|
|
<ul>
|
|
<li>Listing available subtitle tracks in a media file.</li>
|
|
<li>Extracting specific subtitle tracks by index or language.</li>
|
|
<li>Converting them to a desired output format.</li>
|
|
<li>Optionally cleaning or shifting them in time.</li>
|
|
</ul>
|
|
|
|
<p>It is especially helpful when preparing subtitles for caption-burning, translations, or multi-version deliverables.</p>
|
|
|
|
<h2 id="how-it-works">How It Works</h2>
|
|
<ol>
|
|
<li><strong>Input Inspection</strong><br />
|
|
Reads subtitle streams from the input media file (or compatible subtitle sources).</li>
|
|
<li><strong>Track Selection</strong>
|
|
<ul>
|
|
<li><code class="language-plaintext highlighter-rouge">list</code> shows all available subtitle tracks with indices and metadata.</li>
|
|
<li><code class="language-plaintext highlighter-rouge">indexes</code> selects specific tracks by index.</li>
|
|
<li><code class="language-plaintext highlighter-rouge">langs</code> filters tracks by language codes (e.g., <code class="language-plaintext highlighter-rouge">eng</code>, <code class="language-plaintext highlighter-rouge">spa</code>).</li>
|
|
<li><code class="language-plaintext highlighter-rouge">all</code> overrides filters and selects every subtitle track.</li>
|
|
</ul>
|
|
</li>
|
|
<li><strong>Filtering & Cleaning</strong>
|
|
<ul>
|
|
<li><code class="language-plaintext highlighter-rouge">forced_only</code> restricts output to forced subtitles only (e.g., foreign-language dialogue).</li>
|
|
<li><code class="language-plaintext highlighter-rouge">exclude_hi</code> strips hearing-impaired (HI) descriptors like sound effects or music tags.</li>
|
|
</ul>
|
|
</li>
|
|
<li><strong>Format Conversion</strong><br />
|
|
Converts the selected tracks into the requested output format (SRT, VTT, ASS, etc.).</li>
|
|
<li><strong>Timing Adjustment</strong><br />
|
|
Applies an optional <code class="language-plaintext highlighter-rouge">time_shift</code> so subtitles can be nudged earlier or later to stay in sync.</li>
|
|
<li><strong>Output Writing</strong><br />
|
|
Writes one or more subtitle files to an output directory or a specific <code class="language-plaintext highlighter-rouge">outputfile</code> path.</li>
|
|
</ol>
|
|
|
|
<h2 id="program-template">Program Template</h2>
|
|
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>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
|
|
</code></pre></div></div>
|
|
|
|
<h2 id="arguments">Arguments</h2>
|
|
|
|
<ul>
|
|
<li><strong>list</strong> — List all subtitle tracks in the input with indexes, languages, and basic metadata. Useful as a first step to see what is available.</li>
|
|
<li><strong>indexes</strong> — One or more subtitle track indexes to extract/convert (e.g., <code class="language-plaintext highlighter-rouge">0</code>, <code class="language-plaintext highlighter-rouge">1,2</code>). Accepts a comma-separated list.</li>
|
|
<li><strong>langs</strong> — Filter tracks by language codes (e.g., <code class="language-plaintext highlighter-rouge">eng</code>, <code class="language-plaintext highlighter-rouge">spa</code>). Accepts one or more languages, usually as a comma-separated list, depending on implementation.</li>
|
|
<li><strong>all</strong> — Select all subtitle tracks, ignoring <code class="language-plaintext highlighter-rouge">indexes</code> and <code class="language-plaintext highlighter-rouge">langs</code> filters.</li>
|
|
<li><strong>forced_only</strong> — Restrict output to subtitle events marked as “forced” (e.g., foreign-language dialogue or plot-critical on-screen text).</li>
|
|
<li><strong>exclude_hi</strong> — Attempt to remove hearing-impaired (HI) descriptors such as <code class="language-plaintext highlighter-rouge">[MUSIC]</code>, <code class="language-plaintext highlighter-rouge">(LAUGHTER)</code>, and other non-dialogue notes.</li>
|
|
<li><strong>format</strong> — Output format for converted subtitles, such as <code class="language-plaintext highlighter-rouge">srt</code>, <code class="language-plaintext highlighter-rouge">vtt</code>, or <code class="language-plaintext highlighter-rouge">ass</code>. The exact set of valid formats depends on the underlying subtitle tooling.</li>
|
|
<li><strong>outdir</strong> — Directory where the converted subtitle files should be written. Filenames are usually derived from the input and track metadata.</li>
|
|
<li><strong>outputfile</strong> — Explicit path and filename for the converted subtitle file when you only want a single, known output file location.</li>
|
|
<li><strong>time_shift</strong> — Apply a timing offset to all subtitle cues. Positive values delay subtitles; negative values make them appear earlier (e.g., <code class="language-plaintext highlighter-rouge">-0.25</code> shifts cues 250ms earlier).</li>
|
|
</ul>
|
|
|
|
<h2 id="real-world-example">Real World Example</h2>
|
|
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>videobeaux -P subs_convert \
|
|
-i documentary.mp4 \
|
|
-o documentary_fixed.mp4 \
|
|
--langs eng \
|
|
--exclude_hi \
|
|
--format vtt \
|
|
--time_shift -0.25 \
|
|
--outdir subs_output
|
|
</code></pre></div></div>
|
|
|
|
<h2 id="technical-notes">Technical Notes</h2>
|
|
<ul>
|
|
<li><code class="language-plaintext highlighter-rouge">list</code> is often used alone to inspect subtitle tracks before running a full conversion.</li>
|
|
<li>If both <code class="language-plaintext highlighter-rouge">indexes</code> and <code class="language-plaintext highlighter-rouge">langs</code> are provided, explicit <code class="language-plaintext highlighter-rouge">indexes</code> typically take priority.</li>
|
|
<li><code class="language-plaintext highlighter-rouge">all</code> supersedes both <code class="language-plaintext highlighter-rouge">indexes</code> and <code class="language-plaintext highlighter-rouge">langs</code>, ensuring every subtitle track is processed.</li>
|
|
<li><code class="language-plaintext highlighter-rouge">time_shift</code> expects a value in seconds and can be fractional for fine-grained adjustment.</li>
|
|
<li>Some formats (like ASS) support styling; preservation depends on how much style data exists in the source.</li>
|
|
</ul>
|
|
|
|
<h2 id="recommended-usage">Recommended Usage</h2>
|
|
<ul>
|
|
<li>Start with <code class="language-plaintext highlighter-rouge">list</code> to discover track indices and language tags.</li>
|
|
<li>Use <code class="language-plaintext highlighter-rouge">langs</code> when targeting a specific language for translation or distribution.</li>
|
|
<li>Use <code class="language-plaintext highlighter-rouge">exclude_hi</code> for clean, dialogue-only subtitle deliveries.</li>
|
|
<li>Use <code class="language-plaintext highlighter-rouge">format ass</code> when preparing styled subtitles for tools like <code class="language-plaintext highlighter-rouge">captburn</code>.</li>
|
|
<li>Use <code class="language-plaintext highlighter-rouge">time_shift</code> after trimming or re-cutting your video to quickly re-align subtitles without manual editing.</li>
|
|
</ul>
|
|
|
|
|
|
</section>
|
|
<footer>
|
|
|
|
<p>This project is maintained by <a href="https://github.com/schwwaaa">schwwaaa</a></p>
|
|
|
|
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
|
</footer>
|
|
</div>
|
|
<script src="/videobeaux/assets/js/scale.fix.js"></script>
|
|
</body>
|
|
</html>
|