<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Local Subtitle Tool - 用来把影片自动制作成可编辑的多语言字幕]]></title><description><![CDATA[<h1>本地字幕工具</h1>
<p dir="auto"><a href="https://youtu.be/yvc3aMlWZFY" rel="nofollow ugc"><i class="fa fa-youtube" aria-hidden="true"></i> Youtube Video</a></p><div class="js-lazyYT lazyYT-container" data-youtube-id="yvc3aMlWZFY" data-width="640" data-height="360" data-parameters style="width:640px;padding-bottom:360px">
 <div class="ytp-thumbnail lazyYT-image-loaded" style="background-image:url(&quot;https://i.ytimg.com/vi/yvc3aMlWZFY/hqdefault.jpg&quot;)">
  <button class="ytp-large-play-button ytp-button" tabindex="23" aria-live="assertive" style="transform:scale(0.85)" onclick="$(this).lazyYT(this);return false;">
   <svg height="100%" version="1.1" viewbox="0 0 68 48" width="100%">
    <path class="ytp-large-play-button-bg" d="m .66,37.62 c 0,0 .66,4.70 2.70,6.77 2.58,2.71 5.98,2.63 7.49,2.91 5.43,.52 23.10,.68 23.12,.68 .00,-1.3e-5 14.29,-0.02 23.81,-0.71 1.32,-0.15 4.22,-0.17 6.81,-2.89 2.03,-2.07 2.70,-6.77 2.70,-6.77 0,0 .67,-5.52 .67,-11.04 l 0,-5.17 c 0,-5.52 -0.67,-11.04 -0.67,-11.04 0,0 -0.66,-4.70 -2.70,-6.77 C 62.03,.86 59.13,.84 57.80,.69 48.28,0 34.00,0 34.00,0 33.97,0 19.69,0 10.18,.69 8.85,.84 5.95,.86 3.36,3.58 1.32,5.65 .66,10.35 .66,10.35 c 0,0 -0.55,4.50 -0.66,9.45 l 0,8.36 c .10,4.94 .66,9.45 .66,9.45 z" fill="#1f1f1e" fill-opacity="0.9">
    </path>
    <path d="m 26.96,13.67 18.37,9.62 -18.37,9.55 -0.00,-19.17 z" fill="#fff">
    </path>
    <path d="M 45.02,23.46 45.32,23.28 26.96,13.67 43.32,24.34 45.02,23.46 z" fill="#ccc">
    </path>
   </svg>
  </button>
 </div>
</div><p></p>
<p dir="auto"><a href="https://upload.lcz.me/uploads/fc8097d0-1e4b-45f8-87f2-139dd46a5638.zip" rel="nofollow ugc">local_subtitle_tool.zip</a></p>
<p dir="auto">这是我自制的使用本地影片和剧本，建立与剧本一致的翻译字幕。本工具使用 <code>faster-whisper</code> 提取语音时间点，并使用本机 LM Studio 模型进行剧本匹配和翻译。它会生成可编辑的 SRT、ASS，以及已烧录字幕的 MP4；媒体内容不会传送到云端。</p>
<h2>功能重点</h2>
<ul>
<li>拖放影片，并可输入、粘贴或拖放 <code>.txt</code> / <code>.docx</code> 剧本。</li>
<li>为任意选定的来源语言与目标语言生成带时间码的字幕。</li>
<li>可自行输入任何目标语言，也可使用紧凑的 <strong>Eng / Chi / Jp / Kor / Mel / India / Thai / 繁体</strong> 快捷按钮。</li>
<li>读取 LM Studio 目前已加载的模型清单。</li>
<li>在依照原始影片长宽比例显示的首帧预览上，直接拖动字幕位置。</li>
<li>调整字体、字号、文字颜色、描边、描边颜色和粗体。</li>
<li>选择<strong>自动</strong>建立 MP4，或先以<strong>手动</strong>模式编辑 SRT 后再输出。</li>
<li>编辑已生成的 SRT 或 ASS 后，重新输出 MP4。</li>
<li>手动保存及重新开启字幕工作项目 JSON 档。</li>
<li>工作完成后可选择卸载 LM Studio 模型以释放模型 VRAM（不会强制清除系统 RAM）。</li>
</ul>
<h2>系统需求</h2>
<ul>
<li>Windows</li>
<li>Python 3.11 或更高版本</li>
<li>已安装 <a href="https://ffmpeg.org/download.html" rel="nofollow ugc">FFmpeg</a>，并已加入 <code>PATH</code></li>
<li>已安装 <a href="https://lmstudio.ai/" rel="nofollow ugc">LM Studio</a>，加载指令模型并启动本地服务器</li>
</ul>
<p dir="auto">安装 Python 套件：</p>
<pre><code class="language-powershell">pip install -r requirements.txt
</code></pre>
<p dir="auto">若要将依赖安装在本工具私有的 <code>vendor</code> 文件夹，而不影响共享 Python 环境，请使用：</p>
<pre><code class="language-powershell">pip install --target .\vendor -r requirements.txt
</code></pre>
<p dir="auto">所选 Whisper 模型会在首次使用时下载。使用 NVIDIA GPU 时，请在 GUI 选择 <code>cuda</code> 和 <code>float16</code>；使用 CPU 时请选择 <code>cpu</code> 和 <code>int8</code>。</p>
<h2>启动方式</h2>
<p dir="auto">双击 <code>run_subtitle_gui.bat</code>，或执行：</p>
<pre><code class="language-powershell">python subtitle_gui.py
</code></pre>
<p dir="auto">请在 LM Studio 启动本地服务器。默认地址为：</p>
<pre><code class="language-text">http://127.0.0.1:1234/v1
</code></pre>
<p dir="auto">在应用程式中按 <strong>Load models</strong>，即可选择目前已加载的模型。</p>
<h2>使用流程</h2>
<ol>
<li>将影片拖到 Video 面板，或双击该区域浏览并选择影片。</li>
<li>粘贴剧本，或将 <code>.txt</code> / <code>.docx</code> 文件拖到 Script 面板。</li>
<li>选择来源语言、目标翻译语言及 LM Studio 模型。目标语言可任意输入，也可按 <strong>Eng</strong>、<strong>Chi</strong>、<strong>Jp</strong>、<strong>Kor</strong>、<strong>Mel</strong>、<strong>India</strong>、<strong>Thai</strong> 或 <strong>繁体</strong>。</li>
<li>在首帧预览上拖动示例字幕，并设置字幕样式。</li>
<li>选择输出模式：
<ul>
<li>**自动：**建立 SRT / ASS 后，立即建立已烧录字幕的 MP4。</li>
<li>**手动：**SRT 建立后暂停，编辑字幕文字或时间码，再选择 <strong>Save and render MP4</strong>。</li>
</ul>
</li>
<li>处理完成后可使用 <strong>Preview result</strong>、<strong>Edit SRT</strong> 或 <strong>Edit ASS</strong>。</li>
</ol>
<h2>输出文件</h2>
<p dir="auto">文件会输出到应用程式旁的 <code>output</code> 文件夹。每次工作都会使用原影片名称加上时间戳，因此不会覆盖较早的输出。</p>
<p dir="auto">例如，名为 <code>demo.mp4</code> 的影片可能产生：</p>
<pre><code class="language-text">demo_20260831_143012_input_script.txt
demo_20260831_143012_asr_raw_zh.srt
demo_20260831_143012_script_matched_zh.srt
demo_20260831_143012_translated_English.srt
demo_20260831_143012_translated_English_styled.ass
demo_20260831_143012_translated_English_subtitled.mp4
demo_20260831_143012_alignment.json
demo_20260831_143012_subtitle_job.json
</code></pre>
<p dir="auto"><code>English</code> 来自 <strong>Translate to</strong> 输入的目标语言。所有翻译输出均使用 <code>translated_&lt;语言&gt;</code> 格式；例如输入 <code>中文</code> 时，将产生 <code>translated_中文.srt</code>、<code>translated_中文_styled.ass</code> 和 <code>translated_中文_subtitled.mp4</code>。Windows 文件名不支持的字符会自动改为 <code>_</code>。</p>
<p dir="auto"><code>*_subtitle_job.json</code> 会保存工作设定。使用 <strong>Open subtitle job</strong> 可手动恢复项目；应用程式启动时不会自动开启上一次项目。</p>
<h2>命令列使用</h2>
<p dir="auto">GUI 会调用 <code>subtitle_pipeline.py</code>，也可直接从命令列执行：</p>
<pre><code class="language-powershell">python subtitle_pipeline.py `
  --video "C:\Videos\demo.mp4" `
  --script "C:\Videos\script.txt" `
  --output ".\output" `
  --model "your-lm-studio-model-id" `
  --source-language zh `
  --target-language English
</code></pre>
<h2>说明</h2>
<ul>
<li>剧本是字幕文字的依据；语音转写主要用于提供时间码。</li>
<li>发布前请检查人名、界面名称、时间点和翻译内容。</li>
<li>LM Studio 的卸载操作只会释放所选模型，不会强制清理系统 RAM。</li>
</ul>
]]></description><link>https://lcz.me/topic/1436</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 00:43:35 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1436.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 Aug 2026 13:18:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Local Subtitle Tool - 用来把影片自动制作成可编辑的多语言字幕 on Tue, 01 Sep 2026 06:57:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a><br />
因为所有agent 还不能够精准做到我想要的东西。。。</p>
<p dir="auto">我是一个很懒惰的人，我先开头把自己的习惯写成skill....<br />
以后再真正丢给agent...</p>
]]></description><link>https://lcz.me/post/15301</link><guid isPermaLink="true">https://lcz.me/post/15301</guid><dc:creator><![CDATA[imbiplaza ASUS]]></dc:creator><pubDate>Tue, 01 Sep 2026 06:57:12 GMT</pubDate></item><item><title><![CDATA[Reply to Local Subtitle Tool - 用来把影片自动制作成可编辑的多语言字幕 on Tue, 01 Sep 2026 05:52:07 GMT]]></title><description><![CDATA[<p dir="auto">我弟挺能折腾的 ，直接让agent自己折腾不好吗？</p>
]]></description><link>https://lcz.me/post/15290</link><guid isPermaLink="true">https://lcz.me/post/15290</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Tue, 01 Sep 2026 05:52:07 GMT</pubDate></item></channel></rss>