shell github操作ffmpeg gem找不到ffprobe

nbysray5  于 2022-11-16  发布在  Shell
关注(0)|答案(1)|浏览(149)

因此,我们一直在使用一个名为streamio-ffmpeg的gem,它运行得很好。我们一直在使用github actions来集成和测试前端的E2 E。我们还必须为另一个依赖项添加python。现在,当我们在github actions上运行E2 E套件时,streamio-ffmpeg找不到ffprobe二进制文件,因为python也安装在actions runner上。
我们会得到以下消息:

Body: Puma caught this error: No such file or directory - the ffprobe binary could not be found in /home/runner/work/folder_name/another_folder_name/server/vendor/bundle/ruby/2.7.0/bin:/opt/hostedtoolcache/Python/3.10.8/x64/bin:/opt/hostedtoolcache/Python/3.10.8/x64:/opt/hostedtoolcache/Ruby/2.7.6/x64/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games (Errno::ENOENT)

并且Streamio-FFMPEG表示:

Specify the path to ffmpeg
By default, the gem assumes that the ffmpeg binary is available in the execution path and named ffmpeg and so will run commands that look something like ffmpeg -i /path/to/input.file .... Use the FFMPEG.ffmpeg_binary setter to specify the full path to the binary if necessary:

FFMPEG.ffmpeg_binary = '/usr/local/bin/ffmpeg'

那么,我如何才能找到ffprobe二进制文件在哪里,并告诉github actions这个信息??我已经尝试在github actions runner中手动安装ffmpeg,但这没有帮助。

5t7ly7z5

5t7ly7z51#

下面是我如何使用FedericoCarboni/setup-ffmpeg

steps:
      ...
      - name: Set up FFmpeg
        uses: FedericoCarboni/setup-ffmpeg@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

然后,我的软件包ffmpegio从系统路径中获得了ffmpegffprobe,没有任何问题。

相关问题