anim.tools.images2video#

anim.tools.images2video(imagePatern, fps, videoName, crf=24, vcodec='libx264', pix_fmt='yuv420p', ffmpeg_log=False)[source]#

convert images into mp4 video

Parameters:
  • imagePatern (str) – patern where to find images. For example ‘/tmp/img_%03d.png’

  • fps (int) – frames per seconds for the video

  • videoName (str) – video name. If the folder doesn’t exist, create it

  • vcodec (str) – video codec to use. If x265 is installed its better, but its not always installed.

  • crf (str) – I don’t remember… Its something for the quality, but its works well 0 : high quality, 51: bad quality, 20 by default, and starting at 18 we don’t see differences

  • pix_fmt (str) – pixel format. I don’t remember but its OK. If you don’t specify yuv420p, you cannot read your video into the webbrowser

  • ffmpeg_log (bool) – print all ffmpeg logs. If not specified, run ffmpeg with -loglevel quiet