이 페이지에서는 라이브 스트림에 AI 생성 자막 및 번역된 자막 (즉, 번역)을 구성하는 방법을 설명합니다.
AI 생성 자막 및 번역은 HLS 및 DASH 라이브 스트림에서 지원됩니다.
시작하기 전에
이 페이지에서는 HLS 라이브 스트림 빠른 시작 또는 MPEG-DASH 라이브 스트림 빠른 시작 의 시작하기 전에 섹션의 단계를 완료했다고 가정하고 진행합니다.
지원되는 위치
AI 생성 자막의 언어 코드는 위치별로 지원됩니다.
위치 표시
위치
지원되는 언어 코드
asia-northeast1
en-US
asia-south1
en-IN
en-GB
en-US
asia-southeast1
en-US
australia-southeast1
en-AU
europe-west1
da-DK
nl-NL
en-GB
en-US
fr-FR
de-DE
it-IT
es-ES
europe-west2
en-GB
europe-west3
da-DK
nl-NL
en-GB
en-US
fr-FR
de-DE
it-IT
es-ES
northamerica-northeast1
en-CA
fr-CA
us-central1
en-US
pt-BR
es-CO
es-MX
es-US
us-east1
en-US
pt-BR
es-CO
es-MX
es-US
us-west1
en-US
pt-BR
es-CO
es-MX
es-US
AI 생성 번역 기능은 us-west1
및 europe-west1
에서만 지원됩니다.
이 페이지의 모든 API 요청에 us-west1
또는 europe-west1
을 사용합니다.
기본 입력 엔드포인트를 만들려면 projects.locations.inputs.create
메서드를 사용합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 입력 엔드포인트를 만들 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
INPUT_ID
: 입력 스트림을 전송할 새 입력 엔드포인트에 대한 사용자 정의 식별자입니다. 이 값은 1~63자(영문 기준)여야 하고 [a-z0-9]
로 시작하고 끝나야 하며 문자 사이에 대시(-)를 포함할 수 있습니다. 예를 들면 my-input
입니다.
JSON 요청 본문:
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
요청 본문을 request.json
파일에 저장합니다.
터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.
cat > request.json << 'EOF'
{
"type": "RTMP_PUSH"
}
EOF
그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /inputs?inputId=INPUT_ID "
PowerShell(Windows)
요청 본문을 request.json
파일에 저장합니다.
터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.
@'
{
"type": "RTMP_PUSH"
}
'@ | Out-File -FilePath request.json -Encoding utf8
그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method POST ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -InFile request.json ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /inputs?inputId=INPUT_ID " | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID ",
"verb": "create",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
반환된 OPERATION_ID 를 복사하여 다음 섹션에 사용합니다.
결과 확인
projects.locations.operations.get
메서드를 사용하여 입력 엔드포인트가 생성되었는지 확인합니다. 응답에 "done: false"
가 포함되어 있으면 응답에 "done: true"
가 포함될 때까지 명령어를 반복합니다. 리전에서 첫 번째 입력 엔드포인트를 만드는 데 최대 10분까지 걸릴 수 있습니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 입력 엔드포인트가 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
OPERATION_ID
: 작업의 식별자
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID "
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method GET ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID " | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"endTime": END_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID ",
"verb": "create",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.Input",
"name": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID ",
"createTime": CREATE_TIME ,
"updateTime": UPDATE_TIME ,
"type": "RTMP_PUSH",
"uri": INPUT_STREAM_URI , # For example, "rtmp://1.2.3.4/live/b8ebdd94-c8d9-4d88-a16e-b963c43a953b",
"tier": "HD"
}
}
uri
필드를 찾고 나중에 입력 스트림 보내기 섹션에서 사용할 반환된 INPUT_STREAM_URI 를 복사합니다.
채널 만들기
채널을 만들려면 projects.locations.channels.create
메서드를 사용합니다.
채널 구성에서 다음 사항에 유의하세요.
하나의 ElementaryStream
, 즉 TextStream
이 자막에 사용됩니다.
{
"key" : "webvtt_english_ai" ,
"textStream" : {
"codec" : "webvtt" ,
"displayName" : "English (AI captioned)" ,
"languageCode" : "en-US" ,
"mapping" : [
{
"inputTrack" : 1 // audio track number
}
]
}
}
TextStream
codec
필드는 webvtt
로 설정되어야 합니다.
TextStream
mapping
필드는 inputTrack
을 사용하여 자막을 생성할 입력 오디오 트랙을 지정합니다. 매핑에는 사용자 제공 자막에만 사용되는 inputCeaChannel
필드가 포함되어서는 안 됩니다 .
languageCode
를 오디오 트랙에서 사용된 언어로 설정합니다.
기본 스트림은 키 vtt_english_ai
이 있는 MuxStream
을 만드는 데 사용됩니다.
{
"key" : "vtt_english_ai" ,
"container" : "vtt" ,
"elementaryStreams" : [
"webvtt_english_ai"
],
"segmentSettings" : {
"segmentDuration" : "2s"
}
}
그런 다음 이 mux 스트림은 HLS 및 DASH 매니페스트 모두에서 참조됩니다.
{
"fileName" : "main.m3u8" ,
"type" : "HLS" ,
"muxStreams" : [
"mux_video_ts" ,
"vtt_english_ai"
],
"maxSegmentCount" : 5
}
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널을 만들 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 만들려는 채널의 사용자 정의 식별자입니다. 이 값은 1~63자(영문 기준)여야 하고 [a-z0-9]
로 시작하고 끝나야 하며 문자 사이에 대시(-)를 포함할 수 있습니다.
INPUT_ID
: 입력 엔드포인트의 사용자 정의 식별자입니다.
BUCKET_NAME
: 실시간 스트림 매니페스트 및 세그먼트 파일을 보관하기 위해 만든 Cloud Storage 버킷의 이름입니다.
JSON 요청 본문:
{
"inputAttachments": [
{
"key": "my-input",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai"
],
"maxSegmentCount": 5
}
]
}
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
요청 본문을 request.json
파일에 저장합니다.
터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.
cat > request.json << 'EOF'
{
"inputAttachments": [
{
"key": "my-input",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai"
],
"maxSegmentCount": 5
}
]
}
EOF
그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels?channelId=CHANNEL_ID "
PowerShell(Windows)
요청 본문을 request.json
파일에 저장합니다.
터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.
@'
{
"inputAttachments": [
{
"key": "my-input",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai"
],
"maxSegmentCount": 5
}
]
}
'@ | Out-File -FilePath request.json -Encoding utf8
그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method POST ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -InFile request.json ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels?channelId=CHANNEL_ID " | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"verb": "create",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
채널 가져오기
새 작업 ID를 사용하여 작업 결과를 확인 할 수 있습니다.
채널이 생성되면 projects.locations.channels.get
메서드를 사용하여 채널 상태를 쿼리합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널이 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 채널의 사용자 정의 식별자
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID "
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method GET ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID " | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"createTime": CREATE_TIME ,
"updateTime": UPDATE_TIME ,
"inputAttachments": [
{
"key": "INPUT_ID ",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"activeInput": "INPUT_ID ",
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai"
],
"maxSegmentCount": 5
}
],
"streamingState": "STOPPED"
}
전체 응답에는 다음 필드가 포함됩니다.
{
...
"streamingState": "STOPPED"
...
}
이 응답은 이제 채널을 시작할 수 있음을 나타냅니다.
채널 시작
projects.locations.channels.start
메서드를 사용하여 채널을 시작합니다. 입력 스트림을 수락하거나 출력 스트림을 생성하려면 먼저 채널을 시작해야 합니다.
리전에서 첫 번째 채널을 시작하는 데는 약 10분이 걸립니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널이 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 채널의 사용자 정의 식별자
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d "" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID :start"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method POST ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID :start" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"verb": "start",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
채널이 시작되었는지 확인하려면 이전과 같이 채널 정보 가져오기 를 수행합니다. 응답에 다음이 포함되어야 합니다.
{
...
"streamingState": "AWAITING_INPUT"
...
}
채널이 준비되었으면 입력 스트림을 입력 엔드포인트로 전송하여 라이브 스트림을 생성합니다. 자막이 포함된 MP4 (또는 기타 TEST_VOD_FILE )를 다운로드하고 ffmpeg
를 사용하여 입력 엔드포인트로 전송할 수 있습니다.
새 터미널 창을 엽니다. 결과 확인 섹션에서 INPUT_STREAM_URI 를 사용하여 다음 명령어를 실행합니다.
ffmpeg -re -stream_loop -1 -i "TEST_VOD_FILE " \
-c:v copy -c:a aac -strict 2 -f "flv" "INPUT_STREAM_URI "
참고: 입력 엔드포인트가 RTMP 프로토콜을 사용하는 경우 flv
형식을 사용하세요. SRT 프로토콜에는 mpegts
를 사용합니다.
출력 매니페스트에서 자막 확인
다음 명령어를 실행하여 생성된 HLS 매니페스트의 콘텐츠를 확인합니다.
gcloud storage cat gs://BUCKET_NAME /main.m3u8
AI 생성 webvtt 영어 자막은 다음과 비슷한 출력 매니페스트로 표시됩니다.
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="sub",LANGUAGE="en-US",NAME="English (AI captioned)",AUTOSELECT=YES,DEFAULT=YES,FORCED=NO,URI="vtt_english_ai/index-1.m3u8"
채널 중지
채널 구성을 업데이트하려면 먼저 채널을 중지해야 합니다.
projects.locations.channels.stop
메서드를 사용하여 채널을 중지합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널이 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 채널의 사용자 정의 식별자
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d "" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID :stop"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method POST ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID :stop" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"verb": "stop",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
번역의 채널 구성 업데이트
번역된 자막 (즉, 번역)을 포함하도록 채널 구성을 업데이트합니다.
채널 구성에 대한 다음 추가 항목 에 유의하세요.
하나의 ElementaryStream
인 TextStream
이 단일 번역된 언어의 자막에 사용됩니다.
{
"key" : "webvtt_spanish_ai" ,
"textStream" : {
"codec" : "webvtt" ,
"displayName" : "Spanish (AI captioned)" ,
"languageCode" : "es-MX" ,
"mapping" : [
{
"inputTrack" : 1 , // audio track number
"fromLanguageCode" : "en-US" // original audio in English
}
]
}
}
languageCode
를 선택한 번역된 언어로 설정합니다.
fromLanguageCode
를 오디오 트랙의 원래 출발어로 설정합니다.
기본 스트림은 키 vtt_spanish_ai
이 있는 MuxStream
을 만드는 데 사용됩니다.
{
"key" : "vtt_spanish_ai" ,
"container" : "vtt" ,
"elementaryStreams" : [
"webvtt_spanish_ai"
],
"segmentSettings" : {
"segmentDuration" : "2s"
}
}
그런 다음 이 mux 스트림은 HLS 및 DASH 매니페스트 모두에서 참조됩니다.
{
"fileName" : "main.m3u8" ,
"type" : "HLS" ,
"muxStreams" : [
"mux_video_ts" ,
"vtt_english_ai" ,
"vtt_spanish_ai"
],
"maxSegmentCount" : 5
}
채널을 업데이트하려면 projects.locations.channels.patch
메서드를 사용합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널을 만들 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 만들려는 채널의 사용자 정의 식별자입니다. 이 값은 1~63자(영문 기준)여야 하고 [a-z0-9]
로 시작하고 끝나야 하며 문자 사이에 대시(-)를 포함할 수 있습니다.
JSON 요청 본문:
{
"inputAttachments": [
{
"key": "my-input",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
},
{
"key": "webvtt_spanish_ai",
"textStream": {
"codec": "webvtt",
"displayName": "Spanish (AI captioned)",
"languageCode": "es-MX",
"mapping": [
{
"inputTrack": 1,
"fromLanguageCode": "en-US"
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_spanish_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_spanish_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai",
"vtt_spanish_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai",
"vtt_spanish_ai"
],
"maxSegmentCount": 5
}
]
}
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
요청 본문을 request.json
파일에 저장합니다.
터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.
cat > request.json << 'EOF'
{
"inputAttachments": [
{
"key": "my-input",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
},
{
"key": "webvtt_spanish_ai",
"textStream": {
"codec": "webvtt",
"displayName": "Spanish (AI captioned)",
"languageCode": "es-MX",
"mapping": [
{
"inputTrack": 1,
"fromLanguageCode": "en-US"
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_spanish_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_spanish_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai",
"vtt_spanish_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai",
"vtt_spanish_ai"
],
"maxSegmentCount": 5
}
]
}
EOF
그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.
curl -X PATCH \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ?updateMask=elementary_streams,mux_streams,manifests"
PowerShell(Windows)
요청 본문을 request.json
파일에 저장합니다.
터미널에서 다음 명령어를 실행하여 현재 디렉터리에 이 파일을 만들거나 덮어씁니다.
@'
{
"inputAttachments": [
{
"key": "my-input",
"input": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
}
],
"output": {
"uri": "gs://BUCKET_NAME "
},
"elementaryStreams": [
{
"key": "es_video",
"videoStream": {
"h264": {
"profile": "high",
"widthPixels": 1280,
"heightPixels": 720,
"bitrateBps": 3000000,
"frameRate": 30
}
}
},
{
"key": "es_audio",
"audioStream": {
"codec": "aac",
"channelCount": 2,
"bitrateBps": 160000
}
},
{
"key": "webvtt_english_ai",
"textStream": {
"codec": "webvtt",
"displayName": "English (AI captioned)",
"languageCode": "en-US",
"mapping": [
{
"inputTrack": 1
}
]
}
},
{
"key": "webvtt_spanish_ai",
"textStream": {
"codec": "webvtt",
"displayName": "Spanish (AI captioned)",
"languageCode": "es-MX",
"mapping": [
{
"inputTrack": 1,
"fromLanguageCode": "en-US"
}
]
}
}
],
"muxStreams": [
{
"key": "mux_video_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_video"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_audio_fmp4",
"container": "fmp4",
"elementaryStreams": [
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "mux_video_ts",
"container": "ts",
"elementaryStreams": [
"es_video",
"es_audio"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_english_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_english_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
},
{
"key": "vtt_spanish_ai",
"container": "vtt",
"elementaryStreams": [
"webvtt_spanish_ai"
],
"segmentSettings": {
"segmentDuration": "2s"
}
}
],
"manifests": [
{
"key": "manifest_dash",
"fileName": "main.mpd",
"type": "DASH",
"muxStreams": [
"mux_video_fmp4",
"mux_audio_fmp4",
"vtt_english_ai",
"vtt_spanish_ai"
],
"maxSegmentCount": 5
},
{
"key": "manifest_hls",
"fileName": "main.m3u8",
"type": "HLS",
"muxStreams": [
"mux_video_ts",
"vtt_english_ai",
"vtt_spanish_ai"
],
"maxSegmentCount": 5
}
]
}
'@ | Out-File -FilePath request.json -Encoding utf8
그런 후 다음 명령어를 실행하여 REST 요청을 전송합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method PATCH ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -InFile request.json ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ?updateMask=elementary_streams,mux_streams,manifests" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"verb": "update",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
새 작업 ID를 사용하여 작업 결과를 확인 할 수 있습니다.
이전과 마찬가지로 채널을 시작 하고 입력 스트림을 다시 전송 합니다.
출력 매니페스트에서 번역 확인
다음 명령어를 실행하여 생성된 HLS 매니페스트의 콘텐츠를 확인합니다.
gcloud storage cat gs://BUCKET_NAME /main.m3u8
AI 생성 webvtt 영어 및 스페인어 자막은 다음과 비슷한 출력 매니페스트로 표시됩니다.
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="sub",LANGUAGE="en-US",NAME="English (AI captioned)",AUTOSELECT=YES,DEFAULT=YES,FORCED=NO,URI="vtt_english_ai/index-1.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="sub",LANGUAGE="es-MX",NAME="Spanish (AI captioned)",AUTOSELECT=NO,DEFAULT=NO,FORCED=NO,URI="vtt_spanish_ai/index-1.m3u8"
배포를 위해 AI 생성 스크립트 구성
배포를 위해 AI 생성 자막 및 번역을 구성하기 전에 원격 엔드포인트에 라이브 스트림을 배포 하는 방법을 숙지하세요.
AI 생성 자막과 번역을 원격 엔드포인트에 배포하려면 AI 생성 자막으로 채널을 만들 때 와 번역을 위해 채널을 업데이트할 때 이전에 구성된 webvtt
형식의 텍스트 스트림을 참조하지 마세요.
배포용 텍스트 스트림은 codec
이 cea608
또는 cea708
로 설정된 자막이 삽입되어야 합니다.
채널 구성에서 다음 사항을 고려하세요.
하나의 ElementaryStream
인 TextStream
은 자막에 사용되고, 또 다른 ElementaryStream
인 TextStream
은 번역에 사용됩니다.
{
"key" : "embedded_english_ai" ,
"textStream" : {
"codec" : "cea608" ,
"displayName" : "English (AI captioned)" ,
"languageCode" : "en-US" ,
"outputCeaChannel" : "CC1" , // closed caption channel that will contain AI-generated English captions
"mapping" : [
{
"inputTrack" : 1 // audio track number
}
]
}
}
{
"key" : "embedded_spanish_ai" ,
"textStream" : {
"codec" : "cea608" ,
"displayName" : "Spanish (AI captioned)" ,
"languageCode" : "es-MX" ,
"outputCeaChannel" : "CC2" , // closed caption channel that will contain AI-generated Spanish captions
"mapping" : [
{
"inputTrack" : 1 , // audio track number
"fromLanguageCode" : "en-US" // original audio in English
}
]
}
}
TextStream
codec
필드는 cea608
또는 cea708
로 설정되어야 합니다.
TextStream
mapping
필드는 inputTrack
을 사용하여 자막을 생성할 입력 오디오 트랙을 지정합니다. 매핑에는 사용자 제공 자막에만 사용되는 inputCeaChannel
필드가 포함되어서는 안 됩니다 .
배포 스트림에 AI 생성 스크립트를 포함할 자막 채널로 outputCeaChannel
을 설정합니다.
languageCode
를 오디오 트랙에서 사용된 언어로 설정합니다.
기본 스트림은 DistributionStream
객체의 elementaryStreams
필드에 포함됩니다.
{
"distributionStreams" : [
{
"key" : "ds1" ,
"container" : "ts" , // to be used with an SRT distribution
"elementaryStreams" : [
"es_video" ,
"es_audio" ,
"embedded_english_ai" , // distribute both English
"embedded_spanish_ai" // and Spanish captions
]
},
{
"key" : "ds2" ,
"container" : "flv" , // to be used with an RTMP distribution
"elementaryStreams" : [
"es_video" ,
"es_audio" ,
"embedded_spanish_ai" // only distribute Spanish captions
]
}
]
}
원격 엔드포인트에 라이브 스트림 배포 가이드 에 따라 채널 생성을 완료합니다.
고급 구성
채널 수준에서 AutoTranscriptionConfig
을 설정하여 AI 생성 텍스트 스트림을 필요에 맞게 추가로 조정할 수 있습니다.
자막 표시 타이밍
기본적으로 AI 생성 자막은 오디오 및 동영상과 비동기적으로 표시됩니다. AutoTranscriptionConfig
의 DisplayTiming
필드를 SYNC
로 설정하여 동기식으로 표시합니다.
{
"autoTranscriptionConfig" : {
"displayTiming" : "SYNC"
}
}
자막을 동기식으로 표시하면 오디오와 텍스트 간의 시청 지연 시간은 줄어들지만 전체 엔드 투 엔드 미디어 지연 시간은 늘어납니다.
품질 사전 설정
AutoTranscriptionConfig
의 QualityPreset
필드를 사용하여 AI 생성 텍스트 스트림의 품질 환경설정을 구성합니다.
예를 들어 다음을 설정하여 텍스트 스트림 생성의 지연 시간을 추가로 줄일 수 있습니다.
{
"autoTranscriptionConfig" : {
"qualityPreset" : "LOW_LATENCY"
}
}
삭제
채널 중지
projects.locations.channels.stop
메서드를 사용하여 채널을 중지합니다.
채널을 삭제하려면 먼저 채널을 중지해야 합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널이 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 채널의 사용자 정의 식별자
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d "" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID :stop"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method POST ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID :stop" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"verb": "stop",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
ffmpeg
를 사용하여 입력 스트림을 전송한 경우 채널을 중지한 후 자동으로 연결이 끊어집니다.
채널 삭제
projects.locations.channels.delete
메서드를 사용하여 채널을 삭제합니다. 채널에서 사용하는 입력 엔드포인트를 삭제하려면 먼저 채널을 삭제해야 합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 채널이 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
CHANNEL_ID
: 채널의 사용자 정의 식별자
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X DELETE \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID "
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method DELETE ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID " | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /channels/CHANNEL_ID ",
"verb": "delete",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
projects.locations.inputs.delete
메서드를 사용해서 입력 엔드포인트를 삭제합니다.
요청 데이터를 사용하기 전에 다음을 바꿉니다.
PROJECT_NUMBER
: Google Cloud 프로젝트 번호입니다. IAM 설정 페이지의 프로젝트 번호 필드에 있습니다.
LOCATION
: 입력 엔드포인트가 있는 위치. 지원되는 리전 중 하나를 사용합니다.
위치 표시
us-central1
us-east1
us-east4
us-west1
us-west2
northamerica-northeast1
southamerica-east1
asia-east1
asia-east2
asia-south1
asia-northeast1
asia-southeast1
australia-southeast1
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
INPUT_ID
: 입력 엔드포인트의 사용자 정의 식별자입니다.
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X DELETE \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID "
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method DELETE ` -Headers $headers ` -Uri "https://livestream.googleapis.com/v1/projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID " | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"name": "projects/PROJECT_NUMBER /locations/LOCATION /operations/OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.video.livestream.v1.OperationMetadata",
"createTime": CREATE_TIME ,
"target": "projects/PROJECT_NUMBER /locations/LOCATION /inputs/INPUT_ID ",
"verb": "delete",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
Cloud Storage 버킷 삭제
Google Cloud 콘솔에서 Cloud Storage 브라우저 페이지로 이동합니다.
Cloud Storage 브라우저 페이지로 이동
만든 버킷 옆에 있는 확인란을 선택합니다.
삭제 를 클릭합니다.
표시되는 대화상자 창에서 삭제 를 클릭하여 버킷과 콘텐츠를 삭제합니다.