Live Video API
Preview
RTMP · SRT

Stream Ingest

Configure your encoder to push audio/video into a Sendexa live stream. Use RTMPS for encrypted contribution or SRT when the uplink is lossy. This page covers OBS, FFmpeg, bitrate targets, keyframes, and reconnect behavior.

RTMP & RTMPS

Industry-standard ingest for OBS, vMix, Wirecast, and mobile apps.

SRT

Secure Reliable Transport for unstable networks and long-haul contribution.

Encoder profiles

Recommended ladders for 720p/1080p church, sports, and mobile uplink.

Room simulcast

Publish a WebRTC room host out to a live stream for hybrid events.

RTMPS port

443

rtmps://ingest.sendexa.co/live

RTMP port

1935

Legacy / LAN only

SRT port

9000

srt://ingest.sendexa.co

Keyframe

2s

Required for ABR + LL-HLS

Ingest endpoints

Returned on POST /v1/video/streams under data.ingest. Always prefer RTMPS in production.

ProtocolURL patternNotes
RTMPSrtmps://ingest.sendexa.co/liveRecommended. Stream key as password / stream key field.
RTMPrtmp://ingest.sendexa.co/liveUnencrypted — only for controlled networks.
SRTsrt://ingest.sendexa.co:9000?streamid=…Better under packet loss; streamid includes stream identity.

OBS Studio setup

  1. Settings → Stream
  2. Service: Custom…
  3. Server: rtmps://ingest.sendexa.co/live
  4. Stream Key: paste data.ingest.streamKey
  5. Output → Encoder: x264 or hardware (NVENC/QSV), Rate Control: CBR, Keyframe Interval: 2
  6. Start Streaming — stream status moves idle → starting → live
JSON
// Map from create-stream response → OBS fields
{
"server": "rtmps://ingest.sendexa.co/live", // ingest.rtmpUrl
"stream_key": "sk_live_a1b2c3d4e5f6…" // ingest.streamKey
}

FFmpeg

Bash
ffmpeg -re -i input.mp4 \
-c:v libx264 -preset veryfast -tune zerolatency \
-b:v 4500k -maxrate 4500k -bufsize 9000k \
-pix_fmt yuv420p -g 60 -keyint_min 60 -sc_threshold 0 \
-c:a aac -b:a 128k -ar 48000 -ac 2 \
-f flv "rtmps://ingest.sendexa.co/live/sk_live_YOUR_STREAM_KEY"

Recommended encoder settings

ProfileResolutionVideo bitrateAudioKeyframe
Mobile uplink720p301.5–2.5 Mbps96–128 kbps AAC2s
Standard HD1080p304–6 Mbps128–160 kbps AAC2s
High quality1080p606–9 Mbps160–192 kbps AAC2s
Low-latency focus720p302.5–4 Mbps128 kbps AAC1–2s
  • Use CBR (constant bitrate) for live.
  • Codec: H.264 (High or Main), yuv420p.
  • Disable B-frames for lower latency when using latencyMode: low.
  • Stereo AAC, 48 kHz sample rate.

Reconnect window

If the encoder disconnects, Sendexa keeps the stream in disconnected for reconnectWindowSeconds (default 60). Reconnect with the same stream key to resume without creating a new stream. After the window, status becomes ended.

FieldTypeRequiredDescription
reconnectWindowSecondsnumberoptional0–600. Set 0 to end immediately on disconnect. Default: 60.

Simulcast a WebRTC room to live

For hybrid events (stage discussion + public broadcast), create a stream and attach it to a room host. The host continues in the interactive room while viewers watch via HLS.

POST
/v1/video/rooms/:roomId/egress/live
Bash
# Start room → live stream egress (host track composed to RTMP pipeline)
curl -X POST 'https://api.sendexa.co/v1/video/rooms/rm_01ABC/egress/live' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \
-d '{
"streamId": "str_01JQX7K2M9N4P5",
"layout": "speaker",
"includeAudio": true
}'
JSON
{
"success": true,
"code": "EGRESS_STARTED",
"data": {
"egressId": "eg_9f3c",
"roomId": "rm_01ABC",
"streamId": "str_01JQX7K2M9N4P5",
"status": "active",
"layout": "speaker"
}
}

Health & troubleshooting

Stream stuck on starting
Check keyframe interval (must be ≤ 2s), bitrate not exceeding uplink, and that audio track is present.
Auth failed on encoder
Confirm stream key matches create response; no extra spaces; use RTMPS URL without appending key to path twice.
Frequent disconnects
Lower bitrate, switch to SRT, enable reconnectWindowSeconds ≥ 120, use wired uplink.
Audio/video drift
Use constant frame rate, same timebase, and avoid variable frame rate capture sources.

Next steps