1👍
After spending lots of time and trying lots of things, I have finally solved this issue.
We can pass full path of temp video along with it’s name, then it will create temp video at given path. Make sure you have write permissions on directory which you are going to set for temp video.
5👍
There exist a
temp_audiofile
parameter in the write_videofile function that by defaults creates a temporary directory to store the mp3 file of the video. Moviepy attempts to create the directory in a random location that most likely doesn’t have write and execute permission for non-root users, hence the permission denied complaints. Simply
chmod -R 777 <directory of your choice(preferably tmp)>
in the terminal, then pass the absolute path of that directory accompanied with a made up file name to temp_audiofile parameter like this
final_clips.write_videofile(abs_path, temp_audiofile=/tmp/random_name.mp3)
That should fix the permission denied issue.
- [Django]-What's the best way to handle different forms from a single page in Django?
- [Django]-Django group by with variable
- [Django]-Isinstance() and type() equivelence failure due to import mechanism (python/django)