Skip to content

Recording and restreaming

Archive a live stream while it broadcasts.

Terminal window
# Start
curl -b jar -X POST \
http://localhost:9001/api/v1/apps/default/streams/mystream/record
# Stop
curl -b jar -X DELETE \
http://localhost:9001/api/v1/apps/default/streams/mystream/record

Recordings land under the application’s data directory and are listed by GET /api/v1/apps/default/recordings. Download one by name, or delete it when you are done.

Because video is not re-encoded, recording costs disk and very little CPU.

Forward the same feed to another RTMP endpoint, without running a second encoder.

Terminal window
# Define a target
curl -b jar -X POST http://localhost:9001/api/v1/apps/default/restream \
-H 'content-type: application/json' \
-d '{"name":"partner","url":"rtmp://partner.example/live","key":"abc123"}'
# Start and stop it
curl -b jar -X POST http://localhost:9001/api/v1/apps/default/restream/partner/start
curl -b jar -X POST http://localhost:9001/api/v1/apps/default/restream/partner/stop

The target URL and key are joined the way the receiving platform expects, so paste them exactly as that platform gives them to you.

A restream target can take the clean feed, without your ad breaks. That is usually what a partner or syndication contract requires: they carry the programme and sell their own inventory, while your direct audience sees your commercials.

See Ad insertion for how the clean feed works.