video processing – Is there a way to tell ffmpeg certain images are I-frames
I was thinking a lot about continuous zoom animation. One way to do this is to generate each frame as png and then dump it into ffmpeg and get video.
If I want to cut down on processing time, I was thinking I could generate every n-frames (let’s say in this case every 4 frames as an example). Then the in-between frames I’d just crop and resize that initial frame.
So essentially I have an “artificial” GOP (for lack of a better name) so my first artificial GOP:
- 0.png – fully rendered image (keyframe)
- 1.png – crop and zoom of 0.png
- 2.png – crop and zoom of 1.png
- 3.png – crop and zoom of 2.png
My second artificial GOP:
- 4.png – fully rendered image (keyframe)
- 5.png – crop and zoom of 4.png
- 6.png – crop and zoom of 5.png
- 7.png – crop and zoom of 6.png
Rinse repeat until end of video.
My question here would be is there a way to tell ffmpeg or some other tool that every 4th frame are actual I-frames, and probably shouldn’t be touched.
The idea being that if I want to extend the size of my artificial GOP as much as possible without losing too much detail I’d like to tell ffmpeg to not make an I-frame out of a lossy (cropped and zoomed) pngs.
Read more here: Source link
