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 a stream to another platform or server, without running a second encoder: YouTube, Twitch or any RTMP endpoint, or a partner’s SRT ingest.

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":"youtube","stream":"channel1","url":"rtmp://a.rtmp.youtube.com/live2","key":"abcd-efgh"}'
# Start and stop it
curl -b jar -X POST http://localhost:9001/api/v1/apps/default/restream/youtube/start
curl -b jar -X POST http://localhost:9001/api/v1/apps/default/restream/youtube/stop

stream names which of the application’s streams to send. The URL and key are joined the way the receiving end expects, so paste them exactly as the platform gives them to you. A target with "enabled": true starts by itself whenever its stream goes live.

URL starts withSent asThe key is
rtmp://, rtmps://FLV, as platforms expectAppended as the stream name
srt://MPEG-TSThe SRT stream ID
udp://MPEG-TSNot used

For an SRT destination, give its address and put the stream ID it expects in the key, for example URL srt://partner.example:8890 and key default/from-us, which is exactly what another Jadarit server takes. SRT options go in the URL as usual, such as ?latency=200000&passphrase=….

RTMP platforms take H.264 only, so an HEVC stream can be restreamed over SRT or UDP but not RTMP. Nothing else is accepted as a destination: the URL is handed to FFmpeg, and a file:// path would turn restreaming into writing files on the server.

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.