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: You have only specify the protocol in your request. Palabra returns a server and stream_key in the create-task response. You have publish your source stream to that server using the provided stream_key.

    • WebRTC: You have only specify the protocol in your request. Palabra returns url and token - the credentials to connect to the room and publish your source MediaStream audio/video tracks to be translated.

  • For output:

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

    • WebRTC: No server is required to be provided by you. Palabra hosts the WebRTC room. After Broadcast Task creation, call GET /broadcasts/<id>/webrtc-token to join the room and receive translated tracks.

    • HLS: No server is required to be provided by you. 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_pull", "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 you have to compose the URL by template:

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

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",
// ...
},
]
}
}
}

For these REQUEST and RESPONSE examples:

  • You have specified rtmp_push as input, so Palabra generated server and stream_key. Send your RTMP source stream to the provided Palabra server using the stream_key.
  • You have specifed 3 outputs - 2 RTMP and 1 HLS:
    • As RTMP cannot carry multiple audio tracks:
      • You have specifed one rtmp_push output - a separate destination (server + stream_key) per each target language in your request.
      • Palabra will push the translated stream in RTMP format to your server using the stream_key you provided when creating the Broadcast Task.
    • As HLS supports multiple audio tracks, so a single output can include all target languages:
      • You have entered one hls_pull output with a list of audio required audio tracks inserted into the same stream.
      • Palabra returns nothing new in response, but Palabra hosts an HLS stream; You are able to get a direct m3u8 link to this stream based on the Broadcast ID (details below).