#4817 最后一步字幕配音嵌入时出错[Errno 2] No such file or directory: 'test-mp4/end.ass'Traceback (most recent call last): File "videotrans

120.228* Posted at: 2 hours ago

最后一步字幕配音嵌入时出错[Errno 2] No such file or directory: 'test-mp4/end.ass'
Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 1383, in _join_video_audio_srt
File "shutil.py", line 434, in copy2
File "shutil.py", line 256, in copyfile
FileNotFoundError: [Errno 2] No such file or directory: 'test-mp4/end.ass'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 112, in run
File "videotrans\task\trans_create.py", line 707, in assembling
File "videotrans\task\trans_create.py", line 1385, in _join_video_audio_srt
videotrans.configure.excepts.VideoTransError: 最后一步字幕配音嵌入时出错[Errno 2] No such file or directory: 'test-mp4/end.ass'

1 Replies

该错误是因为视频最终合成时找不到所需的 ASS 字幕样式文件(end.ass),通常由以下原因之一导致:

  1. 自定义硬字幕样式但文件未正确生成:当你在“设置更多参数”中点击“修改硬字幕样式”并保存了自定义样式后,软件会尝试在输出目录生成对应的 ASS 样式文件。如果该文件生成失败或路径异常,就会报此错误。
  2. 路径包含特殊字符或过长:虽然 test-mp4 看起来正常,但输入视频文件或输出目录的完整路径如果含有中文、空格、表情符号等,Windows 命令行长度超限时也会导致文件写入失败。

解决方法:

  1. 恢复默认字幕样式
    点击主界面“设置更多参数” → “修改硬字幕样式”,在弹出的窗口中直接点击“恢复默认”或关闭窗口不做任何修改,然后重新执行任务。
  2. 检查文件路径

    • 将输入视频文件名改为简短纯英文(如 test.mp4)。
    • 将软件解压到浅层纯英文目录(如 D:\pyVideoTrans),输出目录保持默认。
    • 确保视频文件本身不在系统盘或需要管理员权限的文件夹。
  3. 清理缓存后重试
    勾选主界面左上角的 “清理已生成” 复选框,再重新执行任务,强制清除可能损坏的缓存文件。

请查阅相关文档:

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