Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

when using moviepy In firebase functions OSError: MoviePy error: failed to read the duration of file

Hi, when I'm processing mp4 file(in firebase functions) using moviepy the error occured.the next is the code(python) I'm using and give me the answer

when using the code locally, everything is fine, but using it in the server(firebase cloud functions), the error occured.

 

from moviepy.editor import *
url = '<my_firebase_storage_path>/videos%2Fmy_file.mp4?alt=media&token=<my_token>'
VideoFileClip(url) # In this code error occured.
3 1 710
1 REPLY 1

Hello @imemine,

The local environment is different from the Firebase environment, make sure that you configured your Firebase to use moviepy. Take a look at this Stack overflow post as it provides the steps and format on how you can use VideoFileClip in Firebase. 

If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!