#6200 The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification:srtfile='

2408:8234* Posted at: 12 hours ago

The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='C:/Users/Administrator/Desktop/翻译片段/3-2/_video_out/3-2-1-mp4/en.srt'
content=''
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 148, in run
File "videotrans\task\_stage_assemble.py", line 26, in assembling
File "videotrans\task\_stage_assemble.py", line 153, in _join_video_audio_srt
File "videotrans\task\_stage_subtitle.py", line 30, in _process_subtitles
File "videotrans\util\_srt_parse.py", line 187, in get_subtitle_from_srt
RuntimeError: The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='C:/Users/Administrator/Desktop/翻译片段/3-2/_video_out/3-2-1-mp4/en.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/Administrator/Desktop/翻译片段/3-2/3-2-1.mp4,
输出结果保存到文件夹: C:/Users/Administrator/Desktop/翻译片段/3-2/_video_out/3-2-1-mp4,
临时文件夹: D:/win-pyvideotrans-v4.08/tmp/30072/2be6e62d3d
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), model_name: large-v3-turbo, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入软字幕
代理地址:


=
system:Windows-10-10.0.19045-SP0
version:v4.08
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v4.08

1 Replies

核心原因:en.srt 目标字幕文件存在但内容为空(content='')。你选择了「清理已生成」且翻译渠道用的是 Google(免费)但「代理地址」为空,在中国大陆 Google 翻译必须配置代理才能访问,导致翻译阶段没有生成有效字幕内容,最终在合成软字幕阶段读取空文件报错。

解决方案:

  1. 先用记事本打开 C:/Users/Administrator/Desktop/翻译片段/3-2/_video_out/3-2-1-mp4/en.srt,确认文件是否真的为空。如果为空,说明翻译步骤实际失败了。
  2. 处理翻译渠道问题:

    • 在中国大陆使用 Google 翻译,必须在主界面「网络代理」栏填写代理地址,格式类似 http://127.0.0.1:7890
    • 或直接切换为免费的「微软翻译」(无需代理、国内可用)。
    • 或改用 DeepSeek / OpenAI 等 AI 翻译渠道(需在 菜单-翻译设置 中填写密钥)。
  3. 如果这个 en.srt 是你自己准备的字幕文件(而非软件翻译生成),请注意:

    • 不要勾选「清理已生成」,否则会清空你已有的字幕文件。
    • 不要点击「输出到...」自定义输出位置,否则软件无法找到你的字幕。
    • 确保字幕严格符合标准 SRT 格式:行号、时间轴、文本,且结束时间大于开始时间,下一条开始时间不小于上一条结束时间。
  4. 你的视频路径 桌面/翻译片段/3-2/3-2-1.mp4 含中文和特殊符号 -,建议将视频移动到纯英文路径(如 D:/videos/3-2-1.mp4)后再处理,避免 FFmpeg 等底层工具解析异常。
  5. 若已更换翻译渠道后仍失败,请打开 D:/win-pyvideotrans-v4.08/logs/ 目录下最新日志(按日期命名),复制底部约 30 行报错信息以便进一步定位。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Dondate via PayPal

Related resource