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

18.167* Posted at: 1 day 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/49155/Desktop/_video_out/FM46 - Muslim Mistress Humiliates Slave Girl-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='C:/Users/49155/Desktop/_video_out/FM46 - Muslim Mistress Humiliates Slave Girl-mp4/zh-cn.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/49155/Desktop/FM46 - Muslim Mistress Humiliates Slave Girl.mp4,
输出结果保存到文件夹: C:/Users/49155/Desktop/_video_out/FM46 - Muslim Mistress Humiliates Slave Girl-mp4,
临时文件夹: E:/win-pyvideotrans-v3.98-317/tmp/12032/f4da23979b
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:openai-whisper(内置), model_name: tiny, 发音语言: 英语, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
已选 仅输出mp4
代理地址:http://127.0.0.1:10090


=
system:Windows-10-10.0.26100-SP0
version:v4.08
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.98-317

1 Replies

目标字幕文件为空导致最终合成失败。报错指向的 zh-cn.srt 文件内容为 content='',即文件存在但没有任何字幕内容,所以在合成硬字幕时无法读取。

处理步骤:

  1. 打开 C:/Users/49155/Desktop/_video_out/FM46 - Muslim Mistress Humiliates Slave Girl-mp4/zh-cn.srt,确认该文件是否为 0 KB 或空白。
  2. 如果为空,说明“微软翻译”这一步没有成功写出目标字幕。请先把视频文件名改成简单的英文/数字组合(例如 FM46.mp4),移除路径中的空格和特殊符号,然后删除旧的 _video_out/FM46 - Muslim Mistress Humiliates Slave Girl-mp4 文件夹,重新执行。
  3. 将翻译渠道从“微软翻译”换成其他渠道,例如 Google 翻译、DeepL、DeepSeek 或 OpenAI。传统翻译渠道(微软/Google)不要勾选“发送完整字幕”,该选项主要用于 AI 大模型翻译。
  4. 如果仍然失败,请提供 logs/ 目录下最新日志中“翻译”阶段附近的报错内容,以便进一步定位。

请查阅相关文档:

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