

This will convert images named like set00001.jpg, crops to 2500x1900 first, then scales the video to 1920x1459 (keeping aspect with -1, or calculate if you need the pad filter by using 1920/(orig-x/orig-y)) and finally pads the video with black borders to make it fit 1920x1080 (the y offset is (1920-1459)/2 = 230) sws_flags lanczos picks the algorithm for scaling, i think lanczos is the best for this. See the filters documentation, you'll need the crop=x:y:xoffset:yoffset and scale=x:y and pad ones i think. Anyone want to help me out with this? I'm a little green on command line and FFMPEG but I can usually follow the logic when I use it.ĮDIT: forgot to mention I would want to first perform a scale operation on each image such that it fills an HD frame but preserves all pixels horizontally from edge to edge and then ceases scaling at that point thus leaving excess pixels at the top and bottom which would be eliminated by cropping.

I've never used FFMPEG for image sequences before but it occurs to me it could be an efficient means in future. It may be necessary however to initially figure out a number pixels by which to offset the output frame in case important details are happening in the top or the bottom are lost in the output, that's something I'd need to know how to do too but to start with I'll assume we can just lop off the top and bottom equally.

For simplicity's sake I would initially try do this by simply cropping an equal amount of pixels from both the top and bottom of each frame essentially leaving us with an image only of the middle portion of each image in a 16:9 ratio. Given the different aspect ratios and frame sizes, of the input from the output, I would expect it would be necessary to crop the the input images during the process of creating the video file as that would be preferable to distorting the images to fit a different aspect ratio. I have thousands of sequentially named JPEG images for use in creating a timelapse for HD video.
