Send feedback
Configure live stream settings
Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to configure settings during input endpoint or channel
creation for live stream features such as multiple audio tracks, captions, and
spritesheets.
You can specify configurations for the following features during input endpoint
creation :
IP allowlisting
You can restrict access to input endpoints by specifying IP ranges the input
stream should originate from, such as the IP address of the encoder. The video
pipeline only accepts traffic from IP addresses in these ranges. The IP ranges
must be in CIDR block format.
Configure the securityRules
field in the Input
resource:
{
"type" : "RTMP_PUSH" ,
"securityRules" : {
"ipRanges" : [ "1.2.3.4/32" ]
}
}
You can specify configurations for the following features during channel
creation :
Multiple bitrate streams
You can create advanced channel configurations that support multiple bitrates,
resolutions, and frame rates. The following configuration includes two
muxStream
s in the output, one at 360p with a frame rate of 30 FPS
(mux_video_360p30
) and another at 720p with a frame rate of 60 FPS
(mux_video_720p60
). This configuration also supports multiple audio bitrates.
See
Recommended bitrates for
more information.
{
"inputAttachments" :[
{
"key" : "input-primary" ,
"input" : "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output" :{
"uri" : "gs://BUCKET_NAME "
},
"elementaryStreams" : [
{
"key" : "es_video_720p60" ,
"videoStream" : {
"h264" : {
"profile" : "high" ,
"heightPixels" : 720 ,
"widthPixels" : 1280 ,
"bitrateBps" : 5500000 ,
"frameRate" : 60
}
}
},
{
"key" : "es_video_360p30" ,
"videoStream" : {
"h264" : {
"profile" : "high" ,
"heightPixels" : 360 ,
"widthPixels" : 640 ,
"bitrateBps" : 400000 ,
"frameRate" : 30
}
}
},
{
"key" : "es_audio_160k" ,
"audioStream" : {
"codec" : "aac" ,
"channelCount" : 2 ,
"bitrateBps" : 160000
}
},
{
"key" : "es_audio_64k" ,
"audioStream" : {
"codec" : "aac" ,
"channelCount" : 2 ,
"bitrateBps" : 64000
}
}
],
"muxStreams" : [
{
"key" : "mux_video_720p60" ,
"elementaryStreams" : [
"es_video_720p60"
],
"segmentSettings" : {
"segmentDuration" : "2s"
}
},
{
"key" : "mux_video_360p30" ,
"elementaryStreams" : [
"es_video_360p30"
],
"segmentSettings" : {
"segmentDuration" : "2s"
}
},
{
"key" : "mux_audio_160k" ,
"elementaryStreams" : [
"es_audio_160k"
],
"segmentSettings" : {
"segmentDuration" : "2s"
}
},
{
"key" : "mux_audio_64k" ,
"elementaryStreams" : [
"es_audio_64k"
],
"segmentSettings" : {
"segmentDuration" : "2s"
}
}
],
"manifests" : [
{
"key" : "manifest_dash" ,
"fileName" : "main.mpd" ,
"type" : "DASH" ,
"muxStreams" : [
"mux_video_720p60" ,
"mux_video_360p30" ,
"mux_audio_160k" ,
"mux_audio_64k"
],
"maxSegmentCount" : 5
},
{
"key" : "manifest_hls" ,
"fileName" : "main.m3u8" ,
"type" : "HLS" ,
"muxStreams" : [
"mux_video_720p60" ,
"mux_video_360p30" ,
"mux_audio_160k" ,
"mux_audio_64k"
],
"maxSegmentCount" : 5
}
]
}
Multiple audio tracks
If the input stream contains more than one audio track, use the
AudioMapping
object to select the track for each
AudioStream
.
{
"inputAttachments" : [
{
"key" : "MY-INPUT " ,
"input" : "/projects/PROJECT-ID /locations/LOCATION /inputs/MY-INPUT " ,
}
],
"output" : {
"uri" : "gs://BUCKET_NAME /outputs/"
},
"elementaryStreams" : [
{
"key" : "es_video" ,
"videoStream" : {
"h264" : {
"heightPixels" : 720 ,
"widthPixels" : 1280 ,
"bitrateBps" : 3000000 ,
"frameRate" : 30
}
}
},
{
"key" : "es_first_audio" ,
"audioStream" : {
"codec" : "aac" ,
"bitrateBps" : 160000 ,
"mapping" : [
{
"inputKey" : "MY-INPUT " ,
"inputTrack" : 1
}
]
}
},
{
"key" : "es_second_audio" ,
"audioStream" : {
"codec" : "aac" ,
"bitrateBps" : 160000 ,
"mapping" : [
{
"inputKey" : "MY-INPUT " ,
"inputTrack" : 2
}
]
}
}
],
"muxStreams" : [
{
"key" : "mux_video" ,
"elementaryStreams" : [ "es_video" ],
},
{
"key" : "mux_first_audio" ,
"elementaryStreams" : [ "es_first_audio" ],
},
{
"key" : "mux_second_audio" ,
"elementaryStreams" : [ "es_second_audio" ],
}
],
"manifests" : [
{
"key" : "manifest_dash" ,
"type" : "DASH" ,
"muxStreams" : [
"mux_video" ,
"mux_first_audio" ,
"mux_second_audio" ,
]
}
]
}
Note that Shaka Player doesn't support the following features for HLS
streams with multiple audio tracks:
Passthrough CEA 608/708 captions
If the input streams contain CEA 608/708 captions, you can forward the captions
to the output streams. Add the following textStream
to the
elementaryStreams
when creating a Channel
. This textStream
embeds the CEA 608/708 captions in all output video streams and renditions.
{
"key" : "captions" ,
"textStream" : {
"codec" : "cea608"
}
}
Sprite sheets
To generate a sprite sheet, configure the spriteSheets
field in
the Channel
resource.
{
"spriteSheets" : [
{
"format" : "jpeg" ,
"filePrefix" : "sprite" ,
"interval" : "2s" ,
"spriteWidthPixels" : 320 ,
"spriteHeightPixels" : 240 ,
"columnCount" : 3 ,
"rowCount" : 3 ,
"quality" : 80
}
]
}
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Configure live stream settings\n\nThis page describes how to configure settings during input endpoint or channel\ncreation for live stream features such as multiple audio tracks, captions, and\nspritesheets.\n\nConfigure through input endpoint creation\n-----------------------------------------\n\nYou can specify configurations for the following features during [input endpoint\ncreation](/livestream/docs/how-to/create-input-endpoints):\n\n### IP allowlisting\n\nYou can restrict access to input endpoints by specifying IP ranges the input\nstream should originate from, such as the IP address of the encoder. The video\npipeline only accepts traffic from IP addresses in these ranges. The IP ranges\nmust be in CIDR block format.\n\nConfigure the [`securityRules`](/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) field in the `Input` resource: \n\n {\n \"type\": \"RTMP_PUSH\",\n \"securityRules\": {\n \"ipRanges\": [\"1.2.3.4/32\"]\n }\n }\n\nConfigure through channel creation\n----------------------------------\n\nYou can specify configurations for the following features during [channel\ncreation](/livestream/docs/how-to/create-channels):\n\n### Multiple bitrate streams\n\nYou can create advanced channel configurations that support multiple bitrates,\nresolutions, and frame rates. The following configuration includes two\n`muxStream`s in the output, one at 360p with a frame rate of 30 FPS\n(`mux_video_360p30`) and another at 720p with a frame rate of 60 FPS\n(`mux_video_720p60`). This configuration also supports multiple audio bitrates.\nSee\n[Recommended bitrates](/livestream/docs/best-practices#recommended-bitrates) for\nmore information. \n\n {\n \"inputAttachments\":[\n {\n \"key\":\"input-primary\",\n \"input\": \"projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/inputs/\u003cvar translate=\"no\"\u003eINPUT_ID\u003c/var\u003e\"\n }\n ],\n \"output\":{\n \"uri\": \"gs://\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e\"\n },\n \"elementaryStreams\": [\n {\n \"key\": \"es_video_720p60\",\n \"videoStream\": {\n \"h264\": {\n \"profile\": \"high\",\n \"heightPixels\": 720,\n \"widthPixels\": 1280,\n \"bitrateBps\": 5500000,\n \"frameRate\": 60\n }\n }\n },\n {\n \"key\": \"es_video_360p30\",\n \"videoStream\": {\n \"h264\": {\n \"profile\": \"high\",\n \"heightPixels\": 360,\n \"widthPixels\": 640,\n \"bitrateBps\": 400000,\n \"frameRate\": 30\n }\n }\n },\n {\n \"key\": \"es_audio_160k\",\n \"audioStream\": {\n \"codec\": \"aac\",\n \"channelCount\": 2,\n \"bitrateBps\": 160000\n }\n },\n {\n \"key\": \"es_audio_64k\",\n \"audioStream\": {\n \"codec\": \"aac\",\n \"channelCount\": 2,\n \"bitrateBps\": 64000\n }\n }\n ],\n \"muxStreams\": [\n {\n \"key\": \"mux_video_720p60\",\n \"elementaryStreams\": [\n \"es_video_720p60\"\n ],\n \"segmentSettings\": {\n \"segmentDuration\": \"2s\"\n }\n },\n {\n \"key\": \"mux_video_360p30\",\n \"elementaryStreams\": [\n \"es_video_360p30\"\n ],\n \"segmentSettings\": {\n \"segmentDuration\": \"2s\"\n }\n },\n {\n \"key\": \"mux_audio_160k\",\n \"elementaryStreams\": [\n \"es_audio_160k\"\n ],\n \"segmentSettings\": {\n \"segmentDuration\": \"2s\"\n }\n },\n {\n \"key\": \"mux_audio_64k\",\n \"elementaryStreams\": [\n \"es_audio_64k\"\n ],\n \"segmentSettings\": {\n \"segmentDuration\": \"2s\"\n }\n }\n ],\n \"manifests\": [\n {\n \"key\": \"manifest_dash\",\n \"fileName\": \"main.mpd\",\n \"type\": \"DASH\",\n \"muxStreams\": [\n \"mux_video_720p60\",\n \"mux_video_360p30\",\n \"mux_audio_160k\",\n \"mux_audio_64k\"\n ],\n \"maxSegmentCount\": 5\n },\n {\n \"key\": \"manifest_hls\",\n \"fileName\": \"main.m3u8\",\n \"type\": \"HLS\",\n \"muxStreams\": [\n \"mux_video_720p60\",\n \"mux_video_360p30\",\n \"mux_audio_160k\",\n \"mux_audio_64k\"\n ],\n \"maxSegmentCount\": 5\n }\n ]\n }\n\n### Multiple audio tracks\n\nIf the input stream contains more than one audio track, use the\n[`AudioMapping`](/livestream/docs/reference/rest/v1/projects.locations.channels#AudioMapping) object to select the track for each\n[`AudioStream`](/livestream/docs/reference/rest/v1/projects.locations.channels#audiostream). \n\n {\n \"inputAttachments\": [\n {\n \"key\": \"\u003cvar translate=\"no\"\u003eMY-INPUT\u003c/var\u003e\",\n \"input\": \"/projects/\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/inputs/\u003cvar translate=\"no\"\u003eMY-INPUT\u003c/var\u003e\",\n }\n ],\n \"output\": {\n \"uri\": \"gs://\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e/outputs/\"\n },\n \"elementaryStreams\": [\n {\n \"key\": \"es_video\",\n \"videoStream\": {\n \"h264\": {\n \"heightPixels\": 720,\n \"widthPixels\": 1280,\n \"bitrateBps\": 3000000,\n \"frameRate\": 30\n }\n }\n },\n {\n \"key\": \"es_first_audio\",\n \"audioStream\": {\n \"codec\": \"aac\",\n \"bitrateBps\": 160000,\n \"mapping\": [\n {\n \"inputKey\": \"\u003cvar translate=\"no\"\u003eMY-INPUT\u003c/var\u003e\",\n \"inputTrack\": 1\n }\n ]\n }\n },\n {\n \"key\": \"es_second_audio\",\n \"audioStream\": {\n \"codec\": \"aac\",\n \"bitrateBps\": 160000,\n \"mapping\": [\n {\n \"inputKey\": \"\u003cvar translate=\"no\"\u003eMY-INPUT\u003c/var\u003e\",\n \"inputTrack\": 2\n }\n ]\n }\n }\n ],\n \"muxStreams\": [\n {\n \"key\": \"mux_video\",\n \"elementaryStreams\": [\"es_video\"],\n },\n {\n \"key\": \"mux_first_audio\",\n \"elementaryStreams\": [\"es_first_audio\"],\n },\n {\n \"key\": \"mux_second_audio\",\n \"elementaryStreams\": [\"es_second_audio\"],\n }\n ],\n \"manifests\": [\n {\n \"key\": \"manifest_dash\",\n \"type\": \"DASH\",\n \"muxStreams\": [\n \"mux_video\",\n \"mux_first_audio\",\n \"mux_second_audio\",\n ]\n }\n ]\n }\n\nNote that [Shaka Player](https://shaka-player-demo.appspot.com/demo/) doesn't support the following features for HLS\nstreams with multiple audio tracks:\n\n- Alternate audio track playback with TS segments.\n\n- Secondary and alternate audio track selection with fMP4 segments.\n\n### Passthrough CEA 608/708 captions\n\nIf the input streams contain CEA 608/708 captions, you can forward the captions\nto the output streams. Add the following [`textStream`](/livestream/docs/reference/rest/v1/projects.locations.channels#textstream) to the\n[`elementaryStreams`](/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) when creating a `Channel`. This `textStream`\nembeds the CEA 608/708 captions in all output video streams and renditions. \n\n {\n \"key\": \"captions\",\n \"textStream\": {\n \"codec\": \"cea608\"\n }\n }\n\n### Sprite sheets\n\nTo generate a sprite sheet, configure the [`spriteSheets`](/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) field in\nthe `Channel` resource. \n\n {\n \"spriteSheets\": [\n {\n \"format\": \"jpeg\",\n \"filePrefix\": \"sprite\",\n \"interval\": \"2s\",\n \"spriteWidthPixels\": 320,\n \"spriteHeightPixels\": 240,\n \"columnCount\": 3,\n \"rowCount\": 3,\n \"quality\": 80\n }\n ]\n }"]]