#4444 TaskCfgSTT(is_cuda=True, uuid='781f37eaaf', cache_folder='E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf', target_di

129.128* Posted at: 1 hour ago 👁5

预处理阶段出错 opening output file E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf/5-1778045431.0024555.wav. opening output files: Invalid argument
Traceback (most recent call last):
File "videotrans\util\help_ffmpeg.py", line 57, in runffmpeg
File "subprocess.py", line 526, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-hide_banner', '-nostdin', '-ignore_unknown', '-threads', '0', '-y', '-i', 'F:/Zge/5.mp4', '-ac', '1', '-ar', '16000', '-c:a', 'pcm_s16le', '-af', 'volume=2.0,alimiter=limit=1.0', 'E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf/5-1778045431.0024555.wav']' returned non-zero exit status 4294967274.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 61, in run
File "videotrans\task\_speech2text.py", line 54, in prepare
File "videotrans\util\help_ffmpeg.py", line 467, in conver_to_16k
File "videotrans\util\help_ffmpeg.py", line 86, in runffmpeg
RuntimeError: opening output file E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf/5-1778045431.0024555.wav. opening output files: Invalid argument
TaskCfgSTT(is_cuda=True, uuid='781f37eaaf', cache_folder='E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf', target_dir='E://recogn', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='E://recogn/5.srt', target_wav=None, target_wav_output=None, name='F:/Zge/5.mp4', noextname='5', basename='5.mp4', ext='mp4', dirname='F:/Zge', shound_del_name=None, detect_language='zh-cn', recogn_type=2, model_name='1.7B', shibie_audio='E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf/5-1778045431.0024555.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.99
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.99-428

1 Replies

该错误是由于 FFmpeg 输出路径中的临时文件名包含多个小数点或路径过长,导致操作系统或 FFmpeg 解析参数时出现“Invalid argument”。

原因分析

  • 日志中生成的临时文件名 5-1778045431.0024555.wav 含有多个小数点,可能被 FFmpeg 错误解释。
  • 整个临时文件路径 E:/win-pyvideotrans-v3.99-428/tmp/33532/781f37eaaf/... 嵌套层级深、总长度长,Windows 命令行对路径长度敏感,易触发无效参数错误。
  • 输入视频路径 F:/Zge/5.mp4 虽短,但软件内部构造输出路径时仍可能因过长而失败。

解决步骤

  1. 移动输入视频:将视频文件放入一个极短路径,如 D:\videos\5.mp4(避免中文和特殊符号)。
  2. 移动软件目录:将整个 pyVideoTrans 目录移至根目录,例如 D:\pyVideoTrans(路径仅含英文和数字,减少目录深度)。
  3. 清理缓存:删除软件目录下的 tmp 文件夹全部内容,避免旧缓存干扰。
  4. 重新启动软件:使用移动后的路径重新导入视频,执行语音识别。

若仍有问题,可尝试在任务配置中手动指定输出目录(如 D:\output)并在高级选项中将“视频输出质量控制”等保持默认。

请查阅相关文档:

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.

Related resource