C
C
che_aa2020-07-09 20:57:21
Python
che_aa, 2020-07-09 20:57:21

How to use ffmpeg moviepy on hosting?

I have code:

from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
url = 'url'
ffmpeg_extract_subclip(url, 20, 30, targetname="audio.mp4")

It works on my machine, but on the hosting it throws an error:
"No ffmpeg exe could be found. Install ffmpeg on your system, "
RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.

Googling, I added to the code:
import os
os.environ["FFMPEG_BINARY"] = '/var/www/u000000/data/project/bin/f2py3' #Вместо u000000 мой айди, так что проблема не в этом 

from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
url = 'url'
ffmpeg_extract_subclip(url, 20, 30, targetname="audio.mp4")

The path is exactly normal, maybe I'm using the wrong file?
Moreover, it does not give an error, it simply does not cut or resume the file, that is, technically it works, but nothing happens.
Having checked empirically, I found that moviepy downloads the following files to bin:
chardetect
f2py
f2py3
f2py3.7
imageio_download_bin
imageio_remove_bin
tqdm


f2py
f2py3
f2py3.7 I checked, it still doesn't work. How can this be fixed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2020-07-09
@dimonchik2013

do as requested

Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.

M
milssky, 2020-07-09
@milssky

why didn't they look on github?
https://github.com/Zulko/moviepy/issues/1158

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question