#4748 TaskCfgVTT(uuid='93f4c8f5f8', name='D:/昕丰越发布素材/5.26 20年高端制造/5.26 20年高端制造英文/5.26 20年高端制造英文.mp4', dirname='D:/昕丰越发布素

38.84* 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='5.26 20年高端制造英文-mp4/en.srt'
content=''
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 68, in run
File "videotrans\task\trans_create.py", line 580, in trans
File "videotrans\util\help_srt.py", line 202, 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='5.26 20年高端制造英文-mp4/en.srt'
content=''
TaskCfgVTT(uuid='93f4c8f5f8', name='D:/昕丰越发布素材/5.26 20年高端制造/5.26 20年高端制造英文/5.26 20年高端制造英文.mp4', dirname='D:/昕丰越发布素材/5.26 20年高端制造/5.26 20年高端制造英文', noextname='5.26 20年高端制造英文', basename='5.26 20年高端制造英文.mp4', ext='mp4', target_dir='5.26 20年高端制造英文-mp4', cache_folder='D:/BaiduNetdiskDownload/tmp/5596/93f4c8f5f8', is_cuda=False, source_language='英语', source_language_code='en', source_sub='5.26 20年高端制造英文-mp4/en.srt', source_wav='D:/BaiduNetdiskDownload/tmp/5596/93f4c8f5f8/en.wav', source_wav_output='5.26 20年高端制造英文-mp4/en.m4a', target_language='阿拉伯语', target_language_code='ar', target_sub='5.26 20年高端制造英文-mp4/ar.srt', target_wav='D:/BaiduNetdiskDownload/tmp/5596/93f4c8f5f8/target.wav', target_wav_output='5.26 20年高端制造英文-mp4/ar.m4a', translate_type=0, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+10%', voice_role='Taim(Male/JO)', voice_autorate=False, video_autorate=True, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='base', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='5.26 20年高端制造英文-mp4/5.26 20年高端制造英文.mp4', novoice_mp4='D:/BaiduNetdiskDownload/tmp/5596/93f4c8f5f8/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='D:/BaiduNetdiskDownload/tmp/5596/93f4c8f5f8/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=1.0)


=
system:Windows-10-10.0.22631-SP0
version:v4.00
frozen:True
language:zh
root_dir:D:/BaiduNetdiskDownload

1 Replies

错误原因是软件未能读取您提供的 SRT 字幕文件(en.srt)。从日志看,该文件内容为空或路径不符合软件要求的规范目录结构,导致读取失败。

排查与解决步骤:

  1. 检查目录结构
    按软件要求,自定义字幕文件必须放置在视频所在目录下的 _video_out 文件夹内,然后进入 _video_out,再创建一个名字为 视频文件名-后缀 的文件夹(例如您的视频是 5.26 20年高端制造英文.mp4,则创建 5.26 20年高端制造英文-mp4),并将字幕文件放入该文件夹。
    您的当前路径 5.26 20年高端制造英文-mp4/en.srt 没有位于 _video_out,也没有正确的完整路径。
  2. 确认字幕文件非空且格式正确
    用文本编辑器打开 en.srt,检查是否包含有效的 SRT 内容(例如 1\n00:00:01,000 --> 00:00:04,000\nHello world\n\n)。如果文件是空的或没有标准格式,软件会报错。
  3. 简化文件路径
    视频路径包含中文、空格和数字,这极易导致意外错误。建议将整个视频文件夹移动到纯英文路径(如 D:/videos/5.26-en),并简化文件名(如 demo.mp4)。然后再按上述步骤放置字幕文件。
  4. 清理缓存并重试
    勾选主界面的 清理已生成,清除历史缓存后重新运行。

请查阅相关文档:

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.

Related resource