Is it possible to write video or audio file in current directory using moviepy in Azure Functions

Harish Gavel 1 Reputation point
2021-11-24T17:04:52.417+00:00

I want to use moviepy to concatenate videos in azure functions, even though it is running locally but after it is deployed to azure functions its giving error that functions have read only access.

I used below code: final_clip.write_videofile('finalvideo.mp4',codec='libx264', audio_codec='aac', temp_audiofile='temp-audio.m4a')

And when I used the following codes: final_clip.write_videofile('/tmp/finalvideo.mp4',codec='libx264', audio_codec='aac', temp_audiofile='/tmp/temp-audio.m4a')

logs
152247-image.png

console logs expanded
152352-image.png

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,933 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2021-11-26T05:17:27.263+00:00

    @Harish Gavel ,

    Thanks for reaching out to Q&A.

    Azure Functions is sanboxed environment. Applications are highly restricted in terms of their access of the file system.

    Please look into File system restrictions and considerations . I would highly recommend you to use a Blob storage account to read and write files using the blob storage bindings available in Azure Functions. You can also take a look at the python sample for reference

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.