Skip to main content

500 videos with numbers

#!/bin/bash

# Output directory
output_dir=output_dir="output_videos"
mkdir -p "$output_dir"
output_dir"
# Set the video dimensions and duration
width=width=1920
height=height=1080
duration=duration=30

# Loop to create 500 videos
for i in {1..500}; do
  # Use FFmpeg to generate the video with the text animation
ffmpeg  ffmpeg -f lavfi -i color=c=black:s=${width}x$width}x${height}height}:r=30 -vf "drawtext=text='$i'i':fontsize=300:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2" -t $duration -c:v libx264 -r 30 -pix_fmt yuv420p "$output_dir/video_$i.output_dir/video_$i.mp4" -y
done

echo
echo "All videos generated in $output_dir.output_dir."