3

According to this article all cloud function environments have ffmpeg.

However, running this code:

import subprocess

subprocess.Popen("ffmpeg")

... on a python310 env fails with this error:

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

Later Edit:

I ran this code in a python310 cloud function:

import subprocess

def find_ffmpeg(request):
  cmd = ['find', '/', '-name','"ffmpeg"']
  ffmpeg = subprocess.Popen(cmd, stdout=subprocess.PIPE)   
  out, err = ffmpeg.communicate()
  return out

yeah, no result.

4
  • 3
    Is the ffmpeg command in your PATH environment variable? Commented Jul 22, 2022 at 15:40
  • @JohnGordon it's a cloud function, I don't control its environment. When they say those packages are installed, I assume they're also linked to some /usr/bin path Commented Jul 22, 2022 at 15:43
  • theoretically ffmpeg should be installed and accessible without full path but better check in system /full/lpath/to/ffmpeg and use this path in subprocess. Commented Jul 22, 2022 at 19:10
  • 1
    I ran into the same issue. I downgraded to python37 runtime and now I DO have access to ffmpeg. Perhaps the latest runtime environment (erroneously for sure) doesn't have ffmpeg installed. Commented Aug 1, 2022 at 9:02

1 Answer 1

5

Due to a current issue, ffmpeg is currently not available within the python310 runtime. Your best bet is most likely to use the python39 runtime until the issue gets resolved.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.