#8381 最后一步字幕配音嵌入时出错opening input: Invalid data found when processing input opening input file novoice.mp4. opening input files

36.22**2 Posted at: 2 hours ago

最后一步字幕配音嵌入时出错opening input: Invalid data found when processing input opening input file novoice.mp4. opening input files: Invalid data found when processing input
Traceback (most recent call last):
File "videotrans\task\_stage_assemble.py", line 404, in _subprocess
File "subprocess.py", line 526, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-nostdin', '-y', '-progress', 'compose1792678819.1658504.txt', '-i', 'novoice.mp4', '-i', 'will_embed.m4a', '-filter_complex', "[0:v]subtitles=filename='end.ass'[v_out]", '-map', '[v_out]', '-map', '1:a', '-c:v', 'h264_nvenc', '-c:a', 'copy', '-cq', '23', '-preset', 'p7', '-movflags', '+faststart', 'laste_target.mp4']' returned non-zero exit status 3199971767.

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

Traceback (most recent call last):
File "videotrans\task\_stage_assemble.py", line 248, in _join_video_audio_srt
File "videotrans\task\_stage_assemble.py", line 416, in _subprocess
videotran
......
'-movflags', '+faststart', 'laste_target.mp4']' returned non-zero exit status 3199971767.

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

Traceback (most recent call last):
File "videotrans\task\_stage_assemble.py", line 253, in _join_video_audio_srt
File "videotrans\util\_ffmpeg_runner.py", line 77, in runffmpeg
videotrans.configure.excepts.FFmpegError: opening input: Invalid data found when processing input opening input file novoice.mp4. opening input files: Invalid data found when processing input

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: 最后一步字幕配音嵌入时出错opening input: Invalid data found when processing input opening input file novoice.mp4. opening input files: Invalid data found when processing input

trk=[TransCreate]: uuid='2276626f94', proxy_str='http://127.0.0.1:10809', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/Administrator/Desktop/新建文件夹 (2)/ja.mp4,
输出结果保存到文件夹: C:/Users/Administrator/Desktop/新建文件夹 (2)/_video_out/ja-mp4,
临时文件夹: C:/baidunetdiskdownload/win-pyvideotrans-v4.16/tmp/28676/2276626f94
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 日语,
翻译渠道:Google(免费),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
已选 仅输出mp4
代理地址: http://127.0.0.1:10809, precent=95, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=10614950


=
system:Windows-10-10.0.26200-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:C:/baidunetdiskdownload/win-pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 2 hours ago

核心原因:预处理阶段生成的无声视频 novoice.mp4 是空文件或写入不完整(moov atom not found 表示该 MP4 缺少关键索引结构),因此最后合并阶段无法读取它。这通常由磁盘空间不足、路径含中文/空格/括号,或超长视频处理中断导致。


1. 立即排查磁盘空间(最可能原因)

你的输入视频时长约 1061 万毫秒,约 2.95 小时,临时目录位于 C 盘:
C:/baidunetdiskdownload/win-pyvideotrans-v4.16/tmp/...

长视频 + 硬字幕重编码 + 3 小时素材,中间切片极易占满 C 盘。

  • 打开 C 盘,确认剩余空间是否 ≥ 20GB(3 小时视频建议 ≥ 50GB)。
  • 若不足:进入软件目录 tmp/ 文件夹,清空里面的临时切片。
  • 建议把软件整体移动到空间充裕的盘(如 D/E 盘)再处理。

2. 修正输入文件路径

当前输入路径为:
C:/Users/Administrator/Desktop/新建文件夹 (2)/ja.mp4

包含 中文、空格、括号,这是 FFmpeg 常见的崩溃诱因。

  • 把视频移到浅层纯英文路径,例如:D:/video/ja.mp4
  • 文件名不要有空格、括号、中文、表情符号。

3. 关闭硬件编码后重试

日志显示先尝试 h264_nvenc(NVENC 硬件编码)失败,再回退 libx264 也失败。先在高级选项里规避硬件路径:

  • 菜单 → 工具 → 高级选项 → 视频输出控制
  • 勾选 强制软编码视频?
  • 取消勾选 视频合成cuda硬解码

4. 重试前务必勾选 清理已生成

否则会复用上一次已损坏的 novoice.mp4,报同样的错。


5. 若仍失败:分段处理

近 3 小时的视频,硬字幕烧录属高负载操作,建议:

  • 先用视频剪辑工具把原视频按 20~30 分钟切段;
  • 每段分别翻译,最后再合并。

6. 可选:降低画质压力

高级选项 → 视频输出控制 中:

  • 视频输出质量控制(CRF) 调到 26~28
  • 输出视频压缩率 改为 veryfast 或 medium

如果以上都排除后仍报同样错误,请提供:

  1. C 盘剩余空间截图;
  2. 软件目录 logs/ 下当天日志的最后 50 行;
  3. 原始视频的编码信息(可用 ffprobe ja.mp4 查看)。
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