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

2408**9e86 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 400, in _subprocess
File "subprocess.py", line 526, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-nostdin', '-y', '-progress', 'compose1791642351.431363.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', '-shortest', '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 250, in _join_video_audio_srt
File "videotrans\task\_stage_assemble.py", line 412, in _subproces
......
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 257, 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='ac54c1dad7', proxy_str='http://127.0.0.1:22307', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: Z:/迅雷下载/[email protected]4,
输出结果保存到文件夹: Z:/迅雷下载/翻译/javkok.com@NMSL-046-4k-mp4,
临时文件夹: D:/win-pyvideotrans-v4.15/tmp/27044/ac54c1dad7
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3, 发音语言: 日语,
翻译渠道:Google(免费),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:22307, precent=95, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, video_time=7218812, video_info={'video_fps': 59.94005994005994, 'r_frame_rate': 59.94005994005994, 'video_codec_name': 'vp9', 'audio_codec_name': 'aac', 'width': 3840, 'height': 2160, 'time': 7218812, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', cost_duration=1791640359.3418434, should_recogn2=False, do_diarize=True
trk.cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: Z:/迅雷下载/[email protected]4,
输出结果保存到文件夹: Z:/迅雷下载/翻译/javkok.com@NMSL-046-4k-mp4,
临时文件夹: D:/win-pyvideotrans-v4.15/tmp/27044/ac54c1dad7
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3, 发音语言: 日语,
翻译渠道:Google(免费),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:22307
video_duration_ms=7218812


=
system:Windows-10-10.0.26300-SP0
version:v4.15
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.15

1 Replies

#1 DeepSeek reply at 59 minutes ago

核心原因:novoice.mp4(预处理阶段拆分出的无声视频流文件)在写入时未完整生成,FFmpeg 读取时找不到 moov atom,因此判定该文件为无效数据。注意此处硬编码和软编码两次尝试均在同一处失败,说明问题在输入文件本身,而非编码器。

结合日志,你的视频存在三个高风险点:

  • 源视频编码是 vp9(video_codec_name: 'vp9'),而扩展名是 mp4,属于非标准封装;
  • 分辨率 3840x2160、59.94fps,且未勾选视频慢速情况仍需重编码(is_copy_video=False),中间文件极大;
  • 源文件与输出在 Z:/迅雷下载/(路径含中文和 @ 特殊字符),临时目录在 D:/,若 D 盘剩余空间不足或写入中断,就会生成这种残缺 mp4。

处理步骤:

  1. 先解决空间与路径

    • 检查 D 盘剩余空间(4K 素材的中间文件可能达数十 GB),不足请清理;并手动清空软件目录下的 tmp/ 文件夹内所有残留切片。
    • 把源视频复制到浅层纯英文路径,例如 D:/videos/001.mp4,文件名不要带 @、中文、空格。
  2. 先转码为规范 H.264/MP4 再翻译

    • 打开 菜单 → 工具/选项 → 音视频格式转换,将该 vp9 文件转为标准 H.264 + AAC 的 mp4,再把转好的文件导入翻译。VP9 封装成 mp4 在流复制/切片阶段极易出错。
  3. 关闭易出错的合成选项

    • 菜单 → 工具/选项 → 高级选项 → 视频输出控制:

      • 勾选 强制软编码视频?;
      • 取消勾选 视频合成cuda硬解码(该选项本身易出错)。
  4. 重试

    • 回到主界面,勾选 清理已生成,重新执行。

若按上述步骤(尤其第 2 步转码)后仍在同一位置报错,请提供软件安装目录下 logs/ 文件夹中最新的日志文件底部约 30 行内容,以及 D 盘当时的可用空间,以便进一步判断。

请查阅相关文档:

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