I've got a 720p video file that is about 20 minutes long. I want to compose each frame in the video using a single operator (e.g. lighten, darken, etc.) to produce a single image output.
My thought was that I could use Imagemagick's convert function to do this, using something like this:
convert video.mp4 -compose Lighten output.jpg
But after running for a few minutes it runs out of memory (and I've got a lot of memory and I've set policy to allow most of it to be used). Under the hood it appears to be calling ffmpeg, but whatever is happening it seems to be very inefficient, requiring tens of gigabytes of RAM for what should be loading a couple 720p frame into RAM at a time (one for the composite, and one for the new frame).
What's a quicker and more efficient way to compose video into an image?