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

111.243.**6 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 "/Users/a1-6/Downloads/pyvideotrans-main/videotrans/util/_ffmpeg_runner.py", line 49, in runffmpeg

subprocess.run(

File "/Users/a1-6/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/subprocess.py", line 526, in run

raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-nostdin', '-ignore_unknown', '-threads', '0', '-y', '-progress', 'compose1786011854.5234408.txt', '-i', 'novoice.mp4', '-i', 'will_embed.m4a', '-i', 'end.srt', '-map', '0:v', '-map', '1:a', '-map', '2:s', '-c:v', 'copy', '-c:a', 'copy', '-c:s', 'mov_text', '-metadata:s:s:0', 'language=zho', '-movflags', '+faststart', '-fps_mode', 'vfr', '-shortest', 'laste_target.mp4']' returned non-zero exit status 183.

The above ex
......
cmd2, cmd_dir=self.cfg.cache_folder, force_cpu=True)
File "/Users/a1-6/Downloads/pyvideotrans-main/videotrans/util/_ffmpeg_runner.py", line 78, in runffmpeg

raise FFmpegError(err) from e

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 "/Users/a1-6/Downloads/pyvideotrans-main/videotrans/task/only_one.py", line 125, in run

trk.assembling()

File "/Users/a1-6/Downloads/pyvideotrans-main/videotrans/task/_stage_assemble.py", line 26, in assembling

self._join_video_audio_srt()

File "/Users/a1-6/Downloads/pyvideotrans-main/videotrans/task/_stage_assemble.py", line 291, in _join_video_audio_srt

raise VideoTransError(tr('Error in embedding the final step of the subtitle dubbing')+str(e)) from e

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

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: /Users/a1-6/Desktop/油管下载/02.webm,
输出结果保存到文件夹: /Users/a1-6/Desktop/油管下载/_video_out/02-webm,
临时文件夹: /Users/a1-6/Downloads/pyvideotrans-main/tmp/65726/cf098057e8
已选 清理已存在
未选 启用CUDA加速
已选 降噪
已选 识别说话人,最大说话人数量2
语音识别:faster-whisper(本地内置), model_name: large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Confucius-TTS(本地内置), 角色:clone, 配音语言:简体中文, 已选 二次语音识别
音量:+0%, 语速:-10%, 未选 音频加速, 已选 视频慢速
字幕: 嵌入软字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
代理地址:http://127.0.0.1:7897


=
system:macOS-15.7.4-arm64-arm-64bit
version:v4.06
frozen:False
language:zh
root_dir:/Users/a1-6/Downloads/pyvideotrans-main
Python: 3.10.19 (main, Feb 12 2026, 00:36:33) [Clang 21.1.4 ]

1 Replies

这是 ffmpeg 在最终合成阶段无法读取 novoice.mp4(从原视频分离出的无声视频流文件)导致的,通常有三种可能:

  1. 路径中含中文或特殊字符:你的输入路径 /Users/a1-6/Desktop/油管下载/02.webm 和输出路径都包含中文“油管下载”,以及临时目录中包含特殊字符。ffmpeg 对这类路径兼容性较差,容易在解析时出错。
  2. novoice.mp4 文件未生成或已损坏/为空:它应该位于临时目录 /Users/a1-6/Downloads/pyvideotrans-main/tmp/65726/cf098057e8 下。若文件不存在或大小为 0,则说明预处理阶段分离失败,或已被“清理已存在”/中断操作清除。
  3. 源视频编码不被 ffmpeg 支持:输入是 .webm 格式,某些 webm 的视频流(如 VP9/AV1)可能导致视频流提取失败,从而生成无效的 novoice.mp4

解决步骤

  1. 改用纯英文路径和文件名:将视频和输出目录改为类似 /Users/a1-6/Desktop/test/02.webm 的形式,确保无中文、空格、特殊符号,再重新执行。
  2. 检查临时目录:先删除旧的 _video_out/02-webm 缓存,重试时不要勾选“清理已存在”,让软件保留中间文件;完成后查看临时目录中 novoice.mp4 是否存在且大小正常。
  3. 切换源视频格式:如果仍失败,先用格式转换工具(如 ffmpeg 或 HandBrake)将 webm 转为标准 H.264/MP4 格式,再导入软件翻译。
  4. 关闭“视频慢速”:该选项会生成大量临时切片,较易触发边界问题,可暂时关闭,仅用“音频加速”对齐。

若以上仍无法解决,请提供软件安装目录下 logs/ 文件夹中最新日志的后 30 行,以及软件左上角完整版本号(当前日志显示 v4.06)以便进一步分析。

请查阅相关文档:

Post Your Reply
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

Dondate via PayPal

Related resource