iamajmeena/neonclipping:本地、开源的短视频切片引擎,11 月 19 日新建
Paste a link. Get captioned 9:16 clips in about two minutes. Free, local, open-source.
NeonClipping turns long YouTube / Twitch / Kick videos (or your own MP4) into vertical, captioned clips with a title and hook for each. Everything runs on your machine: no account, no subscription, no upload.
🌐 Website with one-click Windows setup: https://iamajmeena.github.io/neonclipping/
Made by Ajay K Meena (Director, DOP, colorist, DaVinci Resolve educator, Jaipur). If NeonClipping saves you time, please ⭐ star the repo and follow @iamajmeena on Instagram.
📘 Guides (Hindi + English, PDF): docs/NeonClipping-Guide-EN-HI.pdf
🤖 Let an AI agent install it for you: copy docs/NEONCLIPPING-AGENT-SETUP-PROMPT.txt into Claude Code, Codex CLI or Cursor.
Two modes, one button.
⚡ Fast mode (default, videos over 10 min) copies the trick that makes the fastest clippers fast: never look at the whole video.
- Download audio only (79 MB for an 85-minute video, about 10 s).
- Take the transcript for free from YouTube's own captions (word-timed). No speech model needed. For other sources a local Whisper model is used as the fallback.
- Score the whole audio track for sudden loudness jumps (vs a 2-minute local baseline), raised voices (2–4 kHz energy) and quiet-to-loud transitions.
- Take the best moments, read each one's transcript with a local LLM (Ollama) and let it score the moment, write a title and a hook. Snap the start and end to sentence boundaries inside your Min/Max length.
- Download only the chosen sections of the video (not the whole file), trim exactly by matching their sound to the audio track, and render 1080x1920 clips with burned-in captions.
🔬 Deep mode downloads the whole video, adds optical-flow motion (OpenCV Farneback: fast objects, impacts, camera whips) and cut density to the audio signals, shortlists 4× more candidates and gives the LLM 15 seconds of context before and after each one.
Measured on one machine (RTX 2060, 16 threads), Fast mode, 3 clips each:
| Source | Time |
|---|---|
| 85-minute YouTube stream (YouTube captions) | 97 s |
| 3-hour Twitch VOD (no captions, local speech model) | 136 s |
| 90-second YouTube trailer | 21 s |
| 90-second local MP4 | 14 s |
Your numbers depend on network and CPU.
Every candidate moment is scored from several signals, then the best ones are kept:
| Signal | What it looks for |
|---|---|
| Loudness jump | A sudden boom or shout compared with the last two minutes |
| Raised voice | Energy in the 2–4 kHz band (screaming, yelling) |
| What is said | "oh my god", "oh shit", "run", "police", "bhaago", "arre yaar" and similar (English, Hinglish, Hindi) |
| On-screen action | Fast motion (optical flow), explosion-like flashes, red/blue light flicker, scene cuts |
| AI score | A small local LLM reads the transcript: emotion, punchline, payoff |
It learns from you. Under every clip there are 5 stars. Your ratings stay on your computer (data/feedback.jsonl). After 8 ratings the weights of the signals above are re-fitted (ridge regression pulled toward the defaults, blended in gradually), so a gamer-shouting-heavy taste ranks shouting higher and a calm-explainer taste ranks it lower. Nothing is uploaded.
- One-click Make clips, live progress, clips appear one by one with preview and MP4 download.
- Min / Max clip length (e.g. 30–80 s). Clips end on a sentence.
- Facecam position presets (top-left, top-right, bottom-left, bottom-right, bottom-centre, none) for the usual streamer layouts, remembered between sessions. Or draw the face and gameplay boxes yourself in the editor.
- 11 native layouts: camera above/below gameplay, blurred fill, full-screen crop, gameplay only, four corner overlays, circle facecam and side-by-side. Independent face/game selection and a face-size slider. Preview-only platform safe zones.
- Caption styles: GTA Neon, Impact, Clean, Hormozi and MrBeast. Word-timed, editable words, SRT export.
- Opening headings: eight seconds by default, adjustable from 2–60 seconds, with black backing for bright gameplay and facecam layouts. Use Improve opening heading to write a grounded curiosity question from the selected transcript. Existing clips can apply the new look without downloading or finding moments again.
- Moment mix: Balanced combines activity and transcript-led proposals; Action favours energy; Dialogue favours story, humour and insights. Final selection reduces overlapping and repetitive moments. Balanced/Dialogue prefer an already-installed Gemma 4 local judge; other local models remain a fallback. This changes curation rules and prompts, not foundation-model weights.
- Custom captions: installed font family, size, text/active/outline colours, words per caption and local saved profiles. Import SRT/ASS/WebVTT or paste subtitle text, adjust word timings, split/merge and shift captions. Within-cue word timings from imported files are estimated. Download WebVTT alongside SRT.
- Transcript explorer: explicitly generate or import a full-source transcript, search phrases across cues, browse pages, and click the first/last word to export that passage. Cached transcripts are reused by Make clips and invalidated when the source changes.
- Hinglish captions: Hindi speech is written in English letters ("kya haal hai bhai") by default. Pick Hinglish / हिंदी / English explicitly if you like. Fast uses available source captions; Best Hindi explicitly uses local large-v3 recognition and can be slower on small GPUs. Missing source captions require local recognition.
- Make clips uses your own setup: facecam preset or the boxes you draw in step 03.
- Optical-flow motion + audio highlight ranking, frame-accurate NVENC export (falls back to x264).
- Nothing leaves your computer. The server binds to
127.0.0.1only.
Open My clips → Edit clip. The saved editor includes all 11 speaker position/shape layouts, a speaker-size slider, editable subtitle words, caption style and caption height.
- Apply to this clip updates the opened clip.
- Apply to this video's clips updates the currently saved clips associated with the same source URL. Each keeps its own timestamps, transcript, title and hook. New clips still being generated are not included in that snapshot.
- Source download, highlight discovery and speech recognition are not repeated. Burned-in captions and framing require encoding a new final MP4.
- Original source files must remain in
data/. Previous MP4s are kept; the library displays the latest versions. Old exports missing saved word timings can recover captions from their SRT, with approximate per-word timing. - This edits the selected moments; changing the clip's start/end or spoken language requires a separate trim/transcription workflow.
Validation on one 796.9-second source: all 11 layouts and five caption styles exported with audio and decoded successfully. A seven-clip layout/style update took 119.58 seconds while reusing each clip's exact source, range and word list. These are local checks, not guaranteed runtimes or a caption-quality benchmark.
Run the portable regression tests with python -m unittest discover -s tests -v.
Easiest (Windows): download NeonClipping-Setup.bat from the website or the Releases page and double-click it. It checks your PC, installs Python and FFmpeg if missing, installs NeonClipping into %LOCALAPPDATA%\NeonClipping, creates a Desktop shortcut and opens the app. Mac/Linux: install.sh (new, not yet tested on a real Mac). Or follow the steps below.
Requirements: Python 3.10+, FFmpeg on PATH. Optional but recommended: Ollama with ollama pull llama3.2:3b for AI titles, hooks and scores (without it clips are picked by the audio/motion score), and an NVIDIA GPU for NVENC and faster-whisper.
git clone https://github.com/iamajmeena/neonclipping
cd neonclipping
# Windows
./run.ps1
# Linux / macOS
./run.sh
Open http://127.0.0.1:8770, paste a link, press ⚡ Make clips.
Optional GPU speech model support (only used when a video has no YouTube captions):
.venv/bin/pip install nvidia-cublas-cu12 "nvidia-cudnn-cu12==9.*"
Set NEONCLIPPING_CPU=1 to force CPU. Set NEONCLIPPING_PORT=9000 to use another port.
| File | Job |
|---|---|
app.py |
FastAPI server, /make pipeline, export, library |
smart.py |
Moment scoring: transcript + local LLM, sentence snapping |
highlights.py |
Audio-jump / shout / optical-flow / cut ranking, parallel decode |
captions_yt.py |
YouTube word-timed captions (json3) parser |
captions.py |
Local Whisper (GPU first, CPU fallback), ASS/SRT styles |
translit.py |
Devanagari → Hinglish (word by word, keeps timings) |
standalone.py, previews.py |
Link import, early preview frames |
Paste a Twitch channel link or a YouTube Live link into the Live clipping panel and press Start. NeonClipping records the stream (Streamlink), reads chat anonymously, counts messages in 10 s buckets and cuts a clip around every chat spike (chat velocity more than 2.5 sigma and 2.5x the 5-minute baseline). The clip starts about 24 s before the spike, because chat reacts after the moment. It then gets captions, a hook and title, your layout and facecam boxes, and a viral score like any other clip. Clip the last 30 s now cuts on demand, Stop ends the session. It only works while the stream is live; for finished videos use Make clips.
There is also a command-line version in live/live_clip.py.
Add a Twitch name or a Twitch / YouTube channel link in the Creators panel. NeonClipping checks every minute; when that creator goes live it records the stream and clips the chat spikes, using the layout, facecam boxes and caption style you had selected when you added them (“Use my current layout” updates it). Clips appear under the creator and in My clips.
- One stream at a time (recording and rendering are heavy); other creators wait their turn.
- NeonClipping must stay open. Unattended recordings stop after 3 hours (a new one starts if the creator is still live), stop when less than 8 GB of disk is free, and the big recording file is deleted after the last clip is cut.
- Pressing Stop pauses that creator for 30 minutes; switching Auto off and on resumes at once.
- Tested on Twitch (recording, chat spikes, clip, feed). YouTube channels are detected through yt-dlp; an auto-clipped YouTube stream was not run end to end.
tests/ holds an end-to-end suite that runs against the live server: page and API validation, every layout and caption style rendered and measured, editing one / all clips of a video, Make clips on real YouTube / Twitch / local sources in every mode and language, live clipping on a real stream, the creator list, star ratings, the installer and the website. Unit tests cover the chat-spike rule, caption grouping and re-editing. The last full run is in tests/REPORT.md: 187 checks, all passing, plus the 12 problems the run found and fixed.
python -m unittest tests.test_captions tests.test_live tests.test_reedit
python tests/e2e.py static export edit creators feedback # server must be running
python tests/e2e_make.py # real downloads + transcription (about 25 min)
python tests/e2e_live.py # needs a Twitch channel that is live
python tests/e2e_site.py # website, links, release assets
python tests/make_report.py # rebuild tests/REPORT.md
Inspired by a mobile live-clipper shown in a creator's reel (that app is unreleased, so nothing of it could be studied; only what the video shows was used).
- Chat hype meter while a stream is live: 0-100%, from the comments of the last ~30 s against the stream's own usual speed (peak = 4x usual; the first seconds use an absolute scale), with the label quiet / building momentum / hot / peak viral hype.
- Clip length presets 10 s / 20 s / 30 s / Auto: the clip starts a few seconds before the chat peak; "Clip now" cuts the same length from the live recording.
- Hook text for live clips from the AI, the stream title (emoji removed) or your own text; captions switch (off = faster clips).
- Live clips now also get the style options (template, logo, credit, outro, music, caption animation).
- Phone remote: start NeonClipping with the NeonClipping (phone access) shortcut (
Start-NeonClipping-Phone.bat, or setNEONCLIPPING_LAN=1). Under Live clipping it shows a Wi-Fi address and a 6-digit PIN. On a phone on the same Wi-Fi open that address (/m), enter the PIN, paste a YouTube Live or Twitch link, pick a length, watch the hype meter, press Clip now, and play / save / share the clips. On Android Chrome use "Add to Home screen" to get an app icon. The PC does all the work; the phone is only a remote. - Safety: phone access is off unless you start it that way (the server then listens on 127.0.0.1 only). Everything that is not the PC needs the PIN (after 5 wrong tries an address is locked for 10 minutes; "New PIN" logs every phone out). Even with the PIN a phone can only use the live, library, make, clips, feedback and creators routes: uploads, file tools, the queue and the PIN itself stay PC-only. Windows will ask once whether to allow NeonClipping on private networks: choose Allow for home Wi-Fi only.
- Not included: a native Android app (the phone page is a web page that works like one), live clipping that runs on the phone itself.
For YouTube links every clip uses YouTube's own word-timed captions, in every language. Hindi comes as Devanagari and is turned into Hinglish (nukta letters included: kapde, padega, thoda); repeated-word loops are trimmed. It is faster than a local speech model and, on game audio, clearly more accurate: on a 2-hour Hindi stream a Make run took 197 s with correct lines like "poori mod di yaar, kya bhai? arre pulis". The local "Accurate (turbo)" model was removed because its captions were worse. The only local model left on purpose is Best Hindi (large-v3, slow). Videos without YouTube captions (local files, Twitch VODs) still need a local model as the only option; expect rougher captions there, or import an .srt.
- Templates: wrap the clip in an X post (light or dark), a TikTok hook box or a Breaking news broadcast frame. Type the name, handle and hook; the card, avatar letter, check mark and ticker are drawn for you.
- Background card: padded, rounded-corner video card on a blurred copy, a colour, a gradient or your own image (dimmed, blurred).
- Logo / watermark (4 corners, size, opacity), credit line (or "Clip: channel name" automatically), outro ribbon that slides in for the last seconds.
- Music bed: one track under the voice that rises to a peak volume in the last seconds (volume, peak and riser length are yours).
- Six caption animations: highlight (word by word), pop-in, pop-in line, one by one, build up, full line.
- Import captions: drop an
.srtor.assfile; the words are timed to the clip and can be edited. - All of it works in Make clips, single exports and "Edit saved clips" (including "apply to all clips of this video").
The Find my facecam chip (or "find it automatically when I press Make clips") looks at 14 frames of the video, finds rectangles whose border stays in the same place, and keeps the one that holds a face (small local YuNet face model, MIT licence, models/). It rejects the game's minimap and HUD panels, finds webcams in a corner or floating on a side, and answers "no facecam" when it is not sure. Measured on 30 real saved streams: found the webcam on every stream that has one; clean "not found" on trailers and talking-head videos. Not perfect: some boxes cover only the face inside a framed webcam.
AI parts (below step 01): paste a YouTube link, NeonClipping splits the video's captions into ~25-minute parts and gives a copy-ready prompt per part. Paste each into any free chatbot, paste all answers back (JSON or lines like 12:30-13:10 title), tick the moments and press Make clips: only those sections are downloaded and rendered. A chatbot given a 9-hour transcript in one go only reads the start; small parts fix that. Nothing is sent anywhere by NeonClipping; the chatbot step is manual.
- Highlight picking is a heuristic plus a small local LLM. It finds loud, energetic, quotable moments, not guaranteed "viral" ones. Review before posting.
- The action cues (motion, flash, light flicker) are simple heuristics on a tiny low-resolution copy; they rank moments, they do not recognise "a police chase". Star ratings are how it gets better at your taste.
- The LLM sees text only. It cannot see the screen.
- Without YouTube captions (Twitch VODs, uploaded files) a speech model must transcribe each candidate, which is slow on CPU.
- Auto-caption accuracy follows the source: YouTube's auto captions are imperfect, especially Hinglish.
- Deep mode was verified on a short video only; on multi-hour videos it downloads the whole file first and is slow by design.
- Facecam presets are starting points, not detection: if you pick Bottom-right but the cam is bottom-left, the top half of the clip will show the wrong area. Pick the right corner or draw your own boxes.
NeonClipping is free. If it saves you time you can ⭐ star the repo, follow @iamajmeena, or optionally donate via Razorpay (UPI / cards): https://rzp.io/rzp/JN41CpW. The app also has a ♥ Donate button. Nothing is ever locked behind a donation.
Design ideas studied from open-source clippers: PeakCut (audio-first download, captions as transcript, section download), ClipCutter, content-ai, and the Growlance live-clipper script. Also studied: PeakCut's facecam-by-static-border idea and creator list (reimplemented here with our own code, plus a face check), the public feature list of the YIZERGE desktop editor (templates, background card, music riser, caption animations; only its public web page was read), and a creator's walkthrough of splitting a 9-hour stream into small transcript parts for a free chatbot. Built on FFmpeg, yt-dlp, FastAPI, faster-whisper, OpenCV (YuNet face detector, MIT), Ollama.
MIT. See LICENSE.
https://github.com/iamajmeena/neonclippingReposted. Will be removed on request. All rights belong to the original author.
More from this batch
Anthropic IPO live updates: ANT stock price and Nasdaq debut
这是上次推送之后最重要的进展:股票于 11 月 19 日开盘 111.50 美元,收盘 97.17 美元,较 83 美元发行价上涨约 17%。Yahoo Finance 记录当日最高 115.10、最低 92.72 美元,成交约 8.53 亿股。CNBC 称本次发行筹资 813 …
Has DeepSeek's 100-billion-yuan round landed? 31 investors come into view
第一财经 11 月 19 日 16:23 报道(上一期 20:07 推送前已刊出,本期补录),企查查显示杭州深度求索注册资本由约 1645 万元增至 1991.87 万元,新增股东杭州程砚;该平台同期新增 31 家合伙人,腾讯与宁德时代体系出资比例并列前列,另有中国移动、中信证券…
The Information:英伟达接近以逾 5 亿美元收购扩散模型公司 Inception(报道,尚未宣布)
多家媒体转述 The Information 的报道称,英伟达正与 Inception(Mercury 扩散语言模型团队)进行后期洽谈,对价至少约 5 亿美元,还可能包含业绩对赌;交易尚未签署或官宣,报道称创始团队将加入英伟达。这仍是独家报道,不是双方声明。
苹果被曝在招人,要做能操控 Mac 的自有 AI 智能体(11 月 19 日)
TechCrunch 和 The Verge 根据招聘信息报道,苹果可能在开发一款可在 Mac 上运行、帮用户完成电脑操作的自有智能体。这还不是产品发布,只是招聘与报道层面的线索,细节以苹果之后的正式说明为准。
谷歌开始把 AI 对话直接放上搜索首页(11 月 19 日)
The Verge 报道,谷歌正在把 AI 聊天入口放到搜索首页,而不只是藏在搜索结果里的 AI 模式中。具体覆盖范围和是否可关闭,请以谷歌产品说明和原文为准。
薯片袋触发校园枪支警报后,两名学生起诉学校和警方(11 月 19 日)
Ars Technica 报道,美国一起校园 AI 武器检测误报导致两名青少年被警察制服,两人已提起诉讼。这是公共场所视觉识别落地时误报代价的一个具体案例,细节以诉状和报道为准。
Introducing Tool Retrieval in the Gemini API
谷歌官方介绍,当应用挂了大量工具时,模型不必每次都看完整工具列表,而是先检索可能相关的工具再决定调用。这对工具很多的企业 Agent 有直接意义:可以降低提示开销,也减少无关工具干扰。能力边界和配额以官方文档为准。
Depth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth
上一期未收入。苹果机器学习研究放出 Depth Pro 2,可从照片、视频或实时画面估计以米为单位的深度,并强调物体边缘更锐、帧间更稳定。仓库提供 S/B/L/H+ 等多档模型及 Core ML 包,权重为研究用途。论文编号 arXiv:2611.26603。
NVIDIA 介绍用 Dynamo 缓解强化学习 rollout 瓶颈(11 月 19 日)
官方技术博客讨论在强化学习训练里,生成轨迹(rollout)常常卡住吞吐。文章介绍如何用 NVIDIA Dynamo 把这部分流水线理顺,让训练不必长时间等采样。适合正在做 RL 后训练或智能体强化学习的团队对照自己的栈。
NVIDIA:用 GPU 原生数据采集,让科学仪器能跑实时 AI(11 月 19 日)
官方博客介绍把科学仪器的数据采集直接放到 GPU 上处理,减少数据搬运,从而在实验现场做实时推理。这对同步辐射、显微镜或探测器一类场景有参考价值,不是面向普通聊天应用的更新。
Science 观察 Agent AlphaXiv:35 个实验室放出 936 个智能体,12 周写出 936 篇预印本(11 月 19 日)
《Science》11 月 19 日下午的特稿记录了一场为期 12 周的实验:35 个人类实验室部署的智能体在专属预印本服务器上互相交流、写代码、做实验并发布 936 篇研究,还自建了同行评议期刊。文章提醒这些是预印本而非传统期刊论文,质量参差,但提供了一个观察「智能体科研社区」…
Claude solves two open problems in the physics of black holes
官方文章署期 11 月 17 日,上一期未收入;本期 Hacker News 讨论升温。Anthropic 称 Claude Fable 5.2 完成了两项与量子引力和黑洞有关的计算:其一补完了 2003 年提出但一直未做完的相变计算,显示黑洞形成对应的突变在时空不再有明确形状时…