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

39.128* Posted at: 21 hours ago

The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='F:/NEXT/MomWantsToBreed/_video_out/www.98T.la@MomWantsToBreed.23.06.30.jennifer.white.stop.wasting.your.seed.4k.2160p-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='F:/NEXT/MomWantsToBreed/_video_out/www.98T.la@MomWantsToBreed.23.06.30.jennifer.white.stop.wasting.your.seed.4k.2160p-mp4/zh-cn.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: F:/NEXT/MomWantsToBreed/www.98T.la@MomWantsToBreed.23.06.30.jennifer.white.stop.wasting.your.seed.4k.2160p.mp4,
输出结果保存到文件夹: F:/NEXT/MomWantsToBreed/_video_out/www.98T.la@MomWantsToBreed.23.06.30.jennifer.white.stop.wasting.your.seed.4k.2160p-mp4,
临时文件夹: H:/AIfanyi/tmp/18632/66612975e8
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), model_name: large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.08
frozen:True
language:zh
root_dir:H:/AIfanyi

1 Replies

错误信息明确指出 zh-cn.srt 字幕文件为空(content=''),导致合成阶段无法读取 SRT。直接原因是翻译后的目标字幕没有生成有效内容,最可能的原因是 Google 翻译渠道无法访问(中国大陆需科学上网,且你未配置代理)。

排查与解决步骤:

  1. 先确认字幕文件是否为空
    打开输出目录 F:/NEXT/MomWantsToBreed/_video_out/www.98T.la@MomWantsToBreed.23.06.30.jennifer.white.stop.wasting.your.seed.4k.2160p-mp4/zh-cn.srt,如果文件 0 字节,则翻译步骤没有正常返回结果。
  2. 更换翻译渠道
    将主界面「翻译渠道」从 Google翻译 改为 微软翻译(无需代理、免费),然后重新执行。这是最直接的解决办法。
  3. 取消勾选「发送完整字幕」
    发送完整字幕 仅适用于 AI 翻译渠道(如 DeepSeek、OpenAI),对 Google 传统翻译无效,可能造成异常。请取消勾选后重试。
  4. 修改视频文件名
    当前文件名含有 @、多个 . 号且很长(www.98T.la@MomWantsToBreed...),虽然不一定是本次直接原因,但特殊字符会导致 FFmpeg/路径解析异常。建议将视频重命名为简单英文数字,如 video01.mp4,再重新处理。
  5. 如需继续使用 Google 翻译
    在主界面「网络代理」处填写可用的代理地址(如 http://127.0.0.1:7890),确保浏览器能访问 Google 后再执行。

如果更换微软翻译后仍出现 zh-cn.srt 为空,请提供 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