I'm converting videos into python and I'm using the moviepy library. I'm using the instructions:
clip = VideoFileClip('/home/developer/Pictures/aa.mov')
clip.write_videofile('/home/developer/Pictures/aa.mp4')
And it is working perfectly, however as my application does not receive the image via path file I am having difficulty converting the file. In case I'm trying to load the file into memory and convert it:
img = open('/home/developer/Pictures/aa.mov','rb').read()
clip = VideoFileClip(img)
clip.write_videofile('/home/developer/Pictures/aa.mp4')
[1] TypeError: 'str' object is not callable
This does not work because VideoFileClip
only accepts the image path, is there any way to convert the video by loading the video into memory?