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

118.92* 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/zheng/Downloads/_video_out/eco-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/zheng/Downloads/_video_out/eco-mp4/zh-cn.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/zheng/Downloads/eco.mp4,
输出结果保存到文件夹: C:/Users/zheng/Downloads/_video_out/eco-mp4,
临时文件夹: D:/迅雷下载/win-pyvideotrans-v4.08/tmp/572/09796d8e15
已选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), model_name: large-v3-turbo, 发音语言: English, 断句方式:默认断句
TranslateSrt:Google Translate (Free),原始语言:English,目标语言:Simplified Chinese, 已选 SendSRT
未选 配音角色,不进行配音
字幕: Soft Subtitles
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.08
frozen:True
language:en
root_dir:D:/迅雷下载/win-pyvideotrans-v4.08

1 Replies

The root cause is that the target subtitle file C:/Users/zheng/Downloads/_video_out/eco-mp4/zh-cn.srt exists but is empty when the final assembly stage tries to read it. This usually means the translation step either failed silently or wrote an empty result, so there is no valid subtitle content to embed/attach.

To solve it:

  1. Check the intermediate subtitle files in the output folder C:/Users/zheng/Downloads/_video_out/eco-mp4/:

    • en.srt (source subtitle) should be non-empty. If it is empty/missing, the ASR stage produced no subtitles — check if the video actually contains clear speech and that the source language is correct.
    • zh-cn.srt (target subtitle) should also be non-empty. If it is empty while en.srt is not, the translation step failed.
  2. Delete the translation cache to prevent a cached empty result from being reused:

    • Go to D:/迅雷下载/win-pyvideotrans-v4.08/tmp/translate_cache/ and delete all files in that folder.
  3. Re-run the task again without enabling 清理已生成 if you want to inspect the generated files first, or with it enabled after clearing the cache. If the problem persists, switch the translation channel from Google Translate to Microsoft Translate (free, no proxy needed) and test again.
  4. If en.srt itself is empty, try using a different ASR model (e.g. large-v3 instead of large-v3-turbo) or enable 降噪 / 分离人声背景声 to improve recognition.

If the issue continues after these steps, please provide the latest log file from D:/迅雷下载/win-pyvideotrans-v4.08/logs/ (copy the bottom ~30 lines) for further analysis.

Please read related docs:

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