Skip to main content

Broadcaster Input and Outputs

Each Broadcast Task includes two parts that define how Palabra receives and delivers your stream:

  • Input: the protocol and settings Palabra uses to receive your original stream (e.g., RTMP, SRT). There is exactly one input per Broadcast Task.
  • Outputs: the protocols and destination settings Palabra uses to re‑stream the translated audio/video (e.g., RTMP to your CDN, HLS for web players). You can configure one or more outputs.

Stream routing

To translate your stream, configure how Palabra receives it (input) and where it delivers the translated version (outputs). After the Broadcast Task is created, publish your stream to the provided endpoint for your protocol; once Palabra detects your input, it automatically translates and re‑streams to your configured outputs.

On Broadcast Task creation if you have chosen:

  • For input:

    • SRT or RTMP: Specify only the protocol in your request. Palabra returns a server and stream_key in the create-task response. Publish your source stream to that server using the provided stream_key.

    • WebRTC: Specify only the protocol in your request. Palabra returns a url and token — the credentials to connect to the room and publish your source MediaStream audio/video tracks for translation.

  • For output:

    • SRT or RTMP: Provide the destination server and stream_key in your POST /broadcasts request. Palabra pushes the translated streams to that destination.

    • WebRTC: No server is required on your side — Palabra hosts the WebRTC room. After the Broadcast Task is created, call GET /broadcasts/<id>/webrtc-token to join the room and receive the translated tracks.

    • HLS: No server is required on your side — Palabra hosts the HLS stream. After creation, use the m3u8 URL for playback in any HLS player (no server or stream_key needed).

Inputs

ProtocolRequestResponse
RTMP{"protocol": "rtmp_push"}Palabra provides server and stream_key for you to push your original stream to.
SRT{"protocol": "srt_push"}Palabra provides host, port, and stream_id for you to push your original stream to.
WEBRTC{"protocol": "webrtc_push"}Palabra provides url and token for you to connect WebRTC room and publish your source MediaStream track to. See WebRTC Input for details.

Outputs

ProtocolRequestResponse
RTMP{"protocol": "rtmp_push","lang_code": "es", "server": "rtmp://your-server.com:1935", "stream_key": "your-key"}

Provide server and stream_key so Palabra can push the translated stream.

Create a separate output object for each target language.
Palabra echoes your data (no new fields).

No extra actions needed. Translated streaming to your destinations starts once your input stream is received.
SRT{"protocol": "srt_push", "lang_codes": ["original", "de", "es"], "host": "srt://your-server.com", "port": "1935", "stream_id": "your-id"}

Provide host, port, and stream_id so Palabra can push the translated stream.

Use a single output object listing all target languages.
Palabra echoes your data (no new fields).

No extra actions needed. Translated streaming to your destinations starts once your input stream is received.
HLS{"protocol": "hls_pull", "lang_codes": ["original", "es", "de"]}

No server settings required - Palabra hosts the HLS stream.

Use a single output object listing all target languages.
Palabra echoes your data (no new fields).

Use the m3u8 URL for playback (see details below).
WebRTC{"protocol": "webrtc_push", "lang_codes": ["original", "es", "de"]}

No server settings required—Palabra hosts the WebRTC room.

Use a single output object listing all target languages.
Palabra echoes your data (no new fields).

Connect WebRTC room and subscribe to translated audio/video tracks. See WebRTC Output for details.
CaptionsCaptions are included by default for any broadcast task; no separate output is required.Connect to the Palabra Centrifuge server using the broadcast ID and subscribe to the captions. See Broadcaster Captions for details

Notes

  • You can use one output type or multiple output types in parallel.

  • Language codes in lang_code and lang_codes must match the codes used in translation_pipeline > translations.

  • For SRT, HLS, and WebRTC outputs, use a single output object and list all target languages in lang_codes.

  • For RTMP, create one output object per target language. Set that language in the lang_code field as a string (not array) and provide a separate server + stream_key configuration per each language. Because RTMP does not support multiple audio tracks, each translation is re‑streamed as its own separate stream.

  • For HLS output, compose the URL from the template:

    • https://api.palabra.ai/broadcasts/<broadcast_id>/hls/index.m3u8
    • Replace <broadcast_id> with your Broadcast ID.
    • Use the link as a source for any HLS player.

Inputs and Outputs Compatibility

Input / OutputRTMPSRTWebRTCHLS
RTMP🎞️
SRT🎞️
WebRTC🔊🔊
  • ✅ – Full support of video and audio
  • 🔊 – Audio only
  • 🎞️ – Video requires disabling B-frames or using tune=zerolatency

img.png


Configuration Example

Broadcast Task Creation REQUEST:

  curl -X POST 'https://api.palabra.ai/broadcasts' \
-H "ClientID: $API_CLIENT_ID" \
-H "ClientSecret: $API_CLIENT_SECRET" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "My Stream",
// ...
"input": {
"protocol": "rtmp_push"
},
"outputs": [
{
"protocol": "rtmp_push",
"lang_code": "es",
"server": "rtmp://someserver.com:1935",
"stream_key": "abcdef1234567890a"
},
{
"protocol": "rtmp_push",
"lang_code": "de",
"server": "rtmp://someserver.com:1935",
"stream_key": "abcdef12345678903b"
},
{
"protocol": "hls_pull",
"lang_codes": ["original", "es", "de"]
}
],
"translation_pipeline": {
// ...
"translations": [
{
"target_language": "es",
// ...
},
{
"target_language": "de",
// ...
}
],
}
}'

Broadcast Task Creation RESPONSE:

{
"ok": true,
"data": {
"id": "be91d203-b7ac-4b7f-85e7-083ec9b98391",
// ...
"input": {
"protocol": "rtmp_push",
"url": "rtmp://rtmp.eu.palabra.ai:1935/live/da05cb241d7f5013b7b14608a1e8f810",
"server": "rtmp://rtmp.eu.palabra.ai:1935/live",
"stream_key": "da05cb241d7f5013b7b14608a1e8f810"
},
"outputs": [
{
"protocol": "rtmp_push",
"server": "rtmp://someserver.com:1935",
"stream_key": "abcdef1234567890a",
"lang_code": "es"
},
{
"protocol": "rtmp_push",
"server": "rtmp://someserver.com:1935",
"stream_key": "abcdef12345678903b",
"lang_code": "de"
},
{
"protocol": "hls_pull",
"lang_codes": ["original", "es", "de"]
},
],
"translation_pipeline": {
// ...
"translations": [
{
"target_language": "es",
// ...
},
{
"target_language": "de",
// ...
},
]
}
}
}

What happens in these REQUEST and RESPONSE examples:

  • You specified rtmp_push as the input, so Palabra generated a server and stream_key. Send your RTMP source stream to the provided Palabra server using that stream_key.
  • You specified 3 outputs — 2 RTMP and 1 HLS:
    • RTMP cannot carry multiple audio tracks, so you created a separate rtmp_push output (server + stream_key) per target language. Palabra pushes each translated RTMP stream to your server using the stream_key you provided.
    • HLS supports multiple audio tracks, so a single hls_pull output lists all required audio tracks for the same stream. Palabra returns nothing extra in the response but hosts the HLS stream; you can build a direct m3u8 link to it from the Broadcast ID (see above).