Skip to content

Open-source alternative to Opus Clip, Vidyo.ai, Klap & SubMagic. Turn long-form YouTube videos into viral 9:16 shorts using LLM highlight detection, Whisper transcription, and auto vertical cropping — free, no watermarks, no per-clip credits.

fix: force UTF-8 stdout/stderr to prevent charmap crash on Windows

Anil Matchae71497f68b37
diff --git a/main.py b/main.py
index 8d17d8f..866b61f 100644
--- a/main.py
+++ b/main.py
@@ -8,6 +8,13 @@ import argparse
import json
import sys
+# Windows uses 'charmap' by default, which can't encode Unicode characters
+# like →. Reconfigure stdout/stderr to UTF-8 so output works on all platforms.
+if hasattr(sys.stdout, "reconfigure"):
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
+if hasattr(sys.stderr, "reconfigure"):
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
+
from shorts_generator import generate_shorts