#1620 合并阶段出错:运行时错误:最后一步字幕配音嵌入时出错:Traceback (most recent call last): File "videotrans\util\help_ffmpeg.py", line 227, in runff

103.97* Posted at: 1 day ago 👁21

合并阶段出错:运行时错误:最后一步字幕配音嵌入时出错:
Traceback (most recent call last):
File "videotrans\util\help_ffmpeg.py", line 227, in runffmpeg
File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'D:/videotrans/tmp22652/compose1764058206.8081777.txt', '-i', 'D:/videotrans/tmp22652/bdf331f5b6/novoice.mp4', '-i', 'D:/videotrans/tmp22652/bdf331f5b6/origin_audio.m4a', '-c:v', 'h264_nvenc', '-c:a', 'copy', '-vf', 'subtitles=end.srt.ass', '-movflags', '+faststart', '-cq', '22', '-preset', 'p1', '-shortest', "E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/1.mp4"]' returned non-zero exit status 4294967294.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\help_ffmpeg.py", line 227, in runffmpeg
File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'D:/videotrans/tmp22652/compose1764058206.8081777.txt', '-i', 'D:/videotrans/tmp22652/bdf331f5b6/novoice.mp4', '-i', 'D:/videotrans/tmp22652/bdf331f5b6/origin_audio.m4a', '-c:v', 'libx264', '-c:a', 'copy', '-vf', 'subtitles=end.srt.ass', '-movflags', '+faststart', '-crf', '22', '-preset', 'fast', '-shortest', "E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/1.mp4"]' returned non-zero exit status 4294967294.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 1230, in _join_video_audio_srt
File "videotrans\util\help_ffmpeg.py", line 267, in runffmpeg
File "videotrans\util\help_ffmpeg.py", line 272, in runffmpeg
RuntimeError: initializing filters opening output file E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/1.mp4. opening output files: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 299, in run
File "videotrans\task\trans_create.py", line 549, in assembling
File "videotrans\task\trans_create.py", line 1233, in _join_video_audio_srt
RuntimeError: 最后一步字幕配音嵌入时出错

TaskCfg(cache_folder='D:/videotrans/tmp22652/bdf331f5b6', target_dir="E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1", remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language='英语', target_language='西班牙语', source_language_code='en', target_language_code='es', source_sub="E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/en.srt", target_sub="E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/es.srt", source_wav='D:/videotrans/tmp22652/bdf331f5b6/en.wav', source_wav_output="E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/en.m4a", target_wav='D:/videotrans/tmp22652/bdf331f5b6/target.wav', target_wav_output="E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/es.m4a", subtitles='', novoice_mp4='D:/videotrans/tmp22652/bdf331f5b6/novoice.mp4', noextname='1', shibie_audio=None, targetdir_mp4="E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/1.mp4", instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=1, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Elena(Female/AR)', copysrt_rawvideo=False, clear_cache=True, translate_type=5, tts_type=0, recogn_type=6, model_name='large-v3-turbo', split_type=0, voice_autorate=True, video_autorate=True, cuda=True, name="E:/短剧原片/Iceberg President's Substitute Soldier King/1.mp4", basename='1.mp4', ext='mp4', dirname="E:/短剧原片/Iceberg President's Substitute Soldier King", shound_del_name=None, uuid='bdf331f5b6', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, auto_fix=True)


=
system:Windows-10-10.0.19045-SP0
version:v3.86
frozen:True
language:zh
root_dir:D:/videotrans

1 Replies

这个错误是由于输出文件路径问题导致的。从错误信息 opening output files: No such file or directory 可以看出,FFmpeg 无法创建输出文件。

主要原因和解决方案:

  1. 路径过长或包含特殊字符

    • 您的输出路径 E:/短剧原片/Iceberg President's Substitute Soldier King/_video_out/1/1.mp4 包含中文、空格和特殊字符(单引号)。
    • 解决方案:将源视频文件移动到更简单的路径,如 D:/video/1.mp4,避免使用中文、空格和特殊符号。
  2. 目录权限问题

    • 输出目录可能没有写入权限。
    • 解决方案:确保输出目录存在且有写入权限,或尝试输出到其他位置。
  3. 硬件编码器问题

    • 日志显示先尝试了 h264_nvenc(NVIDIA 硬件编码),失败后尝试 libx264(软件编码)也失败。
    • 解决方案:在高级选项中禁用硬件编码:

      • 菜单栏选择 工具/选项 -> 高级选项
      • 在"视频输出控制"区域勾选"强制软编码"

建议操作步骤:

  1. 将源视频文件重命名为简单英文名称(如 video.mp4)并移动到根目录(如 D:/video.mp4
  2. 在高级选项中启用"强制软编码"
  3. 重新处理视频

如果问题依旧,请检查磁盘空间是否充足,并确保输出目录 _video_out 能够正常创建。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions