Commit graph

11 commits

Author SHA1 Message Date
Zac
79369c378a fix: SRT/RTMP ingest + thumbnail crashes
Recorder model was creating capture containers but ffmpeg never spawned
inside them, so SRT/RTMP listeners bound the host port without ingesting
anything. Thumbnail extraction was also crashing on yuv444p sources,
leaving uploaded assets stuck at status=processing forever.

* capture/src/index.js: read RECORDER_ID/SOURCE_TYPE/LISTEN/LISTEN_PORT/
  STREAM_KEY/SOURCE_URL from env on startup and call captureManager.start()
  immediately. SIGTERM handler now flushes ffmpeg + S3 upload and POSTs the
  asset to mam-api before exiting.
* worker/ffmpeg/executor.js: force -pix_fmt yuv420p on proxy transcode and
  -pix_fmt yuvj420p on thumbnail extraction so mjpeg encoder accepts the
  input regardless of source pixel format.
* mam-api/routes/assets.js: when capture posts proxyKey=null but hiresKey
  is set (SRT/RTMP case), enqueue a proxy job from the hires so the asset
  ends up with a browser-playable proxy + thumbnail instead of stuck-ready.
* mam-api/routes/recorders.js: accept UI field aliases (codec/resolution/
  proxy_config), clean up unstarted containers on port collision, bump the
  docker stop timeout to 5min so long uploads can flush.
* web-ui/recorders.html: change default ports from 1935/9000 to 41936/49001
  to avoid common collisions with other RTMP/SRT services.
2026-05-17 07:01:54 -04:00
55fec605c6 feat(capture): accept SRT/RTMP source params in POST /start
- Accept source_type, source_url, listen, listen_port, stream_key
- Validate: SDI requires device; SRT/RTMP caller requires source_url
- Pass all params through to captureManager.start()
- On stop: if proxyKey is null (network source), include needsProxy flag
  in MAM API registration so worker can generate proxy asynchronously
2026-05-16 08:20:10 -04:00
ea48e98465 feat(capture): add SRT/RTMP source type support
- Add _buildInputArgs() to build FFmpeg input args per source type
- SRT caller: srt://host:port?mode=caller
- SRT listener: srt://0.0.0.0:PORT?mode=listener
- RTMP caller: -i rtmp://host/app/key
- RTMP listener: -listen 1 -i rtmp://0.0.0.0:PORT/live/key
- Network sources spawn hires-only FFmpeg process (can't open stream twice)
- proxyKey is null for network sources; proxy generated by worker post-stop
- SDI keeps existing dual-process behavior unchanged
2026-05-16 08:19:41 -04:00
f9c680cc22 fix(routes+ui): capture route bin optional, jobs Redis URL, recorders S3_REGION+stop codes, api.js full rewrite, upload.html multipart fix, capture.html bin guard: capture.js 2026-05-16 00:30:25 -04:00
bb069760fe fix(infra+workers): S3 creds, ffprobe, BullMQ awaits, thumbnail seek, bin optional, docker-compose vars, jobs Redis, recorders stop codes: client.js 2026-05-16 00:29:47 -04:00
7c7fcd2b0d add services/capture/src/routes/capture.js 2026-04-07 21:58:30 -04:00
dfffca879a add services/capture/src/s3/client.js 2026-04-07 21:58:30 -04:00
75ef8a4ed8 add services/capture/src/capture-manager.js 2026-04-07 21:58:29 -04:00
febf394a81 add services/capture/src/index.js 2026-04-07 21:58:29 -04:00
e0902acbb6 add services/capture/package.json 2026-04-07 21:58:29 -04:00
63a8415cee add services/capture/Dockerfile 2026-04-07 21:58:28 -04:00