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:
-
SRTorRTMP: You have only specify the protocol in your request. Palabra returns aserverandstream_keyin the create-task response. You have publish your source stream to thatserverusing the providedstream_key. -
WebRTC: You have only specify the protocol in your request. Palabra returnsurlandtoken- the credentials to connect to the room and publish your source MediaStream audio/video tracks to be translated.
-
-
For output:
-
SRTorRTMP: You have to provide the destinationserverandstream_keyin yourPOST /broadcastsrequest. 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, callGET /broadcasts/<id>/webrtc-tokento 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 (noserverorstream_keyneeded).
-
Inputs
| Protocol | Request | Response |
|---|---|---|
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
| Protocol | Request | Response |
|---|---|---|
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. |
Captions | Captions 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_codeandlang_codesmust match the codes used intranslation_pipeline > translations. -
For
SRT,HLS, andWebRTCoutputs, use a single output object and list all target languages inlang_codes. -
For
RTMP, create one output object per target language. Set that language in thelang_codefield as a string (not array) and provide a separateserver + stream_keyconfiguration per each language. Because RTMP does not support multiple audio tracks, each translation is re‑streamed as its own separate stream. -
For
HLSoutput 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_pushas input, so Palabra generatedserverandstream_key. Send your RTMP source stream to the provided Palabraserverusing thestream_key. - You have specifed 3 outputs - 2 RTMP and 1 HLS:
- As RTMP cannot carry multiple audio tracks:
- You have specifed one
rtmp_pushoutput - a separate destination (server + stream_key) per each target language in your request. - Palabra will push the translated stream in RTMP format to your
serverusing thestream_keyyou provided when creating the Broadcast Task.
- You have specifed one
- As HLS supports multiple audio tracks, so a single output can include all target languages:
- You have entered one
hls_pulloutput 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).
- You have entered one
- As RTMP cannot carry multiple audio tracks: