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

45.39**5 Posted at: 1 hour 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', 'compose1792570418.4873812.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
......
py', '-crf', '23', '-preset', 'slow', '-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='ff66e05a95', proxy_str='http://127.0.0.1:12450', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/Video Restoration/视频/修复/PRED-882.restored.mp4,
输出结果保存到文件夹: D:/Video Restoration/视频/修复/PRED-882.restored-mp4,
临时文件夹: D:/Video Restoration/pyvideotrans-v4.16/tmp/35988/ff66e05a95
未选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 日语,
翻译渠道:DeepSeek,原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:12450, 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=8899099


=
system:Windows-10-10.0.26300-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:D:/Video Restoration/pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:moov atom not found / Invalid data found when processing input 说明临时文件 novoice.mp4(由原视频分离出的无声视频流)是损坏或不完整的。ffmpeg 根本无法打开该输入文件,因此后续无论是 NVENC 硬编码还是 libx264 软编码都会同样失败(这一点从两次报错完全相同可以看出,问题不在编码器)。

常见诱因及处理方案:

  1. 磁盘空间不足(最常见)
    中间过程 novoice.mp4 会占用与源视频大致相当的空间。请检查源视频所在盘(D 盘)以及软件目录下的 tmp/ 所在盘剩余空间是否充足,尤其是你的路径 D:/Video Restoration/... 已接近满盘时极易产生残缺文件。清理空间后重试。
  2. 路径含中文、空格、特殊符号
    当前路径含空格和中文(D:/Video Restoration/视频/修复/)。请将视频移到浅层纯英文数字目录(如 D:/videos/001.mp4)后重试,路径过长或特殊字符会导致 ffmpeg 输出文件写入异常。
  3. 源视频容器异常(你的文件名带 .restored)
    经修复工具处理过的视频,容器/索引可能存在异常,导致分离出的 novoice.mp4 缺失 moov atom。建议先用第三方工具(或用软件 菜单-工具-音视频格式转换)将源视频重新封装为标准 H.264/MP4,再导入翻译。
  4. 关闭 ffmpeg 硬件解码/编码后重试
    进入 菜单-工具-高级选项-视频输出控制:

    • 勾选 强制软编码视频?
    • 取消勾选 视频合成cuda硬解码
      然后勾选主界面清理已生成(必须,否则会复用已损坏的 novoice.mp4 直接再次报错),重新执行。
  5. 手动清理临时目录
    关闭软件后删除软件目录下 tmp/ 内所有残留文件,避免上次失败的半成品被复用。

按上述顺序(先查空间 → 改路径 → 重封装 → 强软编并清理已生成)逐项排除,通常即可通过。

请查阅相关文档:

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