#8487 预处理阶段出错 Command not found: ffmpeg. Ensure FFmpeg is installed and in your PATH.Traceback (most recent call last):

212.135**5 Posted at: 1 hour ago

预处理阶段出错 Command not found: ffmpeg. Ensure FFmpeg is installed and in your PATH.
Traceback (most recent call last):

File "/private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans/videotrans/util/_ffprobe.py", line 20, in _run_ffprobe_internal

p = subprocess.run(

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

with Popen(*popenargs, **kwargs) as process:

File "/Users/linbojun/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/subprocess.py", line 971, in init

self._execute_child(args, executable, preexec_fn, close_fds,

File "/Users/linbojun/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/subprocess.py", line 1863, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'

The above exception was the direct cause of the followin
......
1.6.post1/pyvideotrans/videotrans/task/job.py", line 78, in process_task

trk.prepare()

File "/private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans/videotrans/task/_stage_prepare.py", line 21, in prepare

self.video_info = get_video_info(self.cfg.name)

File "/private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans/videotrans/util/_ffprobe.py", line 52, in get_video_info

out_json = runffprobe(

File "/private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans/videotrans/util/_ffprobe.py", line 41, in runffprobe

stdout_result = _run_ffprobe_internal(cmd)

File "/private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans/videotrans/util/_ffprobe.py", line 31, in _run_ffprobe_internal

raise FFmpegError("Command not found: ffmpeg. Ensure FFmpeg is installed and in your PATH.") from e

videotrans.configure.excepts.FFmpegError: Command not found: ffmpeg. Ensure FFmpeg is installed and in your PATH.
trk=[TransCreate]: uuid='61a96a7d01', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: /Users/linbojun/Documents/EnglishPod/视频课程/未命名文件夹/1Elementary - Difficult Customer.mp4,
输出结果保存到文件夹: /Users/linbojun/Documents/EnglishPod/视频课程/_video_out/未命名文件夹/1Elementary - Difficult Customer-mp4,
临时文件夹: /private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans/tmp/20198/61a96a7d01
已选 清理已存在
未启用CUDA加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, , 数据类型:default
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕, settings.get('trans_thread')=5, settings.get('aitrans_thread')=40
输出字幕格式: 单字幕, precent=1, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=False, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=False


=
system:macOS-15.6.1-arm64-arm-64bit
version:v4.17
frozen:False
language:zh_CN
root_dir:/private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans
Python: 3.10.19 (main, Feb 12 2026, 00:36:33) [Clang 21.1.4 ]

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:你使用的是 macOS 源码部署,系统环境变量 PATH 中找不到 ffmpeg / ffprobe 可执行文件。pyVideoTrans 的预处理阶段会调用 ffprobe 读取视频信息,找不到就直接报错。

解决方案(按步骤执行):

  1. 安装 FFmpeg(macOS 官方推荐带 libx264 等完整编解码的 tap 源,而非核心版):

    brew tap homebrew-ffmpeg/ffmpeg
    brew install homebrew-ffmpeg/ffmpeg/ffmpeg
  2. 验证是否装好并能在 PATH 中找到:

    which ffmpeg
    which ffprobe
    ffmpeg -version

    若两条 which 命令都能输出版本路径,说明已就绪。

  3. 若第 2 步无输出,说明 PATH 未包含 brew 的 bin 目录,请将以下内容加入 ~/.zshrc(macOS 默认 shell)后执行 source ~/.zshrc:

    export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"

    你的是 Apple Silicon(arm64),brew 默认安装到 /opt/homebrew/bin。

  4. 关闭并重新启动 pyVideoTrans(必须重启进程才能重新读取 PATH)。
  5. 补充提醒:你的项目路径位于 /private/tmp/pynini-fix/pynini-2.1.6.post1/pyvideotrans,这是系统临时目录,非常容易在系统重启或清理后被删除,导致后续运行集体报错。强烈建议将源码克隆到普通用户目录(如 ~/pyvideotrans)后再 uv sync 启动。
  6. 另注意:你选择的翻译渠道为 Google(免费),在中国大陆需科学上网,需在主界面对齐控制行右侧的「网络代理」填写 http://127.0.0.1:端口,否则后续翻译阶段还会失败。

请查阅相关文档:

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