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

2607:9d00* Posted at: 3 hours ago

The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='D:/desktop/_video_out/2-mp4/zh-cn.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='D:/desktop/_video_out/2-mp4/zh-cn.srt'
content=''

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


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

1 Replies

该错误的核心原因是:最终合成阶段读取的目标语言字幕文件 D:/desktop/_video_out/2-mp4/zh-cn.srt 是空文件,导致 SRT 解析失败。

可能的原因:

  • 上一阶段(字幕翻译,当前为微软翻译)未成功生成有效字幕,但任务仍继续进入了合成阶段;
  • 微软翻译接口被限流、网络异常或返回空内容;
  • 勾选了“发送完整字幕”,但该选项仅适用于 AI 翻译渠道,传统翻译渠道不应勾选;
  • “清理已生成”删除了旧字幕,而新字幕生成失败。

处理步骤:

  1. 打开软件目录 logs/ 下最新日期的 .log 文件,查看翻译阶段是否出现 “微软翻译”“限流”“失败”“返回空” 等报错。
  2. 回到“翻译视频或音频”主界面,取消勾选“发送完整字幕”,并暂时取消勾选“清理已生成”,然后重新开始任务。
  3. 若仍失败,可在翻译渠道中临时切换为 Google 翻译或 DeepL 翻译,测试是否为微软翻译渠道返回空结果导致。
  4. 确认发音语言(日语)与目标语言(简体中文)选择正确,且原视频确实包含可识别的人声音轨。
  5. 如果以上操作后仍出现同样错误,请提供 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