Europe/Istanbul
All Projects

Reels Video Generator — AI-Assisted Shorts/Stories

Turns long videos into vertical Reels/Shorts: transcribe, smart-crop to face, add styled subtitles, export ready-to-publish.
August 8, 2025
Python
FFmpeg
MoviePy
Whisper
Face Detection
Automation
  • Transcribes speech with Whisper (local or API).
  • Auto-centers on faces (or a chosen ROI) and reframes to 9:16.
  • Adds burned-in subtitles with timing & word-level highlighting.
  • Optional beat-aware cuts and intro/outro templates.
  • Exports H.264/AAC 1080×1920 @ 30 fps, safe-area aware.
Ingest → Speech-to-text (Whisper) → Scene/beat detect → Smart crop
      → Subtitle render (ASS) → Compose overlays → FFmpeg export
from moviepy.editor import VideoFileClip
import cv2 as cv

def face_bbox(frame):
  # lightweight cv2.dnn/haar/mediapipe — returns (x,y,w,h)
  # ...detector code...
  return (x, y, w, h)

clip = VideoFileClip("input.mp4")
W, H = clip.w, clip.h
target_w, target_h = 1080, 1920

def crop_region(t):
  frame = clip.get_frame(t)
  x,y,w,h = face_bbox(frame)
  cx, cy = x+w//2, y+h//2
  crop_w = int(H * target_w/target_h)  # keep aspect
  x0 = max(0, min(cx - crop_w//2, W - crop_w))
  return (x0, 0, x0+crop_w, H)  # left, top, right, bottom

reframed = clip.fx(lambda gf, t: gf(t)[:, crop_region(t)[1]:crop_region(t)[3],
                                     crop_region(t)[0]:crop_region(t)[2]])
reframed.write_videofile("output_1080x1920.mp4", fps=30, codec="libx264",
                       audio_codec="aac", preset="medium")
Batch-creating short, captioned clips for social without manual editing. Ideal for quick content, interviews, or educational snippets.
Skills demonstrated: media automation, FFmpeg/MoviePy, ASR with Whisper, basic CV for tracking, stable export presets.