问题
I'm using FFmpeg to join many short clips into a single long video using the concat
filter. FFmpeg seems to load all clips into memory at once and quickly runs out of RAM (For 100 clips it eats over 32GB). Is there a way to limit the memory used by the concat filter?
The command I would use for 3 inputs is as follows:
ffmpeg -i 0.mp4 -i 1.mp4 -i 2.mp4 -filter_complex "[0:v][0:a][1:v][1:a][2:v][2:a]concat=n=3:v=1:a=1" out.mp4
It seems to use around 200MB per additional input, which quickly uses all the memory in my system.
来源:https://stackoverflow.com/questions/60199327/ffmpeg-concat-filter-high-memory-usage