[FFmpeg-user] Converting a video to a set of images from specific frames while cropping each frame differently

Media Mouth communque at gmail.com
Tue Jun 6 19:07:47 EEST 2023



> On Jun 6, 2023, at 08:24, Matt Groth <mgroth49 at gmail.com> wrote:
> 
> @Media Mouth, thanks for the idea. I actually would prefer python if that is possible. I just don’t know how to do it. My understanding is that the python package for ffmpeg is just a wrapper for the command line. So any limitations from the command line I thought would also exist in python.
> 
> I’m just like you, I actually avoid shells whenever possible. I started by trying the java bindings for ffmpeg since kotlin is my preferred language but the ffmpeg java library was problematic. And like I said above, I figured python was just a thin wrapper.

Exactly -- thin wrapper -- literally just using (in your case Python or Java, my pref is JS) to run ffmpeg, and then grab the resulting frames and run the crops.
The value added is that you're using the coding logic to keep your process coherent and well-managed.
Is your end result a video or a bunch of stills?  My understanding was not knowing how to get ffmpeg to do the cropping, hence the idea of using sips or imagemagick etc. to take care of that part, and a coding language to manage the overall process.


More information about the ffmpeg-user mailing list