#3874 TaskCfgVTT(is_cuda=True, uuid='12423db034', cache_folder='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/87052/124

57.180* Posted at: 2 days ago 👁23

合并阶段出错 最后一步字幕配音嵌入时出错
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', 'compose1774921080.44935.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', '3947.766000', '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', 'compose1774921080.44935.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', '3947.766000', '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='12423db034', cache_folder='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/87052/12423db034', target_dir='C:/Users/savior/Desktop/_video_out/51-2.IntroductiontoRAGImplementation-mp4', source_language='英语', source_language_code='en', source_sub='C:/Users/savior/Desktop/_video_out/51-2.IntroductiontoRAGImplementation-mp4/en.srt', source_wav='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/87052/12423db034/en.wav', source_wav_output='C:/Users/savior/Desktop/_video_out/51-2.IntroductiontoRAGImplementation-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/savior/Desktop/_video_out/51-2.IntroductiontoRAGImplementation-mp4/zh-cn.srt', target_wav='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/87052/12423db034/target.wav', target_wav_output='C:/Users/savior/Desktop/_video_out/51-2.IntroductiontoRAGImplementation-mp4/zh-cn.m4a', name='C:/Users/savior/Desktop/2/51-2.IntroductiontoRAGImplementation.mp4', noextname='51-2.IntroductiontoRAGImplementation', basename='51-2.IntroductiontoRAGImplementation.mp4', ext='mp4', dirname='C:/Users/savior/Desktop/2', 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/51-2.IntroductiontoRAGImplementation-mp4/51-2.IntroductiontoRAGImplementation.mp4', novoice_mp4='D:/project/Videotrans/win-pyvideotrans-v3.98-327/tmp/87052/12423db034/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

错误发生在视频合成的最后一步,即使用 FFmpeg 将无声视频、配音音频和字幕文件合并时,出现了 submitting a packet to the muxer: Invalid argument 错误。这通常与文件路径过长文件名包含特殊字符有关。

从日志中可以看到,输入的视频文件名 51-2.IntroductiontoRAGImplementation.mp4 较长,且其完整路径 C:/Users/savior/Desktop/2/51-2.IntroductiontoRAGImplementation.mp4 也较长。在 Windows 系统上,过长的文件路径(接近或超过 260 个字符限制)或文件名中的特殊符号(如连字符、点号过多)可能导致 FFmpeg 命令执行失败。

解决方案:

  1. 简化文件名和路径

    • 将待处理的视频文件重命名为一个简短的英文名称,例如 rag.mp4
    • 将文件移动到更浅的目录下,例如直接放在 D:\D:\videos 下。
    • 确保路径中不包含中文、空格或特殊符号(如 ?* 等)。
  2. 修改输出目录

    • 在软件主界面,点击“输出到...”按钮,将输出目录也设置为一个简短的英文路径,例如 D:\output
  3. 重新处理

    • 完成上述修改后,在软件主界面左上角勾选 清理已生成 复选框,然后重新选择处理该视频。

如果问题依旧,请尝试以下高级选项调整:

  1. 在菜单栏选择 工具/选项 -> 高级选项
  2. 视频输出控制 区域:

    • 264/265编码265 改回 264libx265 编码在某些情况下兼容性可能稍差)。
    • 尝试取消勾选 视频合成优先硬编码,强制使用软件编码。
  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