mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2025-02-23 04:33:14 +03:00
feat: images to video
This commit is contained in:
parent
ca3d0969bc
commit
7bf970cf1b
5 changed files with 57 additions and 21 deletions
|
@ -2,16 +2,29 @@ import gradio as gr
|
|||
from processing.bulk import images_to_video
|
||||
|
||||
with gr.Blocks() as app:
|
||||
gr.Markdown("Convert images to video. # **WIP, not working**")
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
directory = gr.Text(
|
||||
placeholder="A directory with many images of the same size", lines=1, label="Directory")
|
||||
gr.Markdown("Convert images to video.")
|
||||
directory = gr.Text(
|
||||
placeholder="A directory with many images of the same size", label="Directory")
|
||||
|
||||
fps = gr.Number(label="FPS")
|
||||
submit = gr.Button("Submit")
|
||||
fps = gr.Number(label="FPS", value=30, min=0)
|
||||
|
||||
with gr.Accordion("Advanced settings", open=False) as acc:
|
||||
video_name = gr.Text(
|
||||
label="Video name", placeholder="Video name e.g. video. If not specified will be generated by time")
|
||||
video_ext = gr.Dropdown(label="Video extension", choices=[
|
||||
"mp4"], value="mp4")
|
||||
video_dir = gr.Text(
|
||||
label="Video directory", placeholder="The directory where the video will be saved. If not specified `./output/videos`")
|
||||
|
||||
img_ext = gr.Dropdown(label="Image extension", choices=[
|
||||
"png", "jpg"], value="png")
|
||||
img_name_format = gr.Text(
|
||||
label="Image name format", placeholder="ffmpeg pattern e.g. %04d is (0000.png)", value="%d")
|
||||
|
||||
submit = gr.Button("Submit")
|
||||
|
||||
submit.click(
|
||||
fn=images_to_video,
|
||||
inputs=[directory, fps],
|
||||
inputs=[directory, fps, img_ext, img_name_format,
|
||||
video_name, video_ext, video_dir],
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue