FFMPEG und Python machen Video aus PIL-Image-ObjektenPython

Python-Programme
Anonymous
 FFMPEG und Python machen Video aus PIL-Image-Objekten

Post by Anonymous »

Ich mache Videos von PNG-Images mit FFMPEG und es funktioniert gut.

Code: Select all

def make_video():
subprocess.call([
'ffmpeg',
'-framerate', str(some_integer), # frame rate of input images, calculated
'-i', '/path/to/images/name-*.png',
'-c:v', 'libx264', # mp4 lib
'-crf', '20',
'-pix_fmt', 'yuv420p',
'-r', '60', # frame rate of output video
vid_path, # path of output video
'-y', # overwrite without asking
])
< /code>
Dies nimmt die nummerierten Bilder auf und steckt sie in das Video. Wie gesagt: funktioniert einwandfrei. 
Bevor Sie dies tunim.save(img_path) # where im is PIL.Image object
Manchmal über 100.000 Bilder!>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post