- Added eager selfbot voice connection establishment to ensure video capture works seamlessly during voice channel joins. - Introduced a manual video watch command for selfbots to allow operators to initiate screen recording of other members' streams. - Enhanced video recording functionality to split recordings into segments based on user activity, similar to voice recordings. - Fixed mobile navigation issues by extending the navbar to include all items and ensuring responsive form controls. - Standardized error handling across frontend components to improve user experience during failures.
1.6 KiB
1.6 KiB
Video Recording Splitting — Like Voice Recording
Goal
Camera + screen share (stream watch) recording should split into per-burst segments just like voice recording does — each time a streamer pauses/stops and resumes, a new MP4 segment is created and registered in the DB + uploaded.
Voice Recording Model (to replicate)
receiver.speaking.start→ new OGG segment per burst- AfterSilence (4000ms) → stream "end" → segment finalized + uploaded
- Each segment → DB insert → OGG→MP3 transcode → upload → update DB
- File stored as
<userId>/<startTime>.ogg+.json
Video Recording Splitting
- DAVE video RTP → depacketize H264 → write to current segment .h264
- Silence detection: no H264 packets for 4000ms → close segment → flush → mux to MP4 → insert DB record → upload → start new segment on next packet
- Each segment:
<userId>/video-<channelId>-<startTime>.h264→.mp4 - DB: reuse
voice_recordingstable (filename indicates video, e.g.video-XXX-1234.mp4) - Upload: MP4 to TeleUploader (no transcode needed — MP4 plays everywhere)
Files Modified
services/discord-gateway/src/modules/voice-recording/streamWatchReceiver.ts— Main change: silence-based splitting + DB registration + upload
Constants
VIDEO_SILENCE_MS = 4000(matches voice AfterSilence)VIDEO_MIN_SEGMENT_MS = 1000(skip segments <1s — avoid noise)
Verification
pnpm typecheckinservices/discord-gatewaypnpm build(dist/ is the deployed artifact)- Push → CI deploy → live test with a streamer