尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Turn one long video into viral shorts automatically. Paste a YouTube link or upload a video. ViralCut finds the best moments, adds captions, reframes them to 9:16 around the speaker's face, and writes ready-to-post captions and hashtags for YouTube Shorts, Instagram Reels, Facebook, X and LinkedIn. Publish buttons send each short to YouTube, Instagram, Facebook and X.
| Paste a link | YouTube links are read from their captions on the server. Dropbox and direct .mp4 links are downloaded in the browser. |
| Upload a video | Whisper transcribes it right in your browser (WebGPU when available). The video never leaves your computer. |
| AI clip detection | Gemini, Groq or Claude reads the transcript and picks the moments most likely to go viral, each with a virality score, hook, title and the reason it works. Without an API key, built-in scoring runs instead. |
| Face-tracking reframe | MediaPipe face detection keeps the speaker centred in a 9:16 frame. Blurred-background and center-crop modes are also available. |
| Animated captions | Word-by-word captions (bold pop, karaoke, neon, minimal) plus a hook title for the first 3 seconds, rendered to MP4/WebM in the browser. |
| Posts & hashtags | Platform-native posts and hashtags for every clip, an X thread, LinkedIn and Instagram posts for the full video, and a hashtag bank. |
| Post to YouTube | One click uploads a finished short to your YouTube channel (YouTube Data API, sign in with Google). Needs GOOGLE_CLIENT_ID. |
| Post to Instagram, Facebook, X, LinkedIn | On phones, the share sheet opens with the video attached. On computers, the video downloads, the caption is copied, and the platform's upload page opens (X and LinkedIn with the caption pre-filled). |
Import this repository at vercel.com/new. The framework is detected as Next.js, so no settings are needed.
Under Environment Variables, add one AI key:
GEMINI_API_KEY: free from aistudio.google.com/apikey. Recommended, because it handles long videos.GROQ_API_KEY: free from console.groq.com/keys. Very fast, but its free tier only fits transcripts of about 30 minutes.ANTHROPIC_API_KEY: paid, from console.anthropic.com.Also add VIRALCUT_ACCESS_CODE (recommended): a code visitors must enter, so strangers can't use up your API quota.
Click Deploy.
/api/clips streams the AI's answer and may run for up to 300 seconds (maxDuration). That's within Vercel's limits with Fluid compute, which is on by default.
https://your-app.vercel.app) to Authorized JavaScript origins.GOOGLE_CLIENT_ID, and redeploy.Google keeps videos uploaded by unreviewed apps private. Switch them to Public in YouTube Studio, or apply for the YouTube API audit to post publicly straight away. Facebook, Instagram and X only allow direct API posting for apps they have reviewed (X's API is paid), so those buttons use the share sheet or the upload page instead.
npm install
cp .env.example .env.local # add your GEMINI_API_KEY (free)
npm run dev # http://localhost:3000
npm test # unit tests
YouTube link ──► /api/transcript (captions) ─┐
├─► /api/clips (Gemini/Groq/Claude: clips, posts, hashtags) ─► results
Upload / .mp4 ─► Whisper in browser ─────────┘ │
canvas + MediaRecorder ◄──┘
(face tracking, captions, hook) ─► 9:16 MP4
app/api/transcript: reads YouTube captions without an API key. YouTube often refuses requests from cloud servers like Vercel; with a GEMINI_API_KEY set, Gemini then watches the public video itself and returns a timestamped transcript. Without one, the site asks for the transcript (YouTube: …more → Show transcript) or the video file.app/api/clips + lib/llm.ts: asks the AI service you configured for a JSON plan and streams it to the browser. Every service with a key is used in order (Gemini, then Groq, then Anthropic, or VIRALCUT_PROVIDER first): if one is overloaded or over its free limit, the next takes over. Gemini also retries and switches between its free Flash models on "high demand" errors. Default models: gemini-flash-latest, llama-3.3-70b-versatile, claude-opus-5-5 (override with VIRALCUT_MODEL).lib/render.ts: the in-browser renderer. Clips render in real time, so keep the tab open. Chrome/Edge/Safari export MP4; Firefox exports WebM.public/workers/whisper.js: speech recognition (transformers.js + Xenova/whisper-base, downloaded once by the browser, about 150 MB).YouTube blocks cloud servers (including Vercel) from downloading videos, so the website can't fetch them itself. Install the free ViralCut app for Windows (see Releases) and leave it open. When you click Download all shorts, Create short, YouTube or Instagram on a YouTube-link project, the website asks the app on your computer to download the video (Chrome may ask once to allow access to apps on this device). The shorts are then created in your browser and downloaded as MP4s.
desktop/ contains the full Python version (FFmpeg + Whisper + OpenCV) packaged as a Windows installer.
GitHub Actions builds and self-tests it on every change to desktop/ and publishes ViralCut-Setup-x.y.z.exe under Releases.
See desktop/viralcut/README.md.
Only clip videos you own or have permission to repurpose.