#7620 合并阶段出错 最后一步字幕配音嵌入时出错opening input: Invalid data found when processing input opening input file novoice.mp4. opening inpu

203.10**4 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\util\_ffmpeg_runner.py", line 49, in runffmpeg

File "subprocess.py", line 526, in run

subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-nostdin', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'compose1790322156.459618.txt', '-i', 'novoice.mp4', '-i', 'will_embed.m4a', '-filter_complex', "[0:v]subtitles=filename='shuang.ass'[v_out]", '-map', '[v_out]', '-map', '1:a', '-c:v', 'libx264', '-c:a', 'copy', '-crf', '20', '-preset', 'slow', '-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 276, in _join_video_audio_srt

File "videotrans\util\_ffmpeg_runner.py", line 78, 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\job.py", line 35, in run

File "videotrans\task\job.py", line 197, in process_task

File "videotrans\task\_stage_assemble.py", line 26, in assembling

File "videotrans\task\_stage_assemble.py", line 289, 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

self.cfg=[TaskCfgVTT]当前工作模式: 翻译视频 批量翻译模式
原始输入文件名: G:/video/Karim/p08如何在UE5中为室内环境营造出电影般的灯光效果.mp4,
输出结果保存到文件夹: G:/video/Karim/_video_out/p08如何在UE5中为室内环境营造出电影般的灯光效果-mp4,
临时文件夹: F:/3ruanjian/pyVideoTrans/win-pyvideotrans-v4.12-0913/tmp/9656/ec5cac527b
未选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunjian(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+6%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入硬字幕(双) 目标语言在上双字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量1.0, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
代理地址:http://127.0.0.1:7890


=
system:Windows-10-10.0.22631-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:F:/3ruanjian/pyVideoTrans/win-pyvideotrans-v4.12-0913

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因是视频帧率不匹配导致合并失败。日志显示原始视频是 VP9 编码、可变帧率 (VFR),而输出强制使用 libx264 软编码,帧率不匹配时 FFmpeg 生成的中间文件 novoice.mp4 数据无效,导致最后一步合成时"Invalid data found"。

建议按以下方案依次尝试:

  1. 修改高级选项帧率设置
    进入 菜单 → 工具/选项 → 高级选项 → 【视频输出控制】:

    • 可变帧率vfr/固定帧率cfr:改选 固定帧率cfr(当前为 vfr,与 libx264 编码器不兼容)
    • 或先改选 265编码 试试兼容性
  2. 勾选强制软编码
    同一个面板中,勾选 强制软编码视频?,避免硬件编解码在 VP9→H264 转换时出错。
  3. 不使用"嵌入硬字幕(双)"
    日志显示你选的是 嵌入硬字幕(双),硬字幕需重新编码整个视频,帧率不匹配时极易失败。可先改为 嵌入软字幕(双) 验证是否能成功合成,若成功则说明是编码问题。
  4. 若不必要可关闭"视频慢速"
    虽然你当前未勾选,但建议同时检查是否勾选了"分离人声背景声",此操作会额外生成音频,处理链更长。
  5. 原视频重新转码为标准格式
    源视频是 4K VP9 编码,建议先用格式转换工具(如 HandBrake)转成 H.264 / MP4 / CFR 30fps 后再导入软件翻译。

若以上均无效,请提供 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