
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
