Commit Graph
15 Commits
Author SHA1 Message Date
nanxun 90a67bdf72 fix: harden recording recovery and dashboard metrics 2026-08-14 19:20:24 +08:00
nanxun 7a33b2c6e3 feat: accelerate ffmpeg encoding with intel gpu 2026-08-14 01:46:08 +08:00
nanxun e0bd001541 fix: restore native FLV reconnect with curl fallback 2026-08-12 12:14:43 +08:00
nanxun 19d358b312 feat: improve recording recovery and upload workflow 2026-08-10 11:14:34 +08:00
nanxun ecc737f0bd feat: harden recording lifecycle and refresh fnOS UI 2026-08-03 23:45:26 +08:00
nanxun ad86c080e3 fix: use curl pipe to bypass FFmpeg HTTP header buffer limit
The previous -max_alloc approach does not fix the 'overlong headers' error
because FFmpeg 5.1 (Debian bookworm) uses a compile-time stack-allocated
buffer (MAX_URL_SIZE=4096) for HTTP response headers, which -max_alloc
cannot change.

Instead, when the stream URL is HTTP/HTTPS, launch curl to handle the
HTTP connection and pipe its stdout to FFmpeg via stdin (pipe:0). Curl
does not have the 4096-byte header limit, so it handles oversized CDN
response headers from Douyin without error.

Additional changes:
- RequestStopAsync kills curl first (instead of sending 'q' to FFmpeg),
  causing the pipe to close and FFmpeg to exit gracefully on EOF.
- SessionProcessRuntime tracks the curl process for cleanup.
2026-07-09 12:19:34 +08:00
nanxun 8a079b4698 fix: add max_alloc to prevent overlong headers error and throttle startup failure notifications
- Add -max_alloc 100000000 to FFmpeg arguments for HTTP inputs to avoid
  'overlong headers' error when CDN (e.g. Douyin) returns oversized HTTP
  response headers exceeding FFmpeg's default 4096-byte buffer.

- Add exponential backoff for repeated startup failures (30s → 15min cap)
  to break the tight fail→retry→re-poll loop that floods notifications.

- Throttle startup failure notifications to at most one per 30 minutes per
  room to prevent email/webhook storms during persistent failures.

- Reset backoff counter when a session successfully opens its first segment.
2026-07-09 11:51:52 +08:00
nanxunandClaude Opus 4.8 f9c7ec5d43 fix: resolve low-storage deadlock by always resuming MP4 finalization
Under the Red storage tier, MP4 finalization (TS->MP4 remux) was being skipped, so tasks never reached Completed and the segment_completed event script — which uploads the file and deletes the local source to free space — never ran. The disk could never recover, deadlocking all recording and transcoding.

Two reversed checks caused this: (1) FfmpegService gated finalization on the legacy HasEnoughSpace MB threshold (effectively 4GB) instead of the tier system, and (2) the polling loop only resumed paused finalizations when NOT in the Red tier. Now finalization is gated solely on ShouldPauseActive (true Red only) and the polling loop always attempts to resume it every cycle, since finalization is the very mechanism that frees space. Once any segment finalizes, the upload+delete script runs and the disk recovers, letting the rest finish.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 15:13:07 +08:00
nanxun ea41d3e7b4 fix: retry segmented sessions and restore settings text 2026-05-08 23:27:01 +08:00
nanxun 56432a9ece feat: add transcode workspace and media browser 2026-05-05 02:14:52 +08:00
nanxun 89ba4163fc feat: improve polling recovery and session cleanup 2026-04-27 20:33:12 +08:00
nanxun 9701c88c8b fix: improve recovery and auto-start flows 2026-04-25 00:06:25 +08:00
nanxun b80419ade2 fix: restore scheduler auto-start on sqlite 2026-04-24 15:53:07 +08:00
nanxun 23ead56781 feat: improve recording automation and task workflows 2026-04-23 23:18:11 +08:00
nanxun 1c892259a9 1111 2026-04-16 15:19:48 +08:00