Ffmpeg generated video kept inserting frame1 into the video incorrectly

my ffmpeg output code

ffmpeg -framerate 50 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p out.mp4

file structure


many but only frames…

repl link: https://replit.com/@s3D27ZHOU/project

code for generating frames is in project.py, line254

pg.image.save(engine.runtime.runtime.display.screen, f"{save_loc}/frame{frame}.jpeg")

output video: flashing warning

neither is output screen (engine.runtime.runtime.display.screen in my case) nor output frame inserts those jumps, but in result there are sudden inserts of frame1.jpeg somehow

1 Like

nevermind ffmpeg sort the order by string not number I fixed it by adding a bunch of 0s as padding

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.