Skip to content
Back to search

ShortsGenerator

Automate the creation of Shorts content locally with a couple simple steps.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/leamsigc--shortsgenerator/badge.svg)](/listings/leamsigc--shortsgenerator)

HTML

<a href="/listings/leamsigc--shortsgenerator"><img src="/api/listings/leamsigc--shortsgenerator/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/leamsigc/ShortsGenerator.git
cd ShortsGenerator
cp .env.example .env
# Edit .env — at minimum set PEXELS_API_KEY and IMAGEMAGICK_BINARY
docker compose up -d

Open **http://localhost:5000** or **http://localhost:3000** for the frontend.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 204 lines
  1. # ShortsGenerator
  2. ![ShortGenerator](/logo.jpeg)
  3. Automate YouTube Shorts creation locally — script generation, stock video search, TTS voiceover, subtitles, background music, and social media scheduling.
  4. ## Features
  5. - **AI Script Generation** — uses g4f (free) or Gemini to generate video scripts
  6. - **Stock Video Search** — auto-downloads matching clips from Pexels
  7. - **Multi-Voice TTS** — Supertonic (local, 10 voices, 33 languages), TikTok TTS (fallback), KittenTTS, Qwen3-TTS (local, 9 preset timbres + Voice Design + Voice Clone + character voices 🐶 EL-PERRO / EL-GANCHO / LA-FIERA / SOMBRA, hook/retention steering presets)
  8. - **Subtitle Templates** — 10 presets (classic, modern_glow, bold_outline, minimal, cinematic, neon, social_viral, floating, news_ticker, karaoke_highlight)
  9. - **Background Music** — auto-mix from your music library or extract from a video
  10. - **Image Stitching** — upload multiple images to stitch at the start of the video with configurable duration per image (default 5s)
  11. - **Frame Extraction** — extract a frame from any generated video for thumbnails
  12. - **Aspect Ratios** — 9:16, 16:9, 1:1, 4:5, 21:9
  13. - **Multi-Business MagicSync** — configure multiple API keys for different businesses; select which one to use when scheduling
  14. - **Social Media Scheduling** — schedule posts to Instagram, TikTok, Facebook, LinkedIn, YouTube via MagicSync
  15. - **Hardware Acceleration** — auto-detects GPU for faster ffmpeg encoding
  16. [YouTube](https://youtu.be/s7wZ7OxjMxA) or click on the image.
  17. [![Short Generator](/logo.jpeg)](https://youtu.be/s7wZ7OxjMxA "Short generator, video generator")
  18. ![Generate](/static/assets/images/Screen1.png)
  19. ![Generate 2](/static/assets/images/Screenshot2.png?raw=true)
  20. ![Generate 3](/static/assets/images/Screenshot3.png?raw=true)
  21. ## Local usage:
  22. ```bash
  23. git clone https://github.com/leamsigc/ShortsGenerator.git
  24. cd ShortsGenerator
  25. cp .env.example .env
  26. #Start the backend
  27. python Backend/main.py
  28. #Start the frontend
  29. cd UI && pnpm i && npx nuxt dev --tunnel #Tunnel to add the connection to upload the videos to magicsync
  30. ```
  31. ## Workflow
  32. ## Quick Start (Docker)
  33. ```bash
  34. git clone https://github.com/leamsigc/ShortsGenerator.git
  35. cd ShortsGenerator
  36. cp .env.example .env
  37. # Edit .env — at minimum set PEXELS_API_KEY and IMAGEMAGICK_BINARY
  38. docker compose up -d
  39. ```
  40. Open **http://localhost:5000** or **http://localhost:3000** for the frontend.
  41. ## Manual Setup
  42. ### Backend (Python Flask on :8080)
  43. ```bash
  44. conda activate shortsgenerator # required: Python 3.11 env (see onBoard.md).
  45. # main.py exits immediately on any other version.
  46. pip install -r requirements.lock # pre-resolved; plain requirements.txt can stall pip's resolver
  47. cp .env.example .env
  48. # Fill in PEXELS_API_KEY, IMAGEMAGICK_BINARY, etc.
  49. cd Backend
  50. python main.py
  51. ```
  52. ### Frontend (Nuxt 3 on :3000)
  53. ```bash
  54. cd UI
  55. npm install
  56. npm run dev
  57. ```
  58. The frontend depends on the backend running on port 8080.
  59. ## Environment Variables
  60. | Variable | Required | Description |
  61. |----------|----------|-------------|
  62. | `PEXELS_API_KEY` | Yes | Stock video search |
  63. | `IMAGEMAGICK_BINARY` | Yes | Path to ImageMagick convert (e.g. `/usr/bin/convert`) |
  64. | `TIKTOK_SESSION_ID` | No | TikTok TTS fallback |
  65. | `GOOGLE_API_KEY` | No | Gemini AI model |
  66. | `ASSEMBLY_AI_API_KEY` | No | Cloud subtitle generation |
  67. | `OPENAI_API_KEY` | No | OpenAI models |
  68. | `MAGICSYNC_BASE_URL` | No | Default MagicSync server URL |
  69. | `MAGICSYNC_API_TOKEN` | No | Default MagicSync API token |
  70. See [EnvironmentVariables.md](EnvironmentVariables.md) for the full list.
  71. ## Usage
  72. 1. **Generate a script** — enter a video subject, select a script template, click Generate
  73. 2. **Review & edit** — modify the script, add search keywords, select subtitle template
  74. 3. **Upload images (optional)** — upload images that will be stitched at the start of the video; set duration per image
  75. 4. **Select voice** — choose TTS engine and voice style (Qwen3 clones/designs can be saved as named "My voices" in your browser and reused as presets)
  76. 5. **Set aspect ratio** — 9:16 (default), 16:9, 1:1, or 4:5
  77. 6. **Generate video** — downloads stock clips, generates TTS, combines everything with subtitles
  78. 7. **Add music** — pick from your music library or extract audio from a video
  79. 8. **Schedule** — in the Videos page, click "Schedule Upload", select a business and platforms, set date/time, and post via MagicSync
  80. ### Image Stitching
  81. In the **Generate** page, click the **Images** section and upload one or more images. Each image becomes a video segment at the start of the final video. Adjust the global duration (default 5s) or set per-image duration. Images are scaled and cropped to match the selected aspect ratio.
  82. ### Multi-Business MagicSync
  83. In **Settings → MagicSync Integration**, add API keys for each business. Each business has its own MagicSync URL, API token, and video base URL. When scheduling a video, select which business to use — the correct credentials are sent automatically.
  84. ### Thumbnail Extraction
  85. `POST /api/extract-frame` extracts a frame from any generated video at a given timestamp. Use this to generate custom thumbnails.
  86. ## API Endpoints
  87. | Method | Endpoint | Description |
  88. |--------|----------|-------------|
  89. | POST | `/api/generate` | Full video generation pipeline |
  90. | POST | `/api/script` | Generate script only |
  91. | POST | `/api/search-and-download` | Search + download + TTS + combine |
  92. | POST | `/api/regenerate-video` | Re-render audio + video only (no AI calls, reuses metadata) |
  93. | GET | `/api/tts/status` | TTS engine health (supertonic/tiktok/qwen3) |
  94. | GET | `/api/tts/voices?engine=` | Voices + extras per engine (languages, modes, presets) |
  95. | POST | `/api/tts/qwen/preview` | Audition a Qwen3 voice/mode without full generation |
  96. | POST | `/api/tts/qwen/clone-reference` | Upload a reference clip for Qwen3 voice clone |
  97. | POST | `/api/cancel` | Cancel generation |
  98. | POST | `/api/addAudio` | Add background music to video |
  99. | POST | `/api/upload-music` | Upload music file |
  100. | POST | `/api/download-music-url` | Download & extract audio from URL |
  101. | POST | `/api/upload-video` | Upload video files |
  102. | POST | `/api/upload-image` | Upload images for video stitching |
  103. | POST | `/api/extract-frame` | Extract a frame from a video |
  104. | GET | `/api/getVideos` | List generated videos |
  105. | GET | `/api/getSongs` | List available music |
  106. | GET | `/api/models` | List TTS voices |
  107. | GET | `/api/settings` | Get global settings |
  108. | POST | `/api/settings` | Update global settings |
  109. | POST | `/api/magicsync/accounts` | List MagicSync accounts |
  110. | POST | `/api/schedule-to-magicsync` | Schedule a post |
  111. | GET | `/api/video/<filename>` | Serve generated video |
  112. | GET | `/static/generated_videos/<file>` | Static video files |
  113. ## Directory Structure
  114. ```
  115. Backend/
  116. ├── main.py # Flask app, all API routes
  117. ├── video.py # Video processing, ffmpeg, subtitles, images
  118. ├── settings.py # Global defaults
  119. ├── gpt.py # AI script generation
  120. ├── search.py # Pexels stock video search
  121. ├── tiktokvoice.py # TikTok TTS
  122. ├── supertonic_tts.py # Supertonic local TTS
  123. ├── qwen3_tts.py # Qwen3 TTS (preset timbres + Voice Design + Voice Clone)
  124. ├── requirements.lock # Pre-resolved pins (use this for pip install; see Notes)
  125. ├── classes/
  126. │ └── Shorts.py # Core pipeline orchestrator
  127. UI/
  128. ├── pages/
  129. │ ├── generate/index.vue # Video generation workspace
  130. │ ├── videos/index.vue # Gallery + scheduling
  131. │ └── settings.vue # Global settings + MagicSync
  132. ├── composables/
  133. │ ├── useVideoSettings.ts # Video generation state
  134. │ └── useGlobalSettings.ts # App-wide settings
  135. └── stores/
  136. ```
  137. ## Notes
  138. - **Python 3.11 only.** The backend exits on startup with any other version
  139. (`conda activate shortsgenerator` first, in the same terminal). Running it
  140. under `base` (3.10) fails with cryptic native-lib errors (e.g. torchaudio
  141. `.so` load failures) — never install project packages into `base`.
  142. - **Install via the lockfile.** `pip install -r requirements.lock` instead of
  143. `requirements.txt`: the graph (torch/CUDA + `qwen-tts` → pinned
  144. `transformers==4.57.3` → `huggingface-hub<1.0`) makes pip's resolver stall
  145. (`resolution-too-deep`). After changing pins, regenerate with:
  146. `uv pip compile requirements.txt --python $(which python) -o requirements.lock`
  147. - **Qwen3-TTS is optional but local.** Select it in Settings → TTS Engine for
  148. preset timbres, free-form Voice Design, or Voice Clone, plus a preview
  149. audition button. Missing GPU deps degrade gracefully to "unavailable" with
  150. Supertonic/TikTok fallback. First preview downloads ~3GB of weights once.
  151. - **g4f Gemini cookies.** The free g4f path reads Firefox/Chrome login cookies
  152. via `browser-cookie3` (required package). If Settings reports "cookies
  153. outdated" with 0 cookies found, check the package is installed and restart
  154. the backend — re-logging in can't help until the reader exists. Snap-Firefox
  155. profiles are supported. Escape hatches: toggle OFF "Use browser cookies"
  156. (cookie-free providers) or set provider `gemini` with a free
  157. `GOOGLE_API_KEY`.
  158. ## Contributing
  159. Pull requests are welcome. For major changes, please open an issue first.
  160. ## License
  161. See [`LICENSE`](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.