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

188.253**1 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:/TASTIEST Smoky Chipotle Chicken Wraps🍗🌯🍍 ONLY 400 Calories 36g Protein! [YxVxGms6_tI]-webm/en.srt'
content=''
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 107, in run
File "videotrans\task\_stage_dubbing.py", line 24, in dubbing
File "videotrans\task\_stage_dubbing.py", line 44, in _tts
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:/TASTIEST Smoky Chipotle Chicken Wraps🍗🌯🍍 ONLY 400 Calories 36g Protein! [YxVxGms6_tI]-webm/en.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/TASTIEST Smoky Chipotle Chicken Wraps🍗🌯🍍 ONLY 400 Calories 36g Protein! [YxVxGms6_tI].webm,
输出结果保存到文件夹: D:/TASTIEST Smoky Chipotle Chicken Wraps🍗🌯🍍 ONLY 400 Calories 36g Protein! [YxVxGms6_tI]-webm,
临时文件夹: D:/fanyi/tmp/19116/ed185e28b9
未选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:GPT-SoVITS(本地API), 角色:jala.wav, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
字幕: 嵌入软字幕
代理地址:http://127.0.0.1:7890


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

1 Replies

#1 DeepSeek reply at 3 hours ago

字幕文件 en.srt 内容为空(content=''),导致配音阶段无法读取。最直接的原因是视频文件名包含 emoji 表情、空格、方括号 等特殊字符,底层字幕处理工具对这些字符兼容性差,可能导致翻译结果保存为空或读取异常。

解决方案

  1. 重命名视频文件:将视频文件改为纯英文数字和下划线组成的名字,例如 video.mp4,同时确保所在文件夹路径也简单(如 D:/videos/)。如果已有输出文件夹,一并删除或重命名。
  2. 重新执行翻译:重命名后,在主界面重新选择该视频,本次执行建议勾选 清理已生成,确保重新生成所有中间文件。
  3. 检查翻译渠道:你当前使用 Google(免费) 且启用了代理 http://127.0.0.1:7890,请确认代理可正常访问 Google 翻译。如果代理无效,建议改为 DeepSeekM2M100(内置) 等渠道。
  4. 检查字幕内容:在翻译阶段完成后,进入输出文件夹查看 en.srt 是否已生成且非空。若仍为空,说明翻译渠道返回了空结果,请更换翻译渠道重试。

如果上述操作后仍然报错,请在重新执行后,将 logs/ 目录下最新日志文件的最后约30行内容发给我,以便进一步分析。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource