Local-spawn recorder stop lacks finalize grace → corrupt MP4 / stuck-live (pre-existing) #162
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during NVENC regression testing (not caused by that work).
Two related issues on the local-spawn capture path (recorder
node_id= the mam-api host, e.g. zampp1)1. No stop grace period
routes/recorders.jsPOST /:id/stoplocal branch (~line 592) issuesPOST /containers/<id>/stop(Docker default 10s → SIGKILL) then immediatelyDELETEs the container. The remote sidecar path (node-agenthandleSidecarStop) usesstop?t=180, giving the capture's SIGTERM handler time to finalize ffmpeg + callPOST /assets/:id/finalize.Result on local-spawn: the live asset can stay stuck
live(finalize never fires).2. PCM-in-MP4 produces an undecodable master
A recorder with
recording_codec=h264+recording_container=mp4but the defaultrecording_audio_codec=pcm_s24lewrites audio asipcmin MP4. ffmpeg reads it back asAudio: none→ proxy worker fails:Decoder (codec none) not found for input stream. (ProRes/MOV + PCM is fine — that's why SDI recorders work.)Suggested fixes
/containers/<id>/stop?t=180), and wait for finalize before removing the container.Repro
Create an SRT/RTMP listener recorder on the mam-api host node with h264/mp4 and default audio; push a stream; stop → asset stuck
live, and retry →error(corrupt/undecodable master).🤖 Generated with Claude Code