How to creat a video with code

i got it, thanks for the information it was really helpfull
i leave the code:
cap = ScreenCapture.ScreenCaptureLogic().createVideo(30,’-codec mpeg4 -qscale 3’,‘C:/Users/aldot/Desktop/ICBM/python/img’,‘image_%05d.png’,‘vid.mp4’)