This tool is for personal use only. Please respect YouTube's terms of service and copyright laws.
)
}
import type { Config } from "tailwindcss"
const config: Config = {
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
colors: {
yellow: {
400: "#FFD700",
},
},
},
},
plugins: [],
}
export default config
https://example.com/download/video.mp4/**
* v0 by Vercel.
* @see https://v0.dev/t/TLumlStf73N
* Documentation: https://v0.dev/docs#integrating-generated-code-into-your-nextjs-app
*/
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"
import Link from "next/link"
export default function Component() {
return (
YouTube Downloader
Paste a YouTube video URL to download it.
Downloaded Video
Download
)
}
Wednesday, January 22, 2025
Text to Video Creator
Text to Video Creator
from moviepy.editor import *
from moviepy.video.fx.all import vfx_fadein, vfx_fadeout
def text_to_video(text, duration=5, output_file="output.mp4", font="Arial", fontsize=30, color="white", bg_color="black"):
"""
Creates a video with the given text.
Args:
text: The text to display in the video.
duration: The duration of the video in seconds.
output_file: The name of the output video file.
font: The font to use for the text.
fontsize: The font size of the text.
color: The color of the text.
bg_color: The background color of the video.
Returns:
None
"""
# Create a TextClip
txt_clip = TextClip(text, fontsize=fontsize, color=color, font=font)
# Center the text horizontally and vertically
txt_clip = txt_clip.set_position('center')
# Create a ColorClip for the background
bg_clip = ColorClip(size=(txt_clip.w + 50, txt_clip.h + 50), color=bg_color)
# Combine the text and background clips
video_clip = CompositeVideoClip([bg_clip, txt_clip])
# Add fade-in and fade-out effects
video_clip = vfx_fadein(video_clip, duration=1)
video_clip = vfx_fadeout(video_clip, duration=1)
# Set the video duration
video_clip = video_clip.set_duration(duration)
# Write the video to file
video_clip.write_videofile(output_file, fps=24)
if __name__ == "__main__":
text_to_video("Hello, World!", duration=3)