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

120.225**8 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 248, in _join_video_audio_srt
File "videotrans\task\_stage_assemble.py", line 439, in _subprocess
RuntimeError: ffmpeg version 7.1.1-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enab
......
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 95, 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='5943059635', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: F:/Blueprints in Unreal Engine 5 _ UE5 ArchViz Series Session 5.mkv,
输出结果保存到文件夹: F:/_video_out/Blueprints in Unreal Engine 5 _ UE5 ArchViz Series Session 5-mkv,
临时文件夹: E:/win-pyvideotrans-v4.17/tmp/6544/5943059635
已选 清理已存在
已启用CUDA加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 自动检测, , 数据类型:default
翻译渠道:微软(免费),原始语言:自动检测,目标语言:简体中文, 已选 发送完整字幕, settings.get('trans_thread')=5, settings.get('aitrans_thread')=1
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕 , precent=95, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, 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=10610021


=
system:Windows-10-10.0.17134-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:E:/win-pyvideotrans-v4.17

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:moov atom not found 表示临时文件夹中的无声视频 novoice.mp4 并未完整生成(文件头已写入但结尾索引缺失),即 从原视频分离视频流这一步被中断或失败,导致最后合成阶段 ffmpeg 读不到有效视频流。常见诱因:磁盘空间不足、上次任务遗留的损坏残留文件、硬件编解码(cuda/nvenc)异常。

按以下顺序处理:

  1. 清空临时残留文件
    彻底清空 E:/win-pyvideotrans-v4.17/tmp/ 文件夹内所有内容(尤其 6544 目录),删掉已损坏的 novoice.mp4。若上次任务中断,这些文件不会被自动回收。
  2. 检查磁盘剩余空间
    该视频时长约 10.6 分钟且嵌入硬字幕需完整重编码,E: 盘(临时目录所在盘)至少预留 20GB 以上空闲空间,空间不足会导致写入中断产生残缺 mp4。
  3. 关闭硬件编解码(关键)
    进入 菜单 → 工具/选项 → 高级选项 → 视频输出控制:

    • 取消勾选 视频合成cuda硬解码
    • 勾选 强制软编码视频?
      这两项是 mkv 硬解/硬编失败最常见的来源,改完后重启软件。
  4. 简化文件路径与文件名
    当前文件名 Blueprints in Unreal Engine 5 _ UE5 ArchViz Series Session 5.mkv 含空格且较长,建议重命名为 video1.mkv 并放在浅层目录(如 F:/v.mp4),避免命令行解析与路径长度问题。
  5. 重新执行
    确认勾选 清理已生成,重新选择视频开始翻译。此时会重新分离 novoice.mp4,正常情况下合成阶段可正常通过。

若按上述操作后仍报同一错误,请把 logs/ 目录下最新日志文件底部约 30 行(包含分离视频流阶段的 ffmpeg 输出)提供出来,以便判断是源视频编码特殊(如 AV1/10bit HEVC)还是环境问题。

请查阅相关文档:

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