#3872 TaskCfgVTT(is_cuda=True, uuid='407ff91c5a', cache_folder='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/2744/407f

31.94* Posted at: 2 days ago 👁20

合并阶段出错 最后一步字幕配音嵌入时出错
Traceback (most recent call last):
File "videotrans\util\help_ffmpeg.py", line 261, in runffmpeg
File "subprocess.py", line 526, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'compose1774908315.7110848.txt', '-i', 'novoice.mp4', '-i', 'origin_audio.m4a', '-i', 'shuang.srt', '-map', '0:v', '-map', '1:a', '-map', '2:s', '-c:v', 'hevc_nvenc', '-c:a', 'copy', '-c:s', 'mov_text', '-metadata:s:s:0', 'language=chi', '-movflags', '+faststart', '-cq', '23', '-preset', 'p2', '-t', '5075.933000', 'laste_target.mp4']' returned non-zero exit status 4294967274.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\help_ffmpeg.py", line 261, in runffmpeg
File "subprocess.py", line 526, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'compose1774908315.7110848.txt', '-i', 'novoice.mp4', '-i', 'origin_audio.m4a', '-i', 'shuang.srt', '-map', '0:v', '-map', '1:a', '-map', '2:s', '-c:v', 'libx265', '-c:a', 'copy', '-c:s', 'mov_text', '-metadata:s:s:0', 'language=chi', '-movflags', '+faststart', '-crf', '23', '-preset', 'veryfast', '-t', '5075.933000', 'laste_target.mp4']' returned non-zero exit status 4294967274.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 1525, in _join_video_audio_srt
File "videotrans\util\help_ffmpeg.py", line 302, in runffmpeg
File "videotrans\util\help_ffmpeg.py", line 307, in runffmpeg
RuntimeError: submitting a packet to the muxer: Invalid argument muxing a packet

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 324, in run
File "videotrans\task\trans_create.py", line 802, in assembling
File "videotrans\task\trans_create.py", line 1528, in _join_video_audio_srt
RuntimeError: 最后一步字幕配音嵌入时出错
TaskCfgVTT(is_cuda=True, uuid='407ff91c5a', cache_folder='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/2744/407ff91c5a', target_dir='C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4', source_language='英语', source_language_code='en', source_sub='C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4/en.srt', source_wav='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/2744/407ff91c5a/en.wav', source_wav_output='C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4/zh-cn.srt', target_wav='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/2744/407ff91c5a/target.wav', target_wav_output='C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4/zh-cn.m4a', name='C:/Users/savior/Desktop/1/58-9. LangChain RAG Documentation.mp4', noextname='58-9. LangChain RAG Documentation', basename='58-9. LangChain RAG Documentation.mp4', ext='mp4', dirname='C:/Users/savior/Desktop/1', shound_del_name=None, translate_type=5, tts_type=10, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='aozi.wav', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3-turbo', 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='C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4/58-9. LangChain RAG Documentation.mp4', novoice_mp4='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/2744/407ff91c5a/novoice.mp4', is_separate=False, instrument=None, vocal=None, back_audio='', clear_cache=False, background_music=None, subtitle_type=4, only_out_mp4=False, recogn2pass=True, output_srt=2, copysrt_rawvideo=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.98
frozen:True
language:zh
root_dir:D:/project/Videotrans/win-pyvideotrans-v3.98-327

1 Replies

这是由于视频合成时使用了硬件编码(hevc_nvenc)失败,回退到软件编码(libx265)也失败,最终导致“submitting a packet to the muxer: Invalid argument”错误。这通常与文件路径过长、文件名包含特殊字符或编码器参数不兼容有关。

解决方案:

  1. 简化输入文件路径和名称:这是最可能的原因。你的原始视频文件路径 C:/Users/savior/Desktop/1/58-9. LangChain RAG Documentation.mp4 较长且包含空格和点。请将视频文件移动到一个更浅的目录(如 D:\video),并重命名为一个简短、仅包含英文字母和数字的名称(例如 video.mp4)。
  2. 检查输出目录:确保输出目录 C:/Users/savior/Desktop/_video_out/58-9. LangChain RAG Documentation-mp4 路径同样不过长,且不包含特殊符号。可以尝试在软件中点击“输出到...”按钮,指定一个更简单的输出路径(如 D:\output)。
  3. 禁用硬件编码:在软件中,进入 菜单 -> 工具 -> 高级选项,找到【视频输出控制】部分,取消勾选 视频合成优先硬编码,然后重新处理视频。
  4. 调整编码设置:在同一【视频输出控制】区域,尝试将 264/265编码265 切换回 264,并将 输出视频压缩率veryfast 改为 mediumslow,以提高兼容性。
  5. 清理缓存后重试:在主界面左上角勾选 清理已生成,然后重新选择处理简化后的视频文件。

请按顺序尝试以上步骤,通常第1步和第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