How AI Detects the Best Moments in TikTok Lives
A look inside StreamStash's highlight detection — how we find gift storms, chat spikes, and viral moments.
A typical TikTok live lasts 1-3 hours. Most of it is casual conversation. The moments worth keeping — a massive gift storm, a chat explosion, a sudden viewer spike — might only last 30-60 seconds. Finding them manually means scrubbing through the entire recording.
How StreamStash Finds Highlights
Our AI analyses three signals in parallel during every recording:
1. Chat Activity Spikes
We track the number of chat messages per minute throughout the stream. When the message rate suddenly jumps to 2-3x the average, something interesting is happening. Maybe the streamer said something controversial, a celebrity joined, or a big moment occurred.
2. Gift Storms
TikTok gifts have a diamond value. When multiple high-value gifts arrive in a short window, it indicates an exciting moment — often a challenge, a milestone, or a particularly engaging interaction. We track both gift frequency and total diamond value per minute.
3. Combined Signals
The most reliable highlights happen when multiple signals fire at once. A gift storm + chat explosion is almost always a clip-worthy moment. We score each minute based on a weighted combination:
- Chat activity: 40% weight
- Gift frequency: 30% weight
- Gift diamond value: 30% weight
Minutes scoring above the threshold become clip candidates.
From Candidates to Clips
Once we have a ranked list of highlight moments, we:
1. Remove overlaps — if two highlights are within 60 seconds of each other, we keep the higher-scored one 2. Set clip boundaries — each clip starts 15 seconds before the peak and runs for 60 seconds 3. Cut with FFmpeg — the clip is extracted from the full recording instantly 4. Rank by score — the highest-scoring clip is your free one
What About Viewer Count?
We currently don't track real-time viewer count changes (TikTok doesn't expose this reliably through their data). This is something we're working on adding — a sudden jump from 10K to 50K viewers would be a strong highlight signal.
Accuracy
Our detection works best on streams with active chat and gift activity. For quiet streams with minimal interaction, we fall back to selecting a clip from the middle of the recording. As we process more recordings, we're continuously improving the detection algorithm.