

I know I can SIGINT the process and it will cleanly close the file - that can work, but I'd like to batch this up and run it overnight, rather than babysitting it. If there was a fancy way to put all of this into one giant filter chain and output 12 different files at different frame rates, I would only have to churn through the file once. What's the smarter way to do this? I have 12 or so consecutive sections of the file that are at different frame rates. That is, ffmpeg doesn't cleverly parse the "select" filter to realize that it can stop encoding after 100 frames and just close out the file - instead, it churns through all the remaining frames.

The issue I'm having is that the "select" filter seems to work, but (understandably) ffmpeg correctly stops encoding at 100 frames and then needs to read every remaining frame just to check the "select" filter, which takes ~30m for this file (if my estimate is correct). Ffmpeg -r 24 -i input.avi -vf 'select=gte(n\,0)*lt(n\,100),setpts=PTS-STARTPTS' -c:v libx264 -b:v 40000k -preset veryslow -profile:v high444 output.mp4
