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

2408:**:53d1 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:/win-pyvideotrans-v4.08/真千金第二十五集-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='D:/win-pyvideotrans-v4.08/真千金第二十五集-mp4/en.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/Administrator/Desktop/翻译片段/真千金第二十五集.mp4,
输出结果保存到文件夹: D:/win-pyvideotrans-v4.08/真千金第二十五集-mp4,
临时文件夹: D:/win-pyvideotrans-v4.08/tmp/40376/273fddb816
已选 清理已存在
已启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量不限制
语音识别:Dolphin亚洲语言(内置), model_name: , 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:M2M100(内置),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址:


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

1 Replies

这是 v4.08 版本的一个已知 bug:当未选择配音角色、但需要嵌入硬字幕时,最后一步合并视频与字幕会去读取翻译后的 en.srt,而该文件实际为空(content=''),从而报出 "The srt subtitles were not read" 错误。

解决方案:

  1. 升级到 v4.08-0802(2026-08-02 发布的补丁版)。软件左上角显示的版本号仍是 v4.08,但内部已修复此问题;Windows 用户请下载最新补丁包覆盖到完整版目录,源码部署用户请重新拉取源码覆盖。
  2. 在升级前若需临时处理:

    • 打开 D:/win-pyvideotrans-v4.08/真千金第二十五集-mp4/en.srt,确认文件是否为空;若为空,说明 M2M100 翻译未成功生成内容。
    • 可改用其他翻译渠道(如 Google 免费翻译、微软免费翻译)重试。
    • 重试时不要勾选“清理已生成”,避免清掉已生成的中间文件。
  3. 路径建议:日志中的输出路径包含中文(真千金第二十五集-mp4),即使升级后也建议将视频文件和输出目录放到纯英文数字路径(如 D:\pyvideotrans\videos),以免 FFmpeg 或字幕解析阶段因特殊字符出现其他异常。

请查阅相关文档:

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