#8054 最后一步字幕配音嵌入时出错submitting a packet to the muxer: Invalid argument muxing a packetTraceback (most recent call last): File

120.217**0 Posted at: 1 hour ago

最后一步字幕配音嵌入时出错submitting a packet to the muxer: Invalid argument muxing a packet
Traceback (most recent call last):
File "videotrans\util\_ffmpeg_runner.py", line 48, in runffmpeg
File "subprocess.py", line 526, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-nostdin', '-ignore_unknown', '-y', '-progress', 'compose1791875533.8509054.txt', '-i', 'novoice.mp4', '-i', 'will_embed.m4a', '-i', 'end.srt', '-map', '0:v', '-map', '1:a', '-map', '2:s', '-c:v', 'copy', '-c:a', 'copy', '-c:s', 'mov_text', '-metadata:s:s:0', 'language=zho', '-movflags', '+faststart', 'laste_target.mp4']' returned non-zero exit status 4294967274.

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

Traceback (most recent call last):
File "videotrans\task\_stage_assemble.py", line 207, in _join_video_audio_srt
File "videotrans\util\_ffmpeg_runner.py", line 77, in runffmpeg
videotrans.configure.excepts.FFmpegError: submitting a packet to the muxer: Invalid argument muxing a packet

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

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 165, in run
File "videotrans\task\_stage_assemble.py", line 26, in assembling
File "videotrans\task\_stage_assemble.py", line 256, in _join_video_audio_srt
videotrans.configure.excepts.VideoTransError: 最后一步字幕配音嵌入时出错submitting a packet to the muxer: Invalid argument muxing a packet

trk=[TransCreate]: uuid='3b6d5496f6', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: E:/La Ruee Vers Laure(Amnesia) 1996.mp4,
输出结果保存到文件夹: E:/_video_out/La Ruee Vers Laure(Amnesia) 1996-mp4,
临时文件夹: D:/My Softwares/Pyvideotran 4.16/tmp/9044/3b6d5496f6
已选 清理已存在
已启用CUDA加速
已选 降噪
已选 识别说话人,最大说话人数量不限制
语音识别:faster-whisper(内置), large-v3, 发音语言: 法语,
翻译渠道:Google(免费),原始语言:法语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入软字幕 , precent=95, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='D:/My Softwares/Pyvideotran 4.16/tmp/9044/3b6d5496f6/remove_noise.wav', should_recogn2=False, do_diarize=True
video_duration_ms=6171066

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 ffmpeg 在最后封装 MP4 时,尝试以“流复制”(copy)方式写入音频包失败导致的,核心原因是音频流的时间戳或编码参数与 MP4 容器要求不兼容(例如降噪/分离处理后音频时间基异常,或路径中的空格/括号引发底层参数解析问题)。

解决方案

  1. 重命名为纯英文简短路径:将视频文件名改为不含空格、括号的简单名称(如 E:/video1996.mp4),输出文件夹也避免特殊字符,然后重试。
  2. 清空临时目录后重试:关闭软件,删除软件根目录 tmp/ 文件夹内的所有内容,再重新执行任务。
  3. 强制重新编码音频:进入 菜单 → 工具/选项 → 高级选项 → 视频输出控制,在 自定义ffmpeg命令参数 中添加 -c:a aac -b:a 160k,保存后重试。这会覆盖原有 -c:a copy,避免复制异常音频包。
  4. 改用更宽容的容器格式:在同一高级选项页面,将 输出视频格式 改为 mkv(MKV 对时间戳/编码的容错性更好),然后重试。
  5. 关闭预处理选项:若仍失败,可取消勾选主界面“设置更多参数”中的 降噪 或 分离人声背景声,因为处理后的音频可能导致时间轴异常。

如果以上方法均无效

暂无法确定唯一原因,请提供软件安装目录下 logs/ 文件夹中最新日志文件(复制底部约 30 行报错信息),我将进一步分析。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource