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

45.39**5 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', 'compose1792569456.242181.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
videotrans
......
', '-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/win-视频翻译pyvideotrans-v4.16/tmp/12628/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/win-视频翻译pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 2 hours ago

核心原因:不是硬件编码问题(报错日志显示已自动回退软编码 libx264,同样失败),而是 novoice.mp4 这个中间文件本身无效(moov atom not found 表示该文件为空、未完整写入或已损坏)。它是在最终合成前从原视频提取无声画面流生成的,此环节失败导致了后续所有命令都读不到这个文件。

最可能的诱因(按概率排序)

  1. 文件路径含中文、空格、特殊符号
    你的路径为 D:/Video Restoration/视频/修复/PRED-882.restored.mp4,含空格、中文目录、双后缀 .restored.mp4,ffmpeg 命令行拼接时极易解析失败或写入中断。
  2. 超长视频 + 磁盘空间不足
    该视频时长约 2.47 小时(video_duration_ms=8899099)。提取无声视频流会产生一个体积巨大的 novoice.mp4,若软件所在盘(D 盘)剩余空间不足,写入会被截断,从而产生 moov atom 缺失的残缺文件。
  3. 原视频本身或下载方式存在问题
    如果该 mp4 是从网络下载且未完整下载/未正确封装,或音视频流是分离下载后合并不完整,也会导致能播放但 ffmpeg 拆流失败。

处理步骤

  1. 将该视频移动到一个浅层、纯英文、无空格无中文的目录,并重命名为简单英文,如 D:/videos/test.mp4。
  2. 检查 D 盘剩余空间,建议预留原视频体积的 3~5 倍以上;同时手动进入 软件目录/tmp/ 清空里面的所有临时文件。
  3. 确认原视频用播放器(如 PotPlayer)从头到尾能正常播放、有声音。
  4. 主界面勾选 清理已生成,重新选择改名后的视频执行一次。
  5. 若仍报同样错误,进入 菜单 → 工具 → 高级选项 → 视频输出控制,勾选 强制软编码视频? 后再试一次(用于排除硬编码链路因素)。

若仍失败

请提供软件安装目录 logs/ 文件夹中最新日志文件的底部约 30 行(尤其是 novoice.mp4 生成阶段的 ffmpeg 命令与输出),以便定位是提取阶段失败还是磁盘写入中断。

请查阅相关文档:

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