/* Crawler-visible homepage content, injected into #root at build time.
*
* The app is a client-rendered SPA, which means the HTML served for / contains
* an empty
and nothing else. Googlebot renders JavaScript and so
* sees the real landing page; GPTBot, ClaudeBot and PerplexityBot do not, and
* measure the homepage as zero characters of text. That is why the site ranks in
* Google and is absent from AI answers.
*
* React's createRoot().render() replaces the contents of #root on mount, so this
* block is what a non-executing client reads and what a browser shows for the
* few hundred milliseconds before hydration. It is neither hidden nor cloaked:
* it is the same content the rendered page shows, in the same order, and it is
* styled well enough that seeing it briefly is not jarring.
*
* Keep it in sync with Landing.jsx when the substance of the page changes. It is
* duplicated on purpose: a build-time React SSR pass would remove the
* duplication but would also put hydration on the critical path of a production
* app that currently has none.
*/
import { EDITIONS, CANONICAL_ANSWERS } from './data.js'
const S = {
wrap: 'max-width:72rem;margin:0 auto;padding:0 1.5rem',
h1: 'font-family:"Instrument Serif",ui-serif,Georgia,serif;font-weight:400;font-size:clamp(2.2rem,5vw,3.6rem);line-height:1.06;letter-spacing:-.03em;color:oklch(96% 0.006 262);margin:0 0 1.25rem;text-transform:lowercase',
h2: 'font-family:"Instrument Serif",ui-serif,Georgia,serif;font-weight:400;font-size:clamp(1.5rem,2.6vw,2rem);line-height:1.15;letter-spacing:-.02em;color:oklch(96% 0.006 262);margin:0 0 1rem;text-transform:lowercase',
h3: 'font-size:1rem;font-weight:600;color:oklch(96% 0.006 262);margin:0 0 .35rem',
p: 'margin:0 0 1rem;color:oklch(86% 0.01 262);line-height:1.65',
muted: 'margin:0 0 1rem;color:oklch(64% 0.012 262);line-height:1.65',
eyebrow:
'font-family:"JetBrains Mono",ui-monospace,monospace;font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:oklch(76% 0.17 50);margin:0 0 1rem',
section: 'padding:3.5rem 0;border-bottom:1px solid oklch(96% 0.006 262 / .08)',
grid: 'display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr))',
card:
'border:1px solid oklch(96% 0.006 262 / .08);border-radius:10px;padding:1.1rem 1.25rem;background:oklch(16.5% 0.015 265)',
a: 'color:oklch(86% 0.01 262);text-underline-offset:3px',
}
const FEATURES = [
['AI viral moment detection', 'Google Gemini 3.1 Flash-Lite scores the transcript and scene data to find the 3 to 15 strongest moments, so there is no manual scrubbing.'],
['Smart 9:16 vertical cropping', 'Dual-mode reframing with MediaPipe face tracking and a YOLOv8 fallback, stabilised so the camera holds still instead of swinging.'],
['Word-level automatic subtitles', 'faster-whisper produces a timestamp for every word, and the subtitles are burned in with FFmpeg.'],
['AI voice dubbing in 30+ languages', 'ElevenLabs translates the audio while preserving the speaker\'s voice, then the new track is re-transcribed so subtitles match.'],
['Hook text overlays', 'AI-written hook titles covering the first seconds, which is where a short-form viewer decides whether to stay.'],
['AI video effects', 'Gemini-generated FFmpeg filter chains for colour grading, transitions and visual clean-up.'],
['Local video upload', 'Podcasts, webinars, livestreams, interviews and vlogs, at full resolution, from a file or a YouTube link.'],
['Self-hosted and private', 'Run it with Docker on your own machine and the source video never leaves your infrastructure.'],
['Free AI YouTube studio', 'AI thumbnail generator, 10 viral title suggestions and auto-written descriptions with chapter timestamps.'],
['Direct social publishing', 'Publish to TikTok, Instagram Reels and YouTube Shorts from the dashboard through a self-hosted Postiz instance.'],
]
const STEPS = [
['Upload a long-form video', 'Any video you own: podcasts, webinars, livestreams, interviews, or a YouTube link.'],
['AI finds the best moments', 'Gemini 3.1 Flash-Lite returns 3 to 15 candidate clips of 15 to 60 seconds each.'],
['Smart cropping to vertical 9:16', 'Face-tracked reframing keeps the subject centred without the camera swinging.'],
['Subtitles, hooks and effects', 'Word-level subtitles, an AI hook overlay, optional effects and dubbing into 30+ languages.'],
['Download or post directly', 'Export the clips or publish straight to TikTok, Instagram Reels and YouTube Shorts through Postiz.'],
]
const FAQ = [
[
'Is OpenShorts free? What is the catch?',
CANONICAL_ANSWERS.isItFree +
' Self-hosting costs you hardware and time: on a typical CPU an 8-minute video takes 5 to 8 minutes to process, and you supply your own Google Gemini key, whose free tier covers 1,500 requests a day.',
],
['What is OpenShorts and how does it work?', CANONICAL_ANSWERS.whatIsIt + ' ' + CANONICAL_ANSWERS.howItWorks],
[
'How does OpenShorts compare to Opus Clip?',
'Both do AI viral moment detection and smart vertical cropping. OpenShorts is MIT-licensed and can be self-hosted, so the source video never leaves your machine, and it adds voice dubbing into 30+ languages. Opus Clip is closed source and cloud only, starting at $15/month as of July 2026, and it ships a larger caption-style library. Full comparison at /alternatives/opus-clip.',
],
[
'How does the smart vertical cropping work?',
'TRACK mode follows a single subject with MediaPipe face detection and a YOLOv8 fallback, damped so the crop holds still inside a safe zone rather than chasing every head movement. GENERAL mode handles group shots and landscapes by preserving the full width over a blurred backdrop. A speaker tracker prevents the crop from flipping between people and holds position through brief occlusions.',
],
[
'Can OpenShorts translate and dub videos?',
'Yes, into more than 30 languages through ElevenLabs, preserving the original speaker\'s voice characteristics. After dubbing, the audio is re-transcribed so the burned-in subtitles are in the target language rather than the original.',
],
[
'What are the system requirements to self-host?',
'Any machine with Docker, realistically 8GB of RAM and a modern multi-core CPU. An NVIDIA GPU is optional and cuts processing time by roughly an order of magnitude. Docker Compose pulls Python 3.11, FFmpeg, YOLOv8, MediaPipe, faster-whisper and the React dashboard. Linux, macOS and Windows via WSL2 are supported.',
],
]
const card = (title, body) =>
`
`
export const LANDING_FALLBACK = `
AI clip generator · self-hosted & open source
the free open source ai clip generator, built to clip what people actually watch.
Turn long videos into viral 9:16 shorts, self-hosted with Docker and free under MIT. Publish to TikTok, Instagram Reels and YouTube Shorts through your own self-hosted Postiz instance, or wire the REST API into your own pipeline with the n8n workflow. Just want it free? Start with the free AI clip generator.
No account, no card, no watermark. Run it yourself: self-host free on GitHub and bring your own Gemini key.
what openshorts is
${CANONICAL_ANSWERS.whatIsIt}
${CANONICAL_ANSWERS.howItWorks}
what it costs
${card('OpenShorts · $0, forever', EDITIONS.selfHosted.summary)}
features
${FEATURES.map(([t, b]) => card(t, b)).join('')}
how it works
${STEPS.map(([t, b]) => `- ${t}. ${b}
`).join('')}
frequently asked questions
${FAQ.map(([q, a]) => `- ${q}
- ${a}
`).join('')}
`