I read several similar posts on this subject, but no one seems to be helping me directly. If this is actually a duplicate of the message, please direct me to the stream containing the solution!
I save a bunch of images and then call ffmpeg on them using subprocess.call. I do this several times for collections of different images. This is basically what I am doing:
from subprocess import call for video in videos: call(['ffmpeg', ..., '-i', video, video+'.mp4')])
In isolation, this works great. However, when I also have some other processing done before these calls (not in a loop, literally just storing the values ββin memory until the start of the loop), it crashes with a memory error after I made some videos (actually, making the last one) . According to this comment , subprocess.call forks / clones the current process, which apparently means that it is requesting a memory allocation equal to how much I currently have in memory, which seems to be too complicated for what I want to do when calling ffmpeg.
How can I call ffmpeg from within python without asking to allocate unnecessary amounts of memory?
source share