- [Resource: LiveStream](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams.md.txt#LiveStream)
  - [JSON representation](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams.md.txt#LiveStream.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams.md.txt#METHODS_SUMMARY)

## Resource: LiveStream

A `liveStream` resource contains information about the video stream that you are transmitting to YouTube. The stream provides the content that is broadcast to YouTube users. Once created, a `liveStream` resource can be bound to one or more [`liveBroadcast`](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts) resources.

| JSON representation |
|---|
| ``` { "kind": string, "etag": string, "id": string, "snippet": { "publishedAt": string, "channelId": string, "title": string, "description": string, "isDefaultStream": boolean }, "cdn": { "format": string, "ingestionType": enum, "ingestionInfo": { "streamName": string, "ingestionAddress": string, "backupIngestionAddress": string, "rtmpsIngestionAddress": string, "rtmpsBackupIngestionAddress": string }, "resolution": enum, "frameRate": enum }, "status": { "streamStatus": enum, "healthStatus": { "status": enum, "lastUpdateTimeSeconds": string, "configurationIssues": [ { "type": enum, "severity": enum, "reason": string, "description": string } ] } }, "contentDetails": { "closedCaptionsIngestionUrl": string, "isReusable": boolean } } ``` |

| Fields ||
|---|---|
| `kind` | `string` Output only. Identifies what kind of resource this is. Value: the fixed string `"youtube#liveStream"`. |
| `etag` | `string` Output only. Etag of this resource. |
| `id` | `string` The ID that YouTube assigns to uniquely identify the stream. |
| `snippet` | `object` The `snippet` object contains basic details about the stream, including its channel, title, and description. |
| `snippet.publishedAt` | `string` Output only. The date and time that the stream was created. The value is specified in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) (`YYYY-MM-DDThh:mm:ssZ`) format. |
| `snippet.channelId` | `string` Output only. The ID that YouTube uses to uniquely identify the channel that is transmitting the stream. |
| `snippet.title` | `string` The stream's title. The value must be between 1 and 128 characters long and can't contain `<` or `>` characters. Leading and trailing whitespace is trimmed. |
| `snippet.description` | `string` The stream's description. The value can't exceed 10,000 bytes (UTF-8 encoded) and can't contain `<` or `>` characters. Leading and trailing whitespace is trimmed. |
| `snippet.isDefaultStream (deprecated)` | `boolean` Output only. Deprecated: Indicates whether this stream is the channel's default stream. YouTube stopped creating default streams in October 2020, so this value is `false` for streams created after that time. |
| `cdn` | `object` The `cdn` object defines the live stream's content delivery network (CDN) settings. These settings provide details about the manner in which you stream your content to YouTube. |
| `cdn.format (deprecated)` | `string` Deprecated: No longer supported; any supplied value is ignored. Use `cdn.frameRate` and `cdn.resolution` instead to specify the frame rate and resolution separately. |
| `cdn.ingestionType` | `enum` The method or protocol used to transmit the video stream. The `rtmp` value includes RTMPS. Valid values of this enum field are: - `rtmp` - `dash` - `hls` |
| `cdn.ingestionInfo` | `object` Output only. The `ingestionInfo` object contains information that YouTube provides that you need to transmit your stream to YouTube. |
| `cdn.ingestionInfo.streamName` | `string` Output only. The stream name that YouTube assigns to the video stream. |
| `cdn.ingestionInfo.ingestionAddress` | `string` Output only. The primary ingestion URL that you should use to stream video to YouTube if you use RTMP, DASH, or HLS. You must stream video to this URL. Depending on which application or tool you use to encode your video stream, you may need to enter the stream URL and stream name separately or concatenate them in the format `STREAM_URL/STREAM_NAME`. |
| `cdn.ingestionInfo.backupIngestionAddress` | `string` Output only. The backup ingestion URL that you should use to stream video to YouTube if you use RTMP, DASH, or HLS. You have the option of simultaneously streaming the content that you are sending to `ingestionAddress` to this URL. |
| `cdn.ingestionInfo.rtmpsIngestionAddress` | `string` Output only. The primary ingestion URL that you should use to stream video to YouTube instead of `ingestionAddress` when streaming using RTMPS. Not applicable to non-RTMP streams. Depending on which application or tool you use to encode your video stream, you may need to enter the stream URL and stream name separately or concatenate them in the format `STREAM_URL/STREAM_NAME`. |
| `cdn.ingestionInfo.rtmpsBackupIngestionAddress` | `string` Output only. The backup ingestion URL that you should use to stream video to YouTube instead of `backupIngestionAddress` when streaming using RTMPS. Not applicable to non-RTMP streams. |
| `cdn.resolution` | `enum` The resolution of the inbound video data. Set this property to `variable` to have YouTube automatically detect your streamed video's resolution; when using `variable`, you must also set `cdn.frameRate` to `variable`. Setting `cdn.frameRate` to `60fps` requires a resolution of `720p`, `1080p`, `1440p`, or `2160p`. See the YouTube Help Center for [recommended encoder settings](https://support.google.com/youtube/answer/2853702). Valid values of this enum field are: - `240p` - `360p` - `480p` - `720p` - `1080p` - `1440p` - `2160p` - `variable` |
| `cdn.frameRate` | `enum` The frame rate of the inbound video data. Set this property to `variable` to have YouTube automatically detect your streamed video's frame rate; when using `variable`, you must also set `cdn.resolution` to `variable`. The `60fps` value is only valid when `cdn.resolution` is `720p`, `1080p`, `1440p`, or `2160p`. See the YouTube Help Center for [recommended encoder settings](https://support.google.com/youtube/answer/2853702). Valid values of this enum field are: - `30fps` - `60fps` - `variable` |
| `status` | `object` The `status` object contains information about the live stream's status. |
| `status.streamStatus` | `enum` Output only. The stream's status. The API returns `ready` (the stream has valid CDN settings), `active` (YouTube is receiving data on the stream), or `inactive` (YouTube isn't receiving data on the stream). Legacy enum values `created` (stream created without valid CDN settings) and `error` (an error condition exists on the stream) aren't returned. Valid values of this enum field are: - `created` - `ready` - `active` - `inactive` - `error` |
| `status.healthStatus` | `object` Output only. Contains information about the live stream's health status, which helps identify, diagnose, and resolve streaming problems. |
| `status.healthStatus.status` | `enum` Output only. The health status code of the stream. Live health data is populated only when `status.streamStatus` is `active`; otherwise the value is `noData`. Valid values: `good` (no configuration issues with severity `warning` or worse), `ok` (one or more configuration issues with severity `warning`, and none with severity `error`), `bad` (one or more configuration issues with severity `error`), and `noData` (YouTube's live streaming servers have no health information for the stream). The `revoked` enum value isn't returned. Valid values of this enum field are: - `good` - `ok` - `bad` - `noData` - `revoked` |
| `status.healthStatus.lastUpdateTimeSeconds` | `string` Output only. The last time that the stream's health status was updated, as a UNIX timestamp in seconds. The API doesn't populate this field. |
| `status.healthStatus.configurationIssues[]` | `object` Output only. A list of configuration issues affecting the stream. |
| `status.healthStatus.configurationIssues[].type` | `enum` Output only. Identifies the type of configuration issue affecting the stream. See [Configuration Issues for LiveStream Resources](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams/health_status_messages) for issue details. The `videoResolutionSuboptimal` enum value isn't emitted. Valid values of this enum field are: - `gopSizeOver` - `gopSizeLong` - `gopSizeShort` - `openGop` - `badContainer` - `audioBitrateHigh` - `audioBitrateLow` - `audioSampleRate` - `bitrateHigh` - `bitrateLow` - `audioCodec` - `videoCodec` - `noAudioStream` - `noVideoStream` - `multipleVideoStreams` - `multipleAudioStreams` - `audioTooManyChannels` - `interlacedVideo` - `frameRateHigh` - `resolutionMismatch` - `videoCodecMismatch` - `videoInterlaceMismatch` - `videoProfileMismatch` - `videoBitrateMismatch` - `framerateMismatch` - `gopMismatch` - `audioSampleRateMismatch` - `audioStereoMismatch` - `audioCodecMismatch` - `audioBitrateMismatch` - `videoResolutionSuboptimal` - `videoResolutionUnsupported` - `videoIngestionStarved` - `videoIngestionFasterThanRealtime` |
| `status.healthStatus.configurationIssues[].severity` | `enum` Output only. Indicates how severe the issue is to the stream. `info` means the video is broadcast to viewers with no adverse effect on performance; `warning` means the video is broadcast to viewers, but performance isn't optimal; `error` means the video can't be broadcast to viewers. Valid values of this enum field are: - `info` - `warning` - `error` |
| `status.healthStatus.configurationIssues[].reason` | `string` Output only. A short description of the issue. See [Configuration Issues for LiveStream Resources](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams/health_status_messages) for the reason associated with each issue type. |
| `status.healthStatus.configurationIssues[].description` | `string` Output only. A detailed description of the issue and, when possible, how to resolve it. See [Configuration Issues for LiveStream Resources](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams/health_status_messages) for details. |
| `contentDetails` | `object` The `contentDetails` object contains information about the stream, including the closed captions ingestion URL. |
| `contentDetails.closedCaptionsIngestionUrl` | `string` Output only. The ingestion URL where the closed captions of this stream are sent. |
| `contentDetails.isReusable` | `boolean` Indicates whether the stream is reusable, which means that it can be bound to multiple broadcasts. It is common for broadcasters to reuse the same stream for many different broadcasts if those broadcasts occur at different times. The default value is `true`, and this property can't be changed after the stream is created. If you set this value to `false`, the stream isn't reusable, which means that it can only be bound to one broadcast. Non-reusable streams differ from reusable streams in the following ways: - A non-reusable stream can only be bound to one broadcast. - A non-reusable stream might be deleted by an automated process after the broadcast ends. - The [`liveStreams.list`](https://developers.google.com/youtube/data/reference/rest/v3/liveStreams/list.md.txt) method doesn't list non-reusable streams if you call the method and set the `mine` parameter to `true`. The only way to retrieve the resource for a non-reusable stream using that method is to specify the stream's `id` parameter. |

| ## Methods ||
|---|---|
| ### `delete` | Deletes a video stream. |
| ### `insert` | Creates a video stream. |
| ### `list` | Returns a list of video streams that match the API request parameters. |
| ### `update` | Updates a video stream. |