mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2024-11-22 03:46:21 +03:00
feat: convert images to video
This commit is contained in:
parent
efcd1ccbac
commit
5b33b2cd66
2 changed files with 12 additions and 0 deletions
11
processing/bulk.py
Normal file
11
processing/bulk.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
from PIL import Image, ImageFilter
|
||||||
|
import ffmpeg
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
def images_to_video(directory, fps):
|
||||||
|
glob_path = os.path.join(directory, "*.png")
|
||||||
|
video_path = os.path.join(directory, "video.mp4")
|
||||||
|
|
||||||
|
ffmpeg.input(glob_path, pattern_type="glob",
|
||||||
|
framerate=fps).output(video_path).run()
|
|
@ -1,3 +1,4 @@
|
||||||
|
ffmpeg_python==0.2.0
|
||||||
gradio==3.27.0
|
gradio==3.27.0
|
||||||
Pillow==9.5.0
|
Pillow==9.5.0
|
||||||
tqdm==4.65.0
|
tqdm==4.65.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue