Commit
·
d66b3bb
1
Parent(s):
462d0d3
fixes
Browse files
app.py
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
from dotenv import load_dotenv
|
@@ -7,7 +17,6 @@ from tools.video_tools import (
|
|
7 |
add_text_overlay,
|
8 |
change_speed,
|
9 |
extract_audio,
|
10 |
-
add_image_overlay,
|
11 |
apply_color_filter,
|
12 |
merge_videos,
|
13 |
edit_video_segment,
|
@@ -48,12 +57,16 @@ demo = gr.TabbedInterface(
|
|
48 |
),
|
49 |
title="File Upload",
|
50 |
description="""
|
51 |
-
**
|
52 |
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
57 |
""",
|
58 |
api_name="upload_file"
|
59 |
),
|
@@ -65,24 +78,38 @@ demo = gr.TabbedInterface(
|
|
65 |
["9:16", "16:9", "1:1"],
|
66 |
label="Target Ratio",
|
67 |
value="9:16",
|
68 |
-
|
69 |
),
|
70 |
gr.Dropdown(
|
71 |
-
["pad"
|
72 |
label="Method",
|
73 |
value="pad",
|
74 |
)
|
75 |
],
|
76 |
outputs=gr.Textbox(label="Result URL"),
|
77 |
description="""
|
78 |
-
**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
84 |
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
""",
|
87 |
api_name="change_aspect_ratio"
|
88 |
),
|
@@ -103,6 +130,23 @@ demo = gr.TabbedInterface(
|
|
103 |
gr.Textbox(label="Custom Font File (Optional)", value=None, placeholder="Path to custom font file")
|
104 |
],
|
105 |
outputs=gr.Textbox(label="Result URL"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
api_name="add_text_overlay"
|
107 |
),
|
108 |
gr.Interface(
|
@@ -112,6 +156,23 @@ demo = gr.TabbedInterface(
|
|
112 |
gr.Slider(0.25, 4, value=1.0, label="Speed Factor")
|
113 |
],
|
114 |
outputs=gr.Textbox(label="Result URL"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
api_name="change_speed"
|
116 |
),
|
117 |
gr.Interface(
|
@@ -121,43 +182,69 @@ demo = gr.TabbedInterface(
|
|
121 |
gr.Dropdown(["mp3", "aac", "wav", "ogg", "flac"], label="Audio Format", value="mp3")
|
122 |
],
|
123 |
outputs=gr.Textbox(label="Result URL"),
|
124 |
-
api_name="extract_audio"
|
125 |
-
),
|
126 |
-
gr.Interface(
|
127 |
-
fn=add_image_overlay,
|
128 |
-
inputs=[
|
129 |
-
gr.Textbox(label="Video URL"),
|
130 |
-
gr.Textbox(label="Image Path"),
|
131 |
-
gr.Dropdown(
|
132 |
-
["top_left", "top_right", "bottom_left", "bottom_right", "center"],
|
133 |
-
label="Position",
|
134 |
-
value="top_right"
|
135 |
-
),
|
136 |
-
gr.Slider(0, 1, value=1.0, label="Opacity"),
|
137 |
-
gr.Slider(
|
138 |
-
1, 50,
|
139 |
-
value=15,
|
140 |
-
step=1,
|
141 |
-
label="Size (%)",
|
142 |
-
info="Size of image as percentage of video width (1-50%)"
|
143 |
-
),
|
144 |
-
gr.Number(label="Start Time (seconds, optional)", value=None),
|
145 |
-
gr.Number(label="End Time (seconds, optional)", value=None)
|
146 |
-
],
|
147 |
-
outputs=gr.Textbox(label="Result URL"),
|
148 |
description="""
|
149 |
-
**
|
150 |
|
151 |
-
|
152 |
-
- Size: Set as percentage of video width (1-50%)
|
153 |
-
- Position: Choose from 5 preset positions
|
154 |
-
- Opacity: Adjust transparency (0-100%)
|
155 |
-
- Timing: Optional start and end times
|
156 |
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
""",
|
159 |
-
api_name="
|
160 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
gr.Interface(
|
162 |
fn=apply_color_filter,
|
163 |
inputs=[
|
@@ -166,6 +253,20 @@ demo = gr.TabbedInterface(
|
|
166 |
gr.Slider(0, 1, value=1.0, label="Intensity")
|
167 |
],
|
168 |
outputs=gr.Textbox(label="Result URL"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
api_name="apply_color_filter"
|
170 |
),
|
171 |
gr.Interface(
|
@@ -175,12 +276,28 @@ demo = gr.TabbedInterface(
|
|
175 |
label="Video URLs (Python list format)",
|
176 |
placeholder='["https://url1.com", "https://url2.com"]',
|
177 |
lines=4,
|
178 |
-
info="Enter a list of video URLs to merge
|
179 |
)
|
180 |
],
|
181 |
outputs=gr.Textbox(label="Result URL"),
|
182 |
title="Merge Videos",
|
183 |
-
description="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
api_name="merge_videos"
|
185 |
),
|
186 |
gr.Interface(
|
@@ -193,6 +310,24 @@ demo = gr.TabbedInterface(
|
|
193 |
gr.Radio(["true", "false"], label="Keep Original Audio", value="true")
|
194 |
],
|
195 |
outputs=gr.Textbox(label="Result URL"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
api_name="add_audio"
|
197 |
),
|
198 |
gr.Interface(
|
@@ -202,6 +337,25 @@ demo = gr.TabbedInterface(
|
|
202 |
gr.Textbox(label="Analysis Task", value="Describe what's happening in this video")
|
203 |
],
|
204 |
outputs=gr.Textbox(label="Analysis Result"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
api_name="analyze_video"
|
206 |
),
|
207 |
gr.Interface(
|
@@ -213,66 +367,116 @@ demo = gr.TabbedInterface(
|
|
213 |
gr.Radio(["cut", "keep"], label="Action", value="keep")
|
214 |
],
|
215 |
outputs=gr.Textbox(label="Result URL"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
api_name="edit_video_segment"
|
217 |
),
|
218 |
gr.Interface(
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
gr.Slider(12, 72, value=38, step=2, label="Font Size"),
|
228 |
-
gr.Dropdown(["white", "yellow", "red", "green", "blue", "black"], value="white", label="Font Color"),
|
229 |
gr.Dropdown(["bottom-center", "top-center", "middle", "bottom-left", "bottom-right"], value="bottom-center", label="Position"),
|
230 |
gr.Textbox(label="Font Name", value="Arial", placeholder="Enter font name (e.g., Arial, Helvetica)"),
|
231 |
-
gr.Dropdown(["black", "white", "red", "green", "blue"], value="black", label="Outline Color"),
|
232 |
gr.Slider(0, 5, value=2, step=1, label="Outline Width")
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
),
|
240 |
-
title="Word-Level Subtitle Generator",
|
241 |
-
description="""
|
242 |
-
**MCP Server Tool: Add word-by-word subtitles to videos**
|
243 |
-
|
244 |
-
This tool processes videos to add precise word-level subtitles where each word appears exactly when spoken.
|
245 |
-
Perfect for creating engaging content with synchronized text overlay.
|
246 |
-
|
247 |
-
Simply paste your video URL and click Submit. Processing typically takes 1-3 minutes.
|
248 |
-
""",
|
249 |
-
examples=[
|
250 |
-
["https://example.com/sample-video.mp4", ""],
|
251 |
-
["https://example.com/another-video.mp4", "https://custom-api.com/transcribe"]
|
252 |
-
],
|
253 |
-
api_name="word_level_subtitles"
|
254 |
-
),
|
255 |
-
gr.Interface(
|
256 |
-
fn=search_audio_from_envato,
|
257 |
-
inputs=[
|
258 |
-
gr.Textbox(label="Search Query"),
|
259 |
-
gr.Slider(1, 50, value=10, step=1, label="Limit"),
|
260 |
-
gr.Dropdown(
|
261 |
-
["music", "effects"],
|
262 |
-
label="Category",
|
263 |
-
value=None,
|
264 |
-
multiselect=False
|
265 |
),
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
],
|
277 |
[
|
278 |
"Upload File",
|
@@ -280,7 +484,6 @@ demo = gr.TabbedInterface(
|
|
280 |
"Add Text Overlay",
|
281 |
"Change Speed",
|
282 |
"Extract Audio",
|
283 |
-
"Add Image Overlay",
|
284 |
"Apply Color Filter",
|
285 |
"Merge Videos",
|
286 |
"Add Audio",
|
|
|
1 |
+
"""
|
2 |
+
VideoCraft MCP Server - AI-Powered Video Editing Interface
|
3 |
+
|
4 |
+
This module provides a Gradio-based web interface for the VideoCraft MCP Server,
|
5 |
+
offering a comprehensive suite of video editing tools powered by AI and advanced processing.
|
6 |
+
|
7 |
+
Each interface is designed to be intuitive and user-friendly, with clear descriptions
|
8 |
+
and helpful tooltips to guide users through the video editing process.
|
9 |
+
"""
|
10 |
+
|
11 |
import gradio as gr
|
12 |
import os
|
13 |
from dotenv import load_dotenv
|
|
|
17 |
add_text_overlay,
|
18 |
change_speed,
|
19 |
extract_audio,
|
|
|
20 |
apply_color_filter,
|
21 |
merge_videos,
|
22 |
edit_video_segment,
|
|
|
57 |
),
|
58 |
title="File Upload",
|
59 |
description="""
|
60 |
+
**Start Your Video Editing Journey Here! 🚀**
|
61 |
|
62 |
+
Upload your media files to get started with VideoCraft's powerful editing tools.
|
63 |
+
We support a wide range of formats:
|
64 |
|
65 |
+
📹 Videos: MP4, MOV, AVI, MKV, WebM
|
66 |
+
🎵 Audio: MP3, WAV, AAC, OGG, FLAC
|
67 |
+
|
68 |
+
Simply drag and drop your file or click to browse. Once uploaded, you'll receive a URL
|
69 |
+
that you can use with all other tools in this suite.
|
70 |
""",
|
71 |
api_name="upload_file"
|
72 |
),
|
|
|
78 |
["9:16", "16:9", "1:1"],
|
79 |
label="Target Ratio",
|
80 |
value="9:16",
|
|
|
81 |
),
|
82 |
gr.Dropdown(
|
83 |
+
["pad"],
|
84 |
label="Method",
|
85 |
value="pad",
|
86 |
)
|
87 |
],
|
88 |
outputs=gr.Textbox(label="Result URL"),
|
89 |
description="""
|
90 |
+
**Transform Your Videos for Any Platform 🎯**
|
91 |
+
|
92 |
+
Optimize your videos for different social media platforms with our high-quality aspect ratio converter:
|
93 |
+
|
94 |
+
📱 9:16 (1080x1920) - Perfect for:
|
95 |
+
- Instagram Reels
|
96 |
+
- TikTok
|
97 |
+
- YouTube Shorts
|
98 |
+
- Snapchat
|
99 |
|
100 |
+
🖥️ 16:9 (1920x1080) - Ideal for:
|
101 |
+
- YouTube
|
102 |
+
- Vimeo
|
103 |
+
- TV broadcasts
|
104 |
+
- Professional presentations
|
105 |
|
106 |
+
⬛ 1:1 (1080x1080) - Great for:
|
107 |
+
- Instagram posts
|
108 |
+
- Facebook posts
|
109 |
+
- LinkedIn content
|
110 |
+
- Profile videos
|
111 |
+
|
112 |
+
Our 'pad' method ensures your video maintains its quality while fitting perfectly into the new aspect ratio.
|
113 |
""",
|
114 |
api_name="change_aspect_ratio"
|
115 |
),
|
|
|
130 |
gr.Textbox(label="Custom Font File (Optional)", value=None, placeholder="Path to custom font file")
|
131 |
],
|
132 |
outputs=gr.Textbox(label="Result URL"),
|
133 |
+
description="""
|
134 |
+
**Add Professional Text Overlays to Your Videos ✨**
|
135 |
+
|
136 |
+
Create engaging text overlays with precise control over:
|
137 |
+
|
138 |
+
🕒 Timing: Set exact start and end times
|
139 |
+
🎨 Styling: Choose from multiple colors and sizes
|
140 |
+
📍 Positioning: Place text anywhere on screen
|
141 |
+
🎯 Background: Add optional background boxes for better readability
|
142 |
+
|
143 |
+
Perfect for:
|
144 |
+
- Adding captions and subtitles
|
145 |
+
- Creating title cards
|
146 |
+
- Highlighting key points
|
147 |
+
- Adding watermarks
|
148 |
+
- Creating call-to-action text
|
149 |
+
""",
|
150 |
api_name="add_text_overlay"
|
151 |
),
|
152 |
gr.Interface(
|
|
|
156 |
gr.Slider(0.25, 4, value=1.0, label="Speed Factor")
|
157 |
],
|
158 |
outputs=gr.Textbox(label="Result URL"),
|
159 |
+
description="""
|
160 |
+
**Control Your Video's Pace 🎬**
|
161 |
+
|
162 |
+
Adjust video speed while maintaining perfect audio synchronization:
|
163 |
+
|
164 |
+
⏩ Speed Up (1.0x - 4.0x):
|
165 |
+
- Create engaging highlights
|
166 |
+
- Show fast-paced action
|
167 |
+
- Make tutorials more concise
|
168 |
+
|
169 |
+
⏪ Slow Down (0.25x - 1.0x):
|
170 |
+
- Emphasize important moments
|
171 |
+
- Create dramatic effects
|
172 |
+
- Show detailed movements
|
173 |
+
|
174 |
+
Our advanced processing ensures smooth playback and crystal-clear audio at any speed.
|
175 |
+
""",
|
176 |
api_name="change_speed"
|
177 |
),
|
178 |
gr.Interface(
|
|
|
182 |
gr.Dropdown(["mp3", "aac", "wav", "ogg", "flac"], label="Audio Format", value="mp3")
|
183 |
],
|
184 |
outputs=gr.Textbox(label="Result URL"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
description="""
|
186 |
+
**Extract High-Quality Audio from Videos 🎵**
|
187 |
|
188 |
+
Convert your video's audio track into various formats:
|
|
|
|
|
|
|
|
|
189 |
|
190 |
+
🎧 MP3: Universal format, great for most uses
|
191 |
+
🎼 AAC: High quality, smaller file size
|
192 |
+
🎹 WAV: Uncompressed, perfect for editing
|
193 |
+
🎺 OGG: Open format, good quality
|
194 |
+
🎻 FLAC: Lossless, best for archiving
|
195 |
+
|
196 |
+
Perfect for:
|
197 |
+
- Creating podcasts
|
198 |
+
- Extracting music
|
199 |
+
- Saving voice recordings
|
200 |
+
- Archiving audio content
|
201 |
""",
|
202 |
+
api_name="extract_audio"
|
203 |
),
|
204 |
+
# gr.Interface(
|
205 |
+
# fn=add_image_overlay,
|
206 |
+
# inputs=[
|
207 |
+
# gr.Textbox(label="Video URL"),
|
208 |
+
# gr.Textbox(label="Image Path"),
|
209 |
+
# gr.Dropdown(
|
210 |
+
# ["top_left", "top_right", "bottom_left", "bottom_right", "center"],
|
211 |
+
# label="Position",
|
212 |
+
# value="top_right"
|
213 |
+
# ),
|
214 |
+
# gr.Slider(0, 1, value=1.0, label="Opacity"),
|
215 |
+
# gr.Slider(
|
216 |
+
# 1, 50,
|
217 |
+
# value=15,
|
218 |
+
# step=1,
|
219 |
+
# label="Size (%)",
|
220 |
+
# info="Size of image as percentage of video width (1-50%)"
|
221 |
+
# ),
|
222 |
+
# gr.Number(label="Start Time (seconds, optional)", value=None),
|
223 |
+
# gr.Number(label="End Time (seconds, optional)", value=None)
|
224 |
+
# ],
|
225 |
+
# outputs=gr.Textbox(label="Result URL"),
|
226 |
+
# description="""
|
227 |
+
# **Add Professional Image Overlays to Your Videos 🖼️**
|
228 |
+
|
229 |
+
# Enhance your videos with images, logos, or watermarks:
|
230 |
+
|
231 |
+
# 📐 Precise Control:
|
232 |
+
# - Choose from 5 preset positions
|
233 |
+
# - Adjust size (1-50% of video width)
|
234 |
+
# - Set opacity (0-100%)
|
235 |
+
# - Control timing (optional)
|
236 |
+
|
237 |
+
# Perfect for:
|
238 |
+
# - Adding brand logos
|
239 |
+
# - Including watermarks
|
240 |
+
# - Displaying QR codes
|
241 |
+
# - Showing additional graphics
|
242 |
+
# - Creating picture-in-picture effects
|
243 |
+
|
244 |
+
# Images maintain their aspect ratio while being resized to your specifications.
|
245 |
+
# """,
|
246 |
+
# api_name="add_image_overlay"
|
247 |
+
# ),
|
248 |
gr.Interface(
|
249 |
fn=apply_color_filter,
|
250 |
inputs=[
|
|
|
253 |
gr.Slider(0, 1, value=1.0, label="Intensity")
|
254 |
],
|
255 |
outputs=gr.Textbox(label="Result URL"),
|
256 |
+
description="""
|
257 |
+
**Apply Professional Color Filters 🎨**
|
258 |
+
|
259 |
+
Transform your video's look with our curated collection of filters:
|
260 |
+
|
261 |
+
🟤 Sepia: Classic, nostalgic look
|
262 |
+
⚫ Grayscale: Timeless black and white
|
263 |
+
🔥 Warm: Cozy, inviting atmosphere
|
264 |
+
❄️ Cool: Modern, crisp appearance
|
265 |
+
🕰️ Vintage: Retro, film-like quality
|
266 |
+
|
267 |
+
Each filter includes intensity control for perfect customization.
|
268 |
+
Perfect for creating mood, establishing brand identity, or adding artistic flair.
|
269 |
+
""",
|
270 |
api_name="apply_color_filter"
|
271 |
),
|
272 |
gr.Interface(
|
|
|
276 |
label="Video URLs (Python list format)",
|
277 |
placeholder='["https://url1.com", "https://url2.com"]',
|
278 |
lines=4,
|
279 |
+
info="Enter a list of video URLs to merge"
|
280 |
)
|
281 |
],
|
282 |
outputs=gr.Textbox(label="Result URL"),
|
283 |
title="Merge Videos",
|
284 |
+
description="""
|
285 |
+
**Combine Multiple Videos Seamlessly 🎬**
|
286 |
+
|
287 |
+
Create longer videos by merging multiple clips:
|
288 |
+
|
289 |
+
✨ Features:
|
290 |
+
- Maintains original quality
|
291 |
+
- Preserves audio from all videos
|
292 |
+
- Handles various formats
|
293 |
+
- Seamless transitions
|
294 |
+
|
295 |
+
Perfect for:
|
296 |
+
- Creating compilations
|
297 |
+
- Combining multiple takes
|
298 |
+
- Making longer videos
|
299 |
+
- Merging different angles
|
300 |
+
""",
|
301 |
api_name="merge_videos"
|
302 |
),
|
303 |
gr.Interface(
|
|
|
310 |
gr.Radio(["true", "false"], label="Keep Original Audio", value="true")
|
311 |
],
|
312 |
outputs=gr.Textbox(label="Result URL"),
|
313 |
+
description="""
|
314 |
+
**Add Background Music or Sound Effects 🎵**
|
315 |
+
|
316 |
+
Enhance your videos with audio:
|
317 |
+
|
318 |
+
🎼 Features:
|
319 |
+
- Add background music
|
320 |
+
- Include sound effects
|
321 |
+
- Control start time
|
322 |
+
- Adjust volume
|
323 |
+
- Mix with original audio
|
324 |
+
|
325 |
+
Perfect for:
|
326 |
+
- Adding mood music
|
327 |
+
- Including sound effects
|
328 |
+
- Creating atmosphere
|
329 |
+
- Enhancing engagement
|
330 |
+
""",
|
331 |
api_name="add_audio"
|
332 |
),
|
333 |
gr.Interface(
|
|
|
337 |
gr.Textbox(label="Analysis Task", value="Describe what's happening in this video")
|
338 |
],
|
339 |
outputs=gr.Textbox(label="Analysis Result"),
|
340 |
+
description="""
|
341 |
+
**AI-Powered Video Analysis 🤖**
|
342 |
+
|
343 |
+
Let our AI analyze your video content:
|
344 |
+
|
345 |
+
🎯 Capabilities:
|
346 |
+
- Scene description
|
347 |
+
- Key moment detection
|
348 |
+
- Content summarization
|
349 |
+
- Timestamp identification
|
350 |
+
- Action recognition
|
351 |
+
|
352 |
+
Perfect for:
|
353 |
+
- Content planning
|
354 |
+
- Video editing decisions
|
355 |
+
- Content optimization
|
356 |
+
- Quick video understanding
|
357 |
+
- Finding important moments
|
358 |
+
""",
|
359 |
api_name="analyze_video"
|
360 |
),
|
361 |
gr.Interface(
|
|
|
367 |
gr.Radio(["cut", "keep"], label="Action", value="keep")
|
368 |
],
|
369 |
outputs=gr.Textbox(label="Result URL"),
|
370 |
+
description="""
|
371 |
+
**Precise Video Segment Editing ✂️**
|
372 |
+
|
373 |
+
Edit your video with frame-accurate precision:
|
374 |
+
|
375 |
+
✨ Features:
|
376 |
+
- Cut out unwanted segments
|
377 |
+
- Keep only specific parts
|
378 |
+
- Frame-accurate timing
|
379 |
+
- Smooth transitions
|
380 |
+
|
381 |
+
Perfect for:
|
382 |
+
- Removing mistakes
|
383 |
+
- Creating highlights
|
384 |
+
- Extracting clips
|
385 |
+
- Trimming videos
|
386 |
+
- Creating shorter versions
|
387 |
+
""",
|
388 |
api_name="edit_video_segment"
|
389 |
),
|
390 |
gr.Interface(
|
391 |
+
fn=generate_word_level_subtitles_from_url,
|
392 |
+
inputs=[
|
393 |
+
gr.Textbox(
|
394 |
+
label="Video URL",
|
395 |
+
placeholder="Enter the video URL to add word-level subtitles",
|
396 |
+
lines=1,
|
397 |
+
info="Required: Direct URL to the video file"
|
398 |
+
),
|
399 |
gr.Slider(12, 72, value=38, step=2, label="Font Size"),
|
400 |
+
gr.Dropdown(["white", "yellow", "red", "green", "blue", "black", "cyan", "magenta"], value="white", label="Font Color"),
|
401 |
gr.Dropdown(["bottom-center", "top-center", "middle", "bottom-left", "bottom-right"], value="bottom-center", label="Position"),
|
402 |
gr.Textbox(label="Font Name", value="Arial", placeholder="Enter font name (e.g., Arial, Helvetica)"),
|
403 |
+
gr.Dropdown(["black", "white", "red", "green", "blue", "yellow", "cyan", "magenta"], value="black", label="Outline Color"),
|
404 |
gr.Slider(0, 5, value=2, step=1, label="Outline Width")
|
405 |
+
],
|
406 |
+
outputs=gr.Textbox(
|
407 |
+
label="Result",
|
408 |
+
placeholder="Processing status and download URL will appear here...",
|
409 |
+
lines=3,
|
410 |
+
info="Check here for the final video URL or any error messages"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
),
|
412 |
+
title="Word-Level Subtitle Generator",
|
413 |
+
description="""
|
414 |
+
**Create Perfect Word-Level Subtitles 🎯**
|
415 |
+
|
416 |
+
Generate precise, word-by-word subtitles with perfect timing:
|
417 |
+
|
418 |
+
✨ Features:
|
419 |
+
- Word-level synchronization
|
420 |
+
- Multiple color options
|
421 |
+
- Customizable positioning
|
422 |
+
- Adjustable font size
|
423 |
+
- Outline control
|
424 |
+
|
425 |
+
Perfect for:
|
426 |
+
- Social media content
|
427 |
+
- Educational videos
|
428 |
+
- International audiences
|
429 |
+
- Accessibility
|
430 |
+
- Engagement enhancement
|
431 |
+
|
432 |
+
Processing typically takes 1-3 minutes depending on video length.
|
433 |
+
""",
|
434 |
+
api_name="word_level_subtitles"
|
435 |
+
),
|
436 |
+
gr.Interface(
|
437 |
+
fn=search_audio_from_envato,
|
438 |
+
inputs=[
|
439 |
+
gr.Textbox(label="Search Query"),
|
440 |
+
gr.Slider(1, 50, value=10, step=1, label="Limit"),
|
441 |
+
gr.Dropdown(
|
442 |
+
["music", "effects"],
|
443 |
+
label="Category",
|
444 |
+
value=None,
|
445 |
+
multiselect=False
|
446 |
+
),
|
447 |
+
gr.Number(label="Min Length (seconds)", value=None),
|
448 |
+
gr.Number(label="Max Length (seconds)", value=None),
|
449 |
+
gr.Textbox(label="Tags (comma-separated)", value=None),
|
450 |
+
gr.Checkbox(label="Free Only", value=False)
|
451 |
+
],
|
452 |
+
outputs=gr.JSON(label="Sound Effects"),
|
453 |
+
title="Sound Effect Search",
|
454 |
+
description="""
|
455 |
+
**Find the Perfect Sound Effects and Music 🎵**
|
456 |
+
|
457 |
+
Search Envato's vast library of royalty-free audio:
|
458 |
+
|
459 |
+
🎼 Categories:
|
460 |
+
- Background music
|
461 |
+
- Sound effects
|
462 |
+
- Ambient sounds
|
463 |
+
- Voice overs
|
464 |
+
|
465 |
+
✨ Features:
|
466 |
+
- Length filtering
|
467 |
+
- Category selection
|
468 |
+
- Tag-based search
|
469 |
+
- Free items filter
|
470 |
+
- Preview available
|
471 |
+
|
472 |
+
Perfect for:
|
473 |
+
- Adding background music
|
474 |
+
- Including sound effects
|
475 |
+
- Creating atmosphere
|
476 |
+
- Enhancing engagement
|
477 |
+
""",
|
478 |
+
api_name="search_audio_from_envato"
|
479 |
+
)
|
480 |
],
|
481 |
[
|
482 |
"Upload File",
|
|
|
484 |
"Add Text Overlay",
|
485 |
"Change Speed",
|
486 |
"Extract Audio",
|
|
|
487 |
"Apply Color Filter",
|
488 |
"Merge Videos",
|
489 |
"Add Audio",
|