Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. AWS
기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
를 사용한 Amazon IVS 실시간 스트리밍 예제 AWS CLI
다음 코드 예제에서는 Amazon IVS 실시간 스트리밍과 AWS Command Line Interface 함께를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.
작업은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 관련 시나리오의 컨텍스트에 따라 표시되며, 개별 서비스 함수를 직접적으로 호출하는 방법을 보여줍니다.
각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.
주제
작업
다음 코드 예시에서는 create-encoder-configuration 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 인코더 구성을 생성하는 방법
다음
create-encoder-configuration예시에서는 지정된 속성을 사용하여 구성 인코더 구성을 생성합니다.aws ivs-realtime create-encoder-configuration \ --nametest-ec--videobitrate=3500000,framerate=30.0,height=1080,width=1920출력:
{ "encoderConfiguration": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef", "name": "test-ec", "tags": {}, "video": { "bitrate": 3500000, "framerate": 30, "height": 1080, "width": 1920 } } }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateEncoderConfiguration
섹션을 참조하세요.
-
다음 코드 예시는 create-ingest-configuration의 사용 방법을 보여 줍니다.
- AWS CLI
-
수집 구성을 생성하려면
다음
create-ingest-configuration예제에서는 RTMPS 프로토콜을 사용하여 수집 구성을 생성합니다.aws ivs-realtime create-ingest-configuration \ --nameingest1\ --ingest-protocolrtmps출력:
{ "ingestConfiguration": { "name": "ingest1", "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234", "ingestProtocol": "RTMPS", "streamKey": "rt_123456789012_us-west-2_AbCdEfGh1234_abcd1234efgh5678ijkl9012MNOP34", "stageArn": "", "participantId": "xyZ654abC321", "state": "INACTIVE", "userId": "", "tags": {} } }자세한 내용은 Amazon Interactive Video Service 사용 설명서의 IVS Stream Ingest | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateIngestConfiguration
을 참조하세요.
-
다음 코드 예시는 create-participant-token의 사용 방법을 보여 줍니다.
- AWS CLI
-
스테이지 참가자 토큰 생성
다음
create-participant-token예시에서는 지정된 스테이지의 참가자 토큰을 생성합니다.aws ivs-realtime create-participant-token \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --user-idbob출력:
{ "participantToken": { "expirationTime": "2023-03-07T09:47:43+00:00", "participantId": "ABCDEfghij01234KLMN6789", "token": "abcd1234defg5678" } }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateParticipantToken
섹션을 참조하세요.
-
다음 코드 예시에서는 create-stage 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
예시 1: 스테이지 생성
다음
create-stage예시에서는 지정된 사용자의 스테이지 참가자 토큰 및 스테이지를 생성합니다.aws ivs-realtime create-stage \ --namestage1\ --participant-token-configurationsuserId=alice출력:
{ "participantTokens": [ { "participantId": "ABCDEfghij01234KLMN5678", "token": "a1b2c3d4567890ab", "userId": "alice" } ], "stage": { "activeSessionId": "st-a1b2c3d4e5f6g", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "autoParticipantRecordingConfiguration": { "storageConfigurationArn": "", "mediaTypes": [ "AUDIO_VIDEO" ], "thumbnailConfiguration": { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], "recordingMode": "DISABLED" }, "recordingReconnectWindowSeconds": 0, "hlsConfiguration": { "targetSegmentDurationSeconds": 6 }, "recordParticipantReplicas": true }, "endpoints": { "events": "wss://global.events.live-video.net", "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/", "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/", "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net" }, "name": "stage1", "tags": {} } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예시 2: 스테이지를 생성하고 개별 참가자 레코딩을 구성하는 방법
다음
create-stage예시에서는 스테이지를 생성하고 개별 참가자의 레코딩을 구성합니다.aws ivs-realtime create-stage \ --namestage1\ --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \ "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}'출력:
{ "stage": { "activeSessionId": "st-a1b2c3d4e5f6g", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "autoParticipantRecordingConfiguration": { "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh" "mediaTypes": [ "AUDIO_VIDEO" ], "thumbnailConfiguration": { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], "recordingMode": "DISABLED" }, "recordingReconnectWindowSeconds": 100, "hlsConfiguration": { "targetSegmentDurationSeconds": 5 }, "recordParticipantReplicas": true }, "endpoints": { "events": "wss://global.events.live-video.net", "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/", "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/", "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net" }, "name": "stage1", "tags": {} } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 3: 단계를 만들고 썸네일 레코딩을 사용 설정하여 개별 참가자 레코딩 구성
다음
create-stage예제에서는 단계를 만들고 썸네일 레코딩을 사용 설정하여 개별 참가자 레코딩을 구성합니다.aws ivs-realtime create-stage \ --namestage1\ --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", \ "thumbnailConfiguration": {"recordingMode": "INTERVAL","storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}}'출력:
{ "stage": { "activeSessionId": "st-a1b2c3d4e5f6g", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "autoParticipantRecordingConfiguration": { "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "mediaTypes": [ "AUDIO_VIDEO" ], "thumbnailConfiguration": { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], "recordingMode": "INTERVAL" }, "recordingReconnectWindowSeconds": 0, "hlsConfiguration": { "targetSegmentDurationSeconds": 6 }, "recordParticipantReplicas": true }, "endpoints": { "events": "wss://global.events.live-video.net", "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/", "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/", "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net" }, "name": "stage1", "tags": {} } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateStage
섹션을 참조하세요.
-
다음 코드 예시에서는 create-storage-configuration 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 스토리지 구성을 생성하는 방법
다음
create-storage-configuration예시에서는 지정된 속성을 사용하여 구성 스토리지 구성을 생성합니다.aws ivs-realtime create-storage-configuration \ --name"test-sc"--s3"bucketName=amzn-s3-demo-bucket"출력:
{ "storageConfiguration": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABabCDcdEFef", "name": "test-sc", "s3": { "bucketName": "amzn-s3-demo-bucket" }, "tags": {} } }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateStorageConfiguration
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-encoder-configuration 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 인코더 구성을 삭제하는 방법
다음
delete-encoder-configuration은 지정된 Amazon 리소스 이름(ARN)에서 지정한 구성 인코더 구성을 삭제합니다.aws ivs-realtime delete-encoder-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteEncoderConfiguration
섹션을 참조하세요.
-
다음 코드 예시는 delete-ingest-configuration의 사용 방법을 보여 줍니다.
- AWS CLI
-
예제 1: 비활성 수집 구성 삭제
다음
delete-ingest-configuration예제에서는 지정된 수집 구성 ARN(Amazon Resource Name)에 대한 비활성 수집 구성을 삭제합니다.aws ivs-realtime delete-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용 설명서의 IVS Stream Ingest | 실시간 스트리밍을 참조하세요.
예제 2: 활성 수집 구성을 강제 삭제
다음
delete-ingest-configuration예제에서는 지정된 수집 구성 ARN(Amazon Resource Name)에 대한 활성 수집 구성을 강제로 삭제합니다.aws ivs-realtime delete-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234\ --force이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용 설명서의 IVS Stream Ingest | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteIngestConfiguration
을 참조하세요.
-
다음 코드 예시는 delete-public-key의 사용 방법을 보여 줍니다.
- AWS CLI
-
퍼블릭 키 삭제
다음
delete-public-key는 지정된 퍼블릭 키를 삭제합니다.aws ivs-realtime delete-public-key \ --arnarn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 참가자 토큰 배포를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DeletePublicKey
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-stage 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 삭제
다음
delete-stage예시에서는 지정된 스테이지를 삭제합니다.aws ivs-realtime delete-stage \ --arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteStage
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-storage-configuration 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 스토리지 구성을 삭제하는 방법
다음
delete-storage-configuration은 지정된 Amazon 리소스 이름(ARN)에서 지정한 구성 스토리지 구성을 삭제합니다.aws ivs-realtime delete-storage-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABabCDcdEFef"이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteStorageConfiguration
섹션을 참조하세요.
-
다음 코드 예시에서는 disconnect-participant 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 참가자 연결 해제
다음
disconnect-participant예시에서는 지정된 참가자를 지정된 스테이지에서 연결 해제합니다.aws ivs-realtime disconnect-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --participant-idABCDEfghij01234KLMN5678이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DisconnectParticipant
섹션을 참조하세요.
-
다음 코드 예시에서는 get-composition 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
예시 1: 기본 레이아웃 설정을 사용하여 구성을 가져오는 방법
다음
get-composition예시에서는 지정된 Amazon 리소스 이름(ARN)의 구성을 가져옵니다.aws ivs-realtime get-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"출력:
{ "composition": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh", "destinations": [ { "configuration": { "channel": { "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" }, "name": "" }, "id": "AabBCcdDEefF", "startTime": "2023-10-16T23:26:00+00:00", "state": "ACTIVE" }, { "configuration": { "name": "", "s3": { "encoderConfigurationArns": [ "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" ], "recordingConfiguration": { "format": "HLS", "hlsConfiguration": { "targetSegmentDurationSeconds": 2 } }, "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE", } }, "detail": { "s3": { "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite" } }, "id": "GHFabcgefABC", "startTime": "2023-10-16T23:26:00+00:00", "state": "STARTING" } ], "layout": { "grid": { "featuredParticipantAttribute": "" "gridGap": 2, "omitStoppedVideo": false, "videoAspectRatio": "VIDEO", "videoFillMode": "" } }, "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:24:00+00:00", "state": "ACTIVE", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용 설명서의 IVS 복합 레코딩 | 실시간 스트리밍을 참조하세요.
예시 2: PiP 레이아웃을 사용하여 구성을 가져오는 방법
다음
get-composition예시에서는 PiP 레이아웃을 사용하는 지정된 Amazon 리소스 이름(ARN)의 구성을 가져옵니다.aws ivs-realtime get-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs"출력:
{ "composition": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs", "destinations": [ { "configuration": { "channel": { "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" }, "name": "" }, "id": "AabBCcdDEefF", "startTime": "2023-10-16T23:26:00+00:00", "state": "ACTIVE" }, { "configuration": { "name": "", "s3": { "encoderConfigurationArns": [ "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" ], "recordingConfiguration": { "format": "HLS", "hlsConfiguration": { "targetSegmentDurationSeconds": 2 } }, "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE" } }, "detail": { "s3": { "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite" } }, "id": "GHFabcgefABC", "startTime": "2023-10-16T23:26:00+00:00", "state": "STARTING" } ], "layout": { "pip": { "featuredParticipantAttribute": "abcdefg", "gridGap": 0, "omitStoppedVideo": false, "pipBehavior": "STATIC", "pipOffset": 0, "pipParticipantAttribute": "", "pipPosition": "BOTTOM_RIGHT", "videoFillMode": "COVER" } }, "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:24:00+00:00", "state": "ACTIVE", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용 설명서의 IVS 복합 레코딩 | 실시간 스트리밍을 참조하세요.
예제 3: 썸네일 레코딩을 사용 설정하여 구성 가져오기
다음
get-composition예제에서는 지정된 ARN(Amazon 리소스 이름)의 구성을 가져옵니다.이 ARN에는 기본 설정으로 썸네일 레코딩이 사용 설정되어 있습니다.aws ivs-realtime get-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"출력:
{ "composition": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh", "destinations": [ { "configuration": { "channel": { "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" }, "name": "" }, "id": "AabBCcdDEefF", "startTime": "2023-10-16T23:26:00+00:00", "state": "ACTIVE" }, { "configuration": { "name": "", "s3": { "encoderConfigurationArns": [ "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" ], "recordingConfiguration": { "format": "HLS", "hlsConfiguration": { "targetSegmentDurationSeconds": 2 } }, "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE", "thumbnailConfigurations": [ { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], } ] } }, "detail": { "s3": { "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite" } }, "id": "GHFabcgefABC", "startTime": "2023-10-16T23:26:00+00:00", "state": "STARTING" } ], "layout": { "grid": { "featuredParticipantAttribute": "" "gridGap": 2, "omitStoppedVideo": false, "videoAspectRatio": "VIDEO", "videoFillMode": "" } }, "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:24:00+00:00", "state": "ACTIVE", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용 설명서의 IVS 복합 레코딩 | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetComposition
섹션을 참조하세요.
-
다음 코드 예시에서는 get-encoder-configuration 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 인코더 구성을 가져오는 방법
다음
get-encoder-configuration예시에서는 지정된 Amazon 리소스 이름(ARN)에서 지정한 구성 인코더 구성을 가져옵니다.aws ivs-realtime get-encoder-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh"출력:
{ "encoderConfiguration": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh", "name": "test-ec", "tags": {}, "video": { "bitrate": 3500000, "framerate": 30, "height": 1080, "width": 1920 } } }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetEncoderConfiguration
섹션을 참조하세요.
-
다음 코드 예시는 get-ingest-configuration의 사용 방법을 보여 줍니다.
- AWS CLI
-
수집 구성 정보를 가져오려면
다음
get-ingest-configuration예제에서는 지정된 수집 구성 ARN(Amazon Resource Name)에 대한 수집 구성을 가져옵니다.aws ivs-realtime get-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234출력:
{ "ingestConfiguration": { "name": "ingest1", "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234", "ingestProtocol": "RTMPS", "streamKey": "rt_123456789012_us-west-2_AbCdEfGh1234_abcd1234efgh5678ijkl9012MNOP34", "stageArn": "", "participantId": "xyZ654abC321", "state": "INACTIVE", "userId": "", "tags": {} } }자세한 내용은 Amazon Interactive Video Service 사용 설명서의 IVS Stream Ingest | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetIngestConfiguration
을 참조하세요.
-
다음 코드 예시는 get-participant의 사용 방법을 보여 줍니다.
- AWS CLI
-
예제 1: 스테이지 참가자를 가져오려면
다음
get-participant예시에서는 지정된 스테이지 Amazon 리소스 이름(ARN)의 지정된 참가자 ID 및 세션 ID에 대한 스테이지 참가자를 가져옵니다.aws ivs-realtime get-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIj출력:
{ "participant": { "browserName": "Google Chrome", "browserVersion": "116", "firstJoinTime": "2023-04-26T20:30:34+00:00", "ispName": "Comcast", "osName": "Microsoft Windows 10 Pro", "osVersion": "10.0.19044", "participantId": "abCDEf12GHIj", "published": true, "recordingS3BucketName": "bucket-name", "recordingS3Prefix": "abcdABCDefgh/st-a1b2c3d4e5f6g/abCDEf12GHIj/1234567890", "recordingState": "ACTIVE", "sdkVersion": "", "state": "CONNECTED", "userId": "" } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 2: 다른 스테이지에 복제된 스테이지 참가자를 가져오려면
다음
get-participant예제에서는 참가자가 다른 스테이지에도 복제된 경우, 지정된 스테이지 ARN(Amazon 리소스 이름)에서 지정된 참가자 ID 및 세션 ID에 대한 스테이지 참가자를 가져옵니다.aws ivs-realtime get-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIj출력:
{ "participant": { "browserName": "Google Chrome", "browserVersion": "116", "firstJoinTime": "2023-04-26T20:30:34+00:00", "ispName": "Comcast", "osName": "Microsoft Windows 10 Pro", "osVersion": "10.0.19044", "participantId": "abCDEf12GHIj", "published": true, "recordingS3BucketName": "bucket-name", "recordingS3Prefix": "abcdABCDefgh/st-a1b2c3d4e5f6g/abCDEf12GHIj/1234567890", "recordingState": "ACTIVE", "replicationState": "ACTIVE", "replicationType": "SOURCE", "sdkVersion": "", "state": "CONNECTED", "userId": "" } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 3: 다른 스테이지에서 복제된 스테이지 참가자를 가져오려면
다음
get-participant예제에서는 참가자가 다른 스테이지에서 복제된 경우, 지정된 스테이지 ARN(Amazon 리소스 이름)에서 지정된 참가자 ID 및 세션 ID에 대한 스테이지 참가자를 가져옵니다.aws ivs-realtime get-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIj출력:
{ "participant": { "browserName": "Google Chrome", "browserVersion": "116", "firstJoinTime": "2023-04-26T20:30:34+00:00", "ispName": "Comcast", "osName": "Microsoft Windows 10 Pro", "osVersion": "10.0.19044", "participantId": "abCDEf12GHIj", "published": true, "recordingS3BucketName": "bucket-name", "recordingS3Prefix": "abcdABCDefgh/st-a1b2c3d4e5f6g/abCDEf12GHIj/1234567890", "recordingState": "ACTIVE", "replicationState": "ACTIVE", "replicationType": "REPLICA", "sdkVersion": "", "state": "CONNECTED", "userId": "" } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetParticipant
섹션을 참조하세요.
-
다음 코드 예시에서는 get-public-key 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 참가자 토큰에 서명하는 데 사용되는 기존 퍼블릭 키를 가져오는 방법
다음
get-public-key예시에서는 제공된 ARN에서 지정하고 스테이지 참가자 토큰의 서명에 사용할 퍼블릭 키를 가져옵니다.aws ivs-realtime get-public-key \ --arnarn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2출력:
{ "publicKey": { "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2", "name": "", "publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqVWUtqs6EktQMR1sCYmEzGvRwtaycI16\n9pmzcpiWu/uhNStGlteJ5odRfRwVkoQUMnSZXTCcbn9bBTTmiWo4mJcFOOAzsthH\n0UAb8NdD4tUE0At4a9hYP9IETEXAMPLE\n-----END PUBLIC KEY-----", "fingerprint": "12:a3:44:56:bc:7d:e8:9f:10:2g:34:hi:56:78:90:12", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 참가자 토큰 배포를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetPublicKey
섹션을 참조하세요.
-
다음 코드 예시에서는 get-stage-session 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 세션을 가져오는 방법
다음
get-stage-session예시에서는 지정된 스테이지 Amazon 리소스 이름(ARN)의 지정된 세션 ID에 대한 스테이지 세션을 가져옵니다.aws ivs-realtime get-stage-session \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g출력:
{ "stageSession": { "endTime": "2023-04-26T20:36:29+00:00", "sessionId": "st-a1b2c3d4e5f6g", "startTime": "2023-04-26T20:30:29.602000+00:00" } }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetStageSession
섹션을 참조하세요.
-
다음 코드 예시에서는 get-stage 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지의 구성 정보를 가져오는 방법
다음
get-stage예시에서는 지정된 스테이지 Amazon 리소스 이름(ARN)에 대한 스테이지 구성을 가져옵니다.aws ivs-realtime get-stage \ --arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh출력:
{ "stage": { "activeSessionId": "st-a1b2c3d4e5f6g", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "autoParticipantRecordingConfiguration": { "storageConfigurationArn": "", "mediaTypes": [ "AUDIO_VIDEO" ], "thumbnailConfiguration": { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], "recordingMode": "DISABLED" }, "recordingReconnectWindowSeconds": 0, "hlsConfiguration": { "targetSegmentDurationSeconds": 6 }, "recordParticipantReplicas": true }, "endpoints": { "events": "wss://global.events.live-video.net", "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/", "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/", "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net" }, "name": "test", "tags": {} } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetStage
섹션을 참조하세요.
-
다음 코드 예시에서는 get-storage-configuration 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 스토리지 구성을 가져오는 방법
다음
get-storage-configuration예시에서는 지정된 Amazon 리소스 이름(ARN)에서 지정한 구성 스토리지 구성을 가져옵니다.aws ivs-realtime get-storage-configuration \ --namearn"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh"출력:
{ "storageConfiguration": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh", "name": "test-sc", "s3": { "bucketName": "amzn-s3-demo-bucket" }, "tags": {} } }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetStorageConfiguration
섹션을 참조하세요.
-
다음 코드 예시에서는 import-public-key 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 참가자 토큰에 서명하는 데 사용할 기존 퍼블릭 키를 가져오는 방법
다음
import-public-key예시에서는 스테이지 참가자 토큰 서명에 사용할 퍼블릭 키를 자재 파일에서 가져옵니다.aws ivs-realtime import-public-key \ --public-key-material="`cat public.pem`"출력:
{ "publicKey": { "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2", "name": "", "publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqVWUtqs6EktQMR1sCYmEzGvRwtaycI16\n9pmzcpiWu/uhNStGlteJ5odRfRwVkoQUMnSZXTCcbn9bBTTmiWo4mJcFOOAzsthH\n0UAb8NdD4tUE0At4a9hYP9IETEXAMPLE\n-----END PUBLIC KEY-----", "fingerprint": "12:a3:44:56:bc:7d:e8:9f:10:2g:34:hi:56:78:90:12", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 참가자 토큰 배포를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ImportPublicKey
섹션을 참조하세요.
-
다음 코드 예시에서는 list-compositions 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 목록을 가져오는 방법
다음은 API 요청이 처리되는 AWS 리전의 AWS 계정에 대한 모든 구성을
list-compositions나열합니다.aws ivs-realtime list-compositions출력:
{ "compositions": [ { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh", "destinations": [ { "id": "AabBCcdDEefF", "startTime": "2023-10-16T23:25:23+00:00", "state": "ACTIVE" } ], "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:25:21+00:00", "state": "ACTIVE", "tags": {} }, { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/ABcdabCDefgh", "destinations": [ { "endTime": "2023-10-16T23:25:00.786512+00:00", "id": "aABbcCDdeEFf", "startTime": "2023-10-16T23:24:01+00:00", "state": "STOPPED" }, { "endTime": "2023-10-16T23:25:00.786512+00:00", "id": "deEFfaABbcCD", "startTime": "2023-10-16T23:24:01+00:00", "state": "STOPPED" } ], "endTime": "2023-10-16T23:25:00+00:00", "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/efghabcdABCD", "startTime": "2023-10-16T23:24:00+00:00", "state": "STOPPED", "tags": {} } ] }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListCompositions
섹션을 참조하세요.
-
다음 코드 예시에서는 list-encoder-configurations 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 인코더 구성을 나열하는 방법
다음은 API 요청이 처리되는 AWS 리전의 AWS 계정에 대한 모든 구성 인코더 구성을
list-encoder-configurations나열합니다.aws ivs-realtime list-encoder-configurations출력:
{ "encoderConfigurations": [ { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh", "name": "test-ec-1", "tags": {} }, { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABCefgEFGabc", "name": "test-ec-2", "tags": {} } ] }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListEncoderConfigurations
섹션을 참조하세요.
-
다음 코드 예시는 list-ingest-configurations의 사용 방법을 보여 줍니다.
- AWS CLI
-
모든 수집 구성에 대한 요약 정보를 가져오려면
다음
list-ingest-configurations예시에서는 API 요청이 처리되는 AWS 리전의 AWS 계정에 대한 모든 수집 구성을 나열합니다.aws ivs-realtime list-ingest-configurations출력:
{ "ingestConfigurations": [ { "name": "", "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/XYZuvwSt4567", "ingestProtocol": "RTMPS", "stageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "participnatId": "abC789Xyz456", "state": "INACTIVE" "userId": "", } ] }자세한 내용은 Amazon Interactive Video Service 사용 설명서의 IVS Stream Ingest | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListIngestConfigurations
섹션을 참조하세요.
-
다음 코드 예시는 list-participant-events의 사용 방법을 보여 줍니다.
- AWS CLI
-
예제 1: 스테이지 참가자 이벤트 목록을 가져오려면
다음
list-participant-events예시에서는 지정된 스테이지 Amazon 리소스 이름(ARN)의 지정된 참가자 ID 및 세션 ID에 대한 모든 참가자 이벤트를 나열합니다.aws ivs-realtime list-participant-events \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIj출력:
{ "events": [ { "eventTime": "2023-04-26T20:36:28+00:00", "name": "LEFT", "participantId": "abCDEf12GHIj" }, { "eventTime": "2023-04-26T20:36:28+00:00", "name": "PUBLISH_STOPPED", "participantId": "abCDEf12GHIj" }, { "eventTime": "2023-04-26T20:30:34+00:00", "name": "JOINED", "participantId": "abCDEf12GHIj" }, { "eventTime": "2023-04-26T20:30:34+00:00", "name": "PUBLISH_STARTED", "participantId": "abCDEf12GHIj" } ] }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 2: 참가자 복제 중지 및 시작을 포함한 스테이지 참가자 이벤트 목록을 가져오려면
다음
list-participant-events예제에서는 지정된 스테이지 ARN(Amazon 리소스 이름)의 지정된 세션 ID에 대한 모든 참가자 이벤트를 나열합니다. 여기서 참가자는 다른 스테이지에 복제됩니다.aws ivs-realtime list-participant-events \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIj출력:
{ "events": [ { "eventTime": "2025-04-26T20:36:28+00:00", "name": "LEFT", "participantId": "abCDEf12GHIj" }, { "eventTime": "2025-04-26T20:36:28+00:00", "name": "PUBLISH_STOPPED", "participantId": "abCDEf12GHIj" }, { "eventTime": "2025-04-26T20:30:34+00:00", "name": "JOINED", "participantId": "abCDEf12GHIj" }, { "eventTime": "2025-04-26T20:30:34+00:00", "name": "PUBLISH_STARTED", "participantId": "abCDEf12GHIj" }, { "name": "REPLICATION_STARTED", "participantId": "abCDEf12GHIj", "eventTime": "2025-04-26T20:30:34+00:00", "destinationStageArn": "arn:aws:ivs:us-west-2:12345678901:stage/ABCDabcdefgh", "destinationSessionId": "st-b1c2d3e4f5g6a" }, { "name": "REPLICATION_STOPPED", "participantId": "abCDEf12GHIj", "eventTime": "2025-04-26T20:32:34+00:00", "destinationStageArn": "arn:aws:ivs:us-west-2:12345678901:stage/ABCDabcdefgh", "destinationSessionId": "st-b1c2d3e4f5g6a" } ] }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListParticipantEvents
섹션을 참조하세요.
-
다음 코드 예시는 list-participant-replicas의 사용 방법을 보여 줍니다.
- AWS CLI
-
스테이지 참가자 목록을 가져오려면
다음
list-participant-replicas예제에서는 지정된 소스 스테이지 ARN(Amazon 리소스 이름)에서 다른 스테이지로 복제된 모든 스테이지 참가자를 나열합니다.aws ivs-realtime list-participant-replicas \ --source-stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --participant-idabCDEf12GHIj출력:
{ "replicas": [ { "sourceStageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "participantId": "abCDEf12GHIj", "sourceSessionId": "st-a1b2c3d4e5f6g", "destinationStageArn": "arn:aws:ivs:us-west-2:012345678901:stage/ABCDabcdefgh", "destinationSessionId": "st-b1c2d3e4f5g6a", "replicationState": "ACTIVE" } ] }자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 IVS Participant Replication을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListParticipantReplicas
섹션을 참조하세요.
-
다음 코드 예시는 list-participants의 사용 방법을 보여 줍니다.
- AWS CLI
-
예제 1: 스테이지 참가자 목록 가져오기
다음
list-participants예시에서는 지정된 스테이지 Amazon 리소스 이름(ARN)의 지정된 세션 ID에 대한 모든 참가자를 나열합니다.aws ivs-realtime list-participants \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g출력:
{ "participants": [ { "firstJoinTime": "2023-04-26T20:30:34+00:00", "participantId": "abCDEf12GHIj", "published": true, "recordingState": "STOPPED", "state": "DISCONNECTED", "userId": "" } ] }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 2: 참가자가 다른 스테이지에 복제된 경우 스테이지 참가자 목록 가져오기
다음
list-participants예제에서는 지정된 스테이지 ARN(Amazon 리소스 이름)의 지정된 세션 ID에 대한 모든 참가자를 나열합니다. 여기서 참가자는 다른 스테이지에 복제되었습니다.aws ivs-realtime list-participants \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g출력:
{ "participants": [ { "firstJoinTime": "2023-04-26T20:30:34+00:00", "participantId": "abCDEf12GHIj", "published": true, "recordingState": "STOPPED", "state": "DISCONNECTED", "userId": "", "replicationState": "ACTIVE", "replicationType": "SOURCE", "sourceStageArn": "", "sourceSessionId": "" } ] }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 3: 참가자가 다른 스테이지에서 복제된 경우 스테이지 참가자 목록 가져오기
다음
list-participants예제에서는 지정된 스테이지 ARN(Amazon 리소스 이름)의 지정된 세션 ID에 대한 모든 참가자를 나열합니다. 여기서 참가자는 다른 스테이지에서 복제되었습니다.aws ivs-realtime list-participants \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g출력:
{ "participants": [ { "firstJoinTime": "2023-04-26T20:30:34+00:00", "participantId": "abCDEf12GHIj", "published": true, "recordingState": "STOPPED", "state": "DISCONNECTED", "userId": "", "replicationState": "ACTIVE", "replicationType": "REPLICA", "sourceStageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "sourceSessionId": "st-a1b2c3d4e5f6g" } ] }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListParticipants
섹션을 참조하세요.
-
다음 코드 예시에서는 list-public-keys 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 참가자 토큰에 서명할 수 있는 기존 퍼블릭 키를 나열하는 방법
다음
list-public-keys예제에서는 API 요청이 처리되는 AWS 리전에서 스테이지 참가자 토큰의 크기를 지정하는 데 사용할 수 있는 모든 퍼블릭 키를 나열합니다.aws ivs-realtime list-public-keys출력:
{ "publicKeys": [ { "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2", "name": "", "tags": {} }, { "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/3bcdABCDefg4", "name": "", "tags": {} } ] }자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 참가자 토큰 배포를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListPublicKeys
섹션을 참조하세요.
-
다음 코드 예시에서는 list-stage-sessions 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
스테이지 세션 목록을 가져오는 방법
다음
list-stage-sessions예시에서는 지정된 스테이지 Amazon 리소스 이름(ARN)의 모든 세션을 나열합니다.aws ivs-realtime list-stage-sessions \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh출력:
{ "stageSessions": [ { "endTime": "2023-04-26T20:36:29+00:00", "sessionId": "st-a1b2c3d4e5f6g", "startTime": "2023-04-26T20:30:29.602000+00:00" } ] }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListStageSessions
를 참조하세요.
-
다음 코드 예시에서는 list-stages 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
모든 단계에 대한 요약 정보를 가져오는 방법
다음
list-stages예시에서는 API 요청이 처리되는 AWS 리전의 AWS 계정에 대한 모든 단계를 나열합니다.aws ivs-realtime list-stages출력:
{ "stages": [ { "activeSessionId": "st-a1b2c3d4e5f6g", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "name": "stage1", "tags": {} }, { "activeSessionId": "st-a123bcd456efg", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcd1234ABCD", "name": "stage2", "tags": {} }, { "activeSessionId": "st-abcDEF1234ghi", "arn": "arn:aws:ivs:us-west-2:123456789012:stage/ABCD1234efgh", "name": "stage3", "tags": {} } ] }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListStages
섹션을 참조하세요.
-
다음 코드 예시에서는 list-storage-configurations 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
구성 스토리지 구성을 나열하는 방법
다음은 API 요청이 처리되는 AWS 리전의 AWS 계정에 대한 모든 구성 스토리지 구성을
list-storage-configurations나열합니다.aws ivs-realtime list-storage-configurations출력:
{ "storageConfigurations": [ { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh", "name": "test-sc-1", "s3": { "bucketName": "amzn-s3-demo-bucket-1" }, "tags": {} }, { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABCefgEFGabc", "name": "test-sc-2", "s3": { "bucketName": "amzn-s3-demo-bucket-2" }, "tags": {} } ] }자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListStorageConfigurations
섹션을 참조하세요.
-
다음 코드 예시에서는 start-composition 코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
예시 1: 기본 레이아웃 설정으로 구성을 시작하는 방법
다음
start-composition예시에서는 지정된 위치로 스트리밍되는 지정된 스테이지의 구성을 시작합니다.aws ivs-realtime start-composition \ --stage-arnarn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd\ --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \ "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \ {"s3":{"encoderConfigurationArns":["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \ "recordingConfiguration": {"hlsConfiguration": {"targetSegmentDurationSeconds": 5}}, \ "storageConfigurationArn":"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"}}]'출력:
{ "composition": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh", "destinations": [ { "configuration": { "channel": { "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" }, "name": "" }, "id": "AabBCcdDEefF", "state": "STARTING" }, { "configuration": { "name": "", "s3": { "encoderConfigurationArns": [ "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" ], "recordingConfiguration": { "format": "HLS", "hlsConfiguration": { "targetSegmentDurationSeconds": 5 } }, "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE" } }, "detail": { "s3": { "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite" } }, "id": "GHFabcgefABC", "state": "STARTING" } ], "layout": { "grid": { "featuredParticipantAttribute": "" "gridGap": 2, "omitStoppedVideo": false, "videoAspectRatio": "VIDEO", "videoFillMode": "" } }, "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:24:00+00:00", "state": "STARTING", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용 설명서의 IVS 복합 레코딩 | 실시간 스트리밍을 참조하세요.
예시 2: PiP 레이아웃으로 구성을 시작하는 방법
다음
start-composition예시에서는 PiP 레이아웃을 사용하여 지정된 위치로 스트리밍되는 지정된 스테이지의 구성을 시작합니다.aws ivs-realtime start-composition \ --stage-arnarn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd\ --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \ "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \ {"s3":{"encoderConfigurationArns":["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \ "storageConfigurationArn":"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"}}]' \ --layout pip='{featuredParticipantAttribute="abcdefg"}'출력:
{ "composition": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs", "destinations": [ { "configuration": { "channel": { "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" }, "name": "" }, "id": "AabBCcdDEefF", "state": "STARTING" }, { "configuration": { "name": "", "s3": { "encoderConfigurationArns": [ "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" ], "recordingConfiguration": { "format": "HLS", "hlsConfiguration": { "targetSegmentDurationSeconds": 2 } }, "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE" } }, "detail": { "s3": { "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite" } }, "id": "GHFabcgefABC", "state": "STARTING" } ], "layout": { "pip": { "featuredParticipantAttribute": "abcdefg", "gridGap": 0, "omitStoppedVideo": false, "pipBehavior": "STATIC", "pipOffset": 0, "pipParticipantAttribute": "", "pipPosition": "BOTTOM_RIGHT", "videoFillMode": "COVER" } }, "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:24:00+00:00", "state": "STARTING", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용 설명서의 IVS 복합 레코딩 | 실시간 스트리밍을 참조하세요.
예시 3: 썸네일 레코딩을 활성화하여 구성 시작
다음
start-composition예제에서는 썸네일 레코딩을 사용 설정하여 지정된 위치로 스트리밍되는 지정된 단계의 구성을 시작합니다.aws ivs-realtime start-composition \ --stage-arnarn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd\ --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \ "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \ {"s3": {"encoderConfigurationArns": ["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \ "storageConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE", \ "thumbnailConfigurations": [{"storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}]}}]'출력:
{ "composition": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh", "destinations": [ { "configuration": { "channel": { "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" }, "name": "" }, "id": "AabBCcdDEefF", "state": "STARTING" }, { "configuration": { "name": "", "s3": { "encoderConfigurationArns": [ "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef" ], "recordingConfiguration": { "format": "HLS", "hlsConfiguration": { "targetSegmentDurationSeconds": 2 } }, "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE", "thumbnailConfigurations": [ { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ] } ] } }, "detail": { "s3": { "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite" } }, "id": "GHFabcgefABC", "state": "STARTING" } ], "layout": { "grid": { "featuredParticipantAttribute": "" "gridGap": 2, "omitStoppedVideo": false, "videoAspectRatio": "VIDEO", "videoFillMode": "" } }, "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd", "startTime": "2023-10-16T23:24:00+00:00", "state": "STARTING", "tags": {} } }자세한 내용은 Amazon IVS Real-Time Streaming 사용 설명서의 IVS 복합 레코딩 | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 StartComposition
섹션을 참조하세요.
-
다음 코드 예시는 start-participant-replication의 사용 방법을 보여 줍니다.
- AWS CLI
-
한 스테이지에서 다른 스테이지로 참가자 복제를 시작하려면
다음
start-participant-replication예제에서는 각 스테이지가 ARN(Amazon 리소스 이름)별로 지정된 상태에서 소스 스테이지에서 대상 스테이지로 참가자를 복제합니다.aws ivs-realtime start-participant-replication \ --source-stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --destination-stage-arnarn:aws:ivs:us-west-2:234567890123:stage/bcdABCDefghi\ --participant-idabCDEf12GHIj출력:
{ "accessControlAllowOrigin": "*", "accessControlExposeHeaders": "Access-Control-Allow-Origin,Access-Control-Expose-Headers,Cache-Control,Content-Length, \ Content-Security-Policy,Content-Type,date,Strict-Transport-Security,x-amz-apigw-id,x-amzn-errormessage,x-amzn-errortype, \ x-amzn-requestid,x-amzn-trace-id,X-Content-Type-Options,X-Frame-Options", "cacheControl": "no-store, no-cache", "contentSecurityPolicy": "default-src 'self'; upgrade-insecure-requests;", "strictTransportSecurity": "max-age:47304000; includeSubDomains", "xContentTypeOptions": "nosniff", "xFrameOptions": "DENY" }자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 IVS Participant Replication을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 StartParticipantReplication
섹션을 참조하세요.
-
다음 코드 예시는 stop-composition의 사용 방법을 보여 줍니다.
- AWS CLI
-
구성을 중지하는 방법
다음
stop-composition은 지정된 Amazon 리소스 이름(ARN)에서 지정한 구성을 중지합니다.aws ivs-realtime stop-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Interactive Video Service 사용자 안내서의 Amazon IVS 스트림에서 다중 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 StopComposition
섹션을 참조하세요.
-
다음 코드 예시는 stop-participant-replication의 사용 방법을 보여 줍니다.
- AWS CLI
-
한 스테이지에서 다른 스테이지로의 참가자 복제를 중지하려면
다음
stop-participant-replication예제에서는 각 스테이지가 ARN(Amazon 리소스 이름)별로 지정된 상태에서 소스 스테이지에서 대상 스테이지로의 참가자 복제를 중지합니다.aws ivs-realtime stop-participant-replication \ --source-stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --destination-stage-arnarn:aws:ivs:us-west-2:234567890123:stage/bcdABCDefghi\ --participant-idabCDEf12GHIj출력:
{ "accessControlAllowOrigin": "*", "accessControlExposeHeaders": "Access-Control-Allow-Origin,Access-Control-Expose-Headers,Cache-Control,Content-Length, \ Content-Security-Policy,Content-Type,date,Strict-Transport-Security,x-amz-apigw-id,x-amzn-errormessage,x-amzn-errortype, \ x-amzn-requestid,x-amzn-trace-id,X-Content-Type-Options,X-Frame-Options", "cacheControl": "no-store, no-cache", "contentSecurityPolicy": "default-src 'self'; upgrade-insecure-requests;", "strictTransportSecurity": "max-age:47304000; includeSubDomains", "xContentTypeOptions": "nosniff", "xFrameOptions": "DENY" }자세한 내용은 Amazon IVS Real-Time Streaming 사용자 안내서의 IVS Participant Replication을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 StopParticipantReplication
섹션을 참조하세요.
-
다음 코드 예시는 update-ingest-configuration의 사용 방법을 보여 줍니다.
- AWS CLI
-
수집 구성을 업데이트하려면
다음
update-inegst-configuration예제에서는 수집 구성을 업데이트하여 스테이지에 연결합니다.aws ivs-realtime update-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234\ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh출력:
{ "ingestConfiguration": { "name": "ingest1", "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234", "ingestProtocol": "RTMPS", "streamKey": "rt_123456789012_us-west-2_AbCdEfGh1234_abcd1234efgh5678ijkl9012MNOP34", "stageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "participantId": "xyZ654abC321", "state": "INACTIVE", "userId": "", "tags": {} } }자세한 내용은 Amazon Interactive Video Service 사용 설명서의 IVS Stream Ingest | 실시간 스트리밍을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 UpdateIngestConfiguration
을 참조하세요.
-
다음 코드 예시는 update-stage의 사용 방법을 보여 줍니다.
- AWS CLI
-
예제 1: 스테이지의 구성 업데이트
다음
update-stage예제에서는 썸네일 레코딩을 사용 설정하여 지정된 단계 ARN의 단계를 업데이트하여 단계 이름을 업데이트하고 개별 참가자 레코딩을 구성합니다.aws ivs-realtime update-stage \ --arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \ "thumbnailConfiguration": {"recordingMode": "INTERVAL","storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}} \ "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}' \ --namestage1a출력:
{ "stage": { "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "autoParticipantRecordingConfiguration": { "mediaTypes": [ "AUDIO_VIDEO" ], "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "thumbnailConfiguration": { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], "recordingMode": "INTERVAL" }, "recordingReconnectWindowSeconds": 100, "hlsConfiguration": { "targetSegmentDurationSeconds": 5 }, "recordParticipantReplicas": true }, "endpoints": { "events": "wss://global.events.live-video.net", "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/", "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/", "whip": "https://1a2b3c4d5e6f.global-bm.whip.live-video.net" }, "name": "stage1a", "tags": {} } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
예제 2: 참가자 복제본 레코딩 비활성화를 포함하여 스테이지의 구성 업데이트
다음
update-stage예제에서는 썸네일 레코딩을 활성화하고 참가자 레코딩을 비활성화한 상태로 지정된 스테이지 ARN의 스테이지를 업데이트하여 스테이지 이름을 업데이트하고 개별 참가자 레코딩을 구성합니다.aws ivs-realtime update-stage \ --arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \ "thumbnailConfiguration": {"recordingMode": "INTERVAL","storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}, "recordParticipantReplicas":false} \ "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}' \ --namestage1a출력:
{ "stage": { "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh", "autoParticipantRecordingConfiguration": { "mediaTypes": [ "AUDIO_VIDEO" ], "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "thumbnailConfiguration": { "targetIntervalSeconds": 60, "storage": [ "SEQUENTIAL" ], "recordingMode": "INTERVAL" }, "recordingReconnectWindowSeconds": 100, "hlsConfiguration": { "targetSegmentDurationSeconds": 5 }, "recordParticipantReplicas": false }, "endpoints": { "events": "wss://global.events.live-video.net", "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/", "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/", "whip": "https://1a2b3c4d5e6f.global-bm.whip.live-video.net" }, "name": "stage1a", "tags": {} } }Amazon IVS Low-Latency Streaming 사용 설명서의 Amazon IVS 스트림에서 여러 호스트 활성화를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 UpdateStage
섹션을 참조하세요.
-