SlideShare a Scribd company logo
1 of 24
Download to read offline
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	1	of	24			
Amazon Media LAB Guide
27 March 2018
안보양 솔루션즈아키텍트 (boyangan@amazon.com)
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	2	of	24			
Table of Contents
Table of Contents	.........................................................................................................................................	2
Lab	개요	...........................................................................................................................................................	3
준비	조건	.........................................................................................................................................................	3
STEP1.	Amazon	MediaConvert	구성하기	................................................................................................	3
1-1. 미디어 화일 준비	................................................................................................................................................	3
1-2. MediaConvert 구성..........................................................................................................................................	4
1-3. HLS 스트리밍 확인	...........................................................................................................................................	10
1-4. DASH 스트리밍	................................................................................................................................................	11
STEP2.	Amazon	MediaPackage	구성하기	.............................................................................................	12
2-1. MediaPackage Input 준비............................................................................................................................	12
STEP3.	Amazon	MediaLive	구성하기	.....................................................................................................	14
3-1. MediaLive Input 준비	....................................................................................................................................	14
3-2. MediaLive Channel 준비	..............................................................................................................................	16
3-3. MediaLive Input 을 위한 라이브 신호 준비	...............................................................................................	18
STEP4.	Amazon	MediaPackage	Endpoint	구성하기	...........................................................................	19
4-1. MediaPackage 입력 확인	..............................................................................................................................	19
4-2. MediaPackage Endpoint 생성	....................................................................................................................	20
STEP5.	Amazon	MediaStore 구성	–	MediaLive	출력	수신	.................................................................	22
5-1. MediaStore Container 생성.........................................................................................................................	22
5-2. MediaLive 의 출력을 MediaStore 로 설정	.................................................................................................	23
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	3	of	24			
Lab 개요
§ OTT 기반의 미디어 서비스에 대한 기본 지식과 메타 데이터 구성에 대한 기본 지식을 이해
합니다.
§ MediaConvert, MediaLive, MediaStore, MediaPackage 그리고 MediaTailor 의 구성을
이해 합니다.
준비 조건
• 인터넷 브라우저: Chrome with HLS Native Player Plug-in installed
• OBS 다운로드 및 설치: https://obsproject.com/
• 개인방송 테스트를 위해 iOS, Android App Bitstream 사용
• AWS 계정 및 기본적인 AWS 사용 방법 숙지
STEP1. Amazon MediaConvert 구성하기
1-1. 미디어 화일 준비
1) 미디어 화일 다운로드(Click URL, curl 또는 wget 을 이용), https://s3.ap-northeast-
2.amazonaws.com/elementalkr-demo/Galaxy_Note_7.mp4
2) S3 에 미디어 화일 업로드, AWS CLI 또는 Console UI 에서 업로드. 이때 해당 버켓은 public 으로
read 될 수 있도록 설정. (Permissions > Buckey Policy 내 아래 policy 복사 입력)
3) 미디어 화일은 30 초 분량으로 크기는 6Mbytes
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::버킷명으로 변경/*"
]
}
]
}
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	4	of	24			
1-2. MediaConvert 구성
1) AWS Console Login, 본 Lab 을 수행할 리젼 선정 (Tokyo Region 사용)
2) 콘솔 화면에서 MediaConvert -> ‘Get started’ 버튼 선택
3) Step 1 : Create job 의 Inputs 에 input1 에 미디어 화일이 있는 경로를 선택
4) Step 2: Output groups 에서 Add 버튼 선택 후 File group 선택
5) Step 3: Output groups 에서
Add 버튼 선택 후 File group
선택, Custom group name,
Destination (S3 bucket)
그리고 Output1 의 Name
modifier 기입
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	5	of	24			
6) Step 4: Output1 선택후 Container -> No Container 선택, Video codec -> Frame
Capture to JPEG 선택, Resolution -> 320 x 240 선택
7) 아래와 같이 Audio 1 을 클릭하여 Remove Audio 버튼을 선택해 Audio 1 삭제.
8) Step 5: Output groups 에서 Add 버튼 선택 후 Apple HLS 선택
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	6	of	24			
9) Step 6: Custom group name, Destination (S3 Bucket), Segement lengh -> 2 기입,
Outputs -> Add output 버튼을 2 회 사용하여 Output1, Output2 그리고 Output3 생성
10) Step 7: Output 1 을 선택 후 Output settings -> Name modifier 의 값과 Stream
settings -> Video 의 Resolution(w x h)과 Bitrate(bits/s)을 업데이트. 아래의 표와 같이
Output2 와 Output 3 에 대해서 적용
Name
modifier
Timecode
burn-in
Resolution Bitrate
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	7	of	24			
Output1 _360p 360p_500K_
(small)
640 x 360 500K,
500000,
0.5M
Output2 _480p 480p_1M_
(Medium)
720 x 480 1M,
1000000
Output3 _720p 720p_2M_
(Large)
1280 x 720 2M,
2000000
11) 별도 브라우저를 띄워 AWS 콘솔에서 IAM > Roles > Create Role 버튼을 선택. 아래와 같이
AWS Service 내 MediaConvert 선택 후 Next.
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	8	of	24			
12) 리뷰화면에서 Role name : MediaConvertRole 입력 후 Create Role 버튼으로 생성
13) Step 8: Job settings 에 Setting 에서 Queue 와 IAM role 설정. Role 은 이전단계에서
생성한 MediaConvertRole 을 선택(생성한 Role 이 보이지 않는 경우 이전 Output 화면으로
가셨다가 다시 돌아옮)
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	9	of	24			
14) Step 9: Create 후에 Job summary 에서 Status 가 SUBITTED -> PROGRESS ->
COMPLETE 을 확인, Job ID, Duration in transcoding 확인
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	10	of	24			
1-3. HLS 스트리밍 확인
1) S3 Bucket, MediaConvert 출력이 저장된 곳으로 이동하여 HLS Master m3u8 화일을 선택,
Link 복사
2) Chrome 을 실행한후 복사한 Link 를 URL 창에 복사, 비디오 영상이 안나오고 파일이 다운로드 되면
HLS Player 가 설치가 안되어 있으므로 Native HLS Player 설치
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	11	of	24			
3) Native HLS Playback 추가후 “option + command + I”(맥 기준) 를 선택하여 개발자 모드
사용, 복사한 Link 를 URL 창에 복사 하여 영상 재생, 재생되는 영상과 오른쪽 창에 실제
메타데이터, 영상 파일 수신에 대한 절차를 확인 (Network 탭 선택 후 Command + R 로 reload)
1-4. DASH 스트리밍
1) Add output group 을 선택한후 DASH ISO 선택
2) Group name, Destination 을 선택, Fragment length 를 원하는 초로 기입, 아래는 2 초로 되어
있습니다. 그리고 Single File, Segmented File 중 하나를 선택
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	12	of	24			
STEP2. Amazon MediaPackage 구성하기
2-1. MediaPackage Input 준비
1) AWS Console Login, 본 Lab 을 수행할 리젼 선정 (Singapore Region 사용)
2) Step 1: 콘솔 화면에서 MediaPackage -> Channel ID 기입 -> ‘Next step’ 버튼 선택
3) Step 2: Channel details 에서 Description 기입 후 Input type 에서 “Apple HLS” 선택 -
> Create
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	13	of	24			
4) Step 3: Input URL, Username 그리고 Password 복사
5) Step 4: 추가로 한개의 MediaPackage 생성을 위해 Step 1 ~ 3 을 반복.
6) Step 5: Input URL, Username 그리고 Password 복사
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	14	of	24			
STEP3. Amazon MediaLive 구성하기
3-1. MediaLive Input 준비
1) AWS Console Login, 본 Lab 을 수행할 리젼 선정 (Singapore Region 사용)
2) 콘솔 화면에서 MediaLive -> ‘Create input’ 버튼 선택 (Create Channel 만 보이는 경우
선택 후 왼쪽 Inputs 메뉴 선택 후 Create Input 버튼 선택)
3) Step 1: Input detail 에 이름 기입, input type 에 RTMP (push) 선택, Input security
group 에 Create 선택후 “0.0.0.0/0” 기입 -> Create input security group 선택하여 그룹
생성, Input destinations 중 Destination A 에 “live/test1” Destination 에
“live/test2” 기입
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	15	of	24			
4) Step 2: Step 1 에서 Create 선택후 Inputs 에서 생성한 Input 클릭하여 Endpoints 확인
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	16	of	24			
3-2. MediaLive Channel 준비
1) Step 1: Create channel -> Channel name 기입 -> IAM role 선택 -> “Create role
from template” -> Create IAM role -> Channel template -> “Live event” 선택 ->
Attach input “생성한 input 선택” ->
2) Step 2: 좌측 창의 HD(HLS) 선택 -> HLS Group destination A 에 MediaPackage 첫번째
Package URL, User name 기입 -> Password 에서 Create AWS Elemental MediaLive
parameter 선택 -> Name 에 “medialive1” -> Password value 에 MediaPackage 첫번째
Package 의 Password 복사 -> Create AWS Elemental MediaLive parameter 선택
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	17	of	24			
3) Step 3: HLS Group destination B 에 MediaPackage 두번째 Package URL, User name 기입
-> Password 에서 Create AWS Elemental MediaLive parameter 선택 -> Name 에
“medialive2” -> Password value 에 MediaPackage 두번째 Package 의 Password 복사 ->
Create AWS Elemental MediaLive parameter 선택
4) Step 4: 좌측 창의 Create channel 버튼 선택 -> Channels 페이지로 이동
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	18	of	24			
5) Step 5: 채널 선택후 Start 선택
3-3. MediaLive Input 을 위한 라이브 신호 준비
1) OBS 소프트웨어 구동 -> Source -> + 버튼 선택후 Video Capture Device 선택 -> Device 에
노트북 Builtin 카메라 디바이스 선택 후 (그리고 640*480) -> OK
2) 오른쪽 하단의 Settings -> Stream -> Stream Type 을 Custom Streaming Server 를 선택
URL 에 MediaLive Input 의 URL 을 기입, URL 에 마지막 단어를 포함시키지 않고 마지막 단어는
Stream Key 에 적용. (예: MediaLive 의 Input 이 rtmp://52.76.42.222:1935/live/test1
인 경우 URL 에는 rtmp://52.76.42.222:1935/live/ 만 기입 하고 Stream Key 에 test1 기입
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	19	of	24			
3) OK 후에 Start Streaming 버튼 선택 -> 하단의 타이머, CPU 가 제대로 동작 하는지 확인
STEP4. Amazon MediaPackage Endpoint 구성하기
4-1. MediaPackage 입력 확인
1) 콘솔 내 MediaPackage 서비스로 이동하여 Package 에 입력이 들어 오는지 확인
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	20	of	24			
4-2. MediaPackage Endpoint 생성
1) MediaPackage 의 Package -> Endpoints -> Add endpoints -> ID 에 demo_endpoint1 을
입력하고 Segment duration (sec)을 2 로 변경 후 -> Save
2) Choose endpoing in Endpoins and Playback preview
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	21	of	24			
3) HLS Meta Data sample
Master .m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=2515864,AVERAGE-
BANDWIDTH=2187343,CODECS="avc1.4d4020,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=30.020
20171026_120742720p_hls_.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5920683,AVERAGE-
BANDWIDTH=5306785,CODECS="avc1.4d4028,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=30.020
20171026_1207421080p_hls_.m3u8
Sub .m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:2.998,
20171026_120742720p_hls__00001.ts
#EXTINF:2.998,
20171026_120742720p_hls__00002.ts
#EXTINF:2.998,
20171026_120742720p_hls__00003.ts
#EXTINF:2.998,
20171026_120742720p_hls__00004.ts
#EXTINF:2.998,
20171026_120742720p_hls__00005.ts
#EXTINF:2.998,
20171026_120742720p_hls__00006.ts
#EXTINF:2.998,
20171026_120742720p_hls__00007.ts
#EXTINF:1.499,
20171026_120742720p_hls__00008.ts
#EXT-X-ENDLIST
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	22	of	24			
4) DASH Meta Data sample
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:cenc="urn:mpeg:cenc:2013" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
type="static" minBufferTime="PT30S" profiles="urn:mpeg:dash:profile:isoff-main:2011"
mediaPresentationDuration="PT22.485S">
<Period start="PT0S" duration="PT22.485S" id="1">
<AdaptationSet mimeType="video/mp4" codecs="avc1.4d4028,avc1.4d4020,mp4a.40.2"
frameRate="45000/1499" segmentAlignment="true" subsegmentAlignment="true" startWithSAP="1"
subsegmentStartsWithSAP="1" bitstreamSwitching="false">
<ContentComponent contentType="video" id="1"/>
<ContentComponent contentType="audio" id="2"/>
<Representation id="1" width="1920" height="1080" bandwidth="5000000">
<BaseURL>20171026_1207421080p_dash_.mp4</BaseURL>
<SubRepresentation contentComponent="1" bandwidth="0" codecs="avc1.4d4028"/>
<SubRepresentation contentComponent="2" bandwidth="96000" codecs="mp4a.40.2"/>
<SegmentBase indexRange="1221-1356">
<Initialization range="0-1220"/>
</SegmentBase>
</Representation>
<Representation id="2" width="1280" height="720" bandwidth="2000000">
<BaseURL>20171026_120742720p_dash_.mp4</BaseURL>
<SubRepresentation contentComponent="1" bandwidth="0" codecs="avc1.4d4020"/>
<SubRepresentation contentComponent="2" bandwidth="96000" codecs="mp4a.40.2"/>
<SegmentBase indexRange="1218-1353">
<Initialization range="0-1217"/>
</SegmentBase>
</Representation>
</AdaptationSet>
</Period>
</MPD>
STEP5. Amazon MediaStore 구성 – MediaLive 출력 수신
5-1. MediaStore Container 생성
1) 콘솔 내 MediaStore 서비스로 이동하여 Continer 생성
2) 생성된 Continer 를 확인
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	23	of	24			
3) Container 의 Data Endpoint 확인 그리고 Policy 에서 수신 받을 리소스의 정보를 입력.
예제에서는 모두에게서 받는 것으로 수정 (“*”)
5-2. MediaLive 의 출력을 MediaStore 로 설정
1) 콘솔 내 MediaLive 서비스로 이동하여 Destination 에서 CDN Setting 에서 HLS media store
선택. HLS group destination A 와 B 에 Mediastore endpoint 의 URL 을 입력. https 대신
mediastoressl 로 변경하여 입력. (예:
mediastoressl://mn63czzbzfhvt5.data.mediastore.ap-northeast-
1.amazonaws.com/test2/index) 마지막 test2 는 prefix 이며 index 는 master m3u8 을
위한 이름
Amazon	Web	Services	–	APN	Bootcamp	Lab	Guide																																																																																														2018	
Page	24	of	24

More Related Content

Similar to Media labguide bootcamp_20180327

MS SharePoint를 활용한 개발환경 구축
MS SharePoint를 활용한 개발환경 구축MS SharePoint를 활용한 개발환경 구축
MS SharePoint를 활용한 개발환경 구축
Heo Seungwook
 
블랙보드 학습자 메뉴얼_중앙대
블랙보드 학습자 메뉴얼_중앙대블랙보드 학습자 메뉴얼_중앙대
블랙보드 학습자 메뉴얼_중앙대
yeajuneyoon
 
Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018
Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018
Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018
Amazon Web Services Korea
 
리눅스와 웹표준(2004)
리눅스와 웹표준(2004)리눅스와 웹표준(2004)
리눅스와 웹표준(2004)
Channy Yun
 
부록1_Webometric Analyst 메뉴얼(9Oct2012)
부록1_Webometric Analyst 메뉴얼(9Oct2012)부록1_Webometric Analyst 메뉴얼(9Oct2012)
부록1_Webometric Analyst 메뉴얼(9Oct2012)
Webometrics Class
 

Similar to Media labguide bootcamp_20180327 (20)

장고로 웹서비스 만들기 기초
장고로 웹서비스 만들기   기초장고로 웹서비스 만들기   기초
장고로 웹서비스 만들기 기초
 
How to use ReA-A
How to use ReA-AHow to use ReA-A
How to use ReA-A
 
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
 
IBM Bluemix handson lab_DevOps_Target_Deploy_configutation_java_petclinic_v1.0
IBM Bluemix handson lab_DevOps_Target_Deploy_configutation_java_petclinic_v1.0IBM Bluemix handson lab_DevOps_Target_Deploy_configutation_java_petclinic_v1.0
IBM Bluemix handson lab_DevOps_Target_Deploy_configutation_java_petclinic_v1.0
 
Amazon SageMaker 오버뷰 - 강성문, AWS AI/ML 스페셜리스트 :: AIML 특집 웨비나
Amazon SageMaker 오버뷰 - 강성문, AWS AI/ML 스페셜리스트 :: AIML 특집 웨비나Amazon SageMaker 오버뷰 - 강성문, AWS AI/ML 스페셜리스트 :: AIML 특집 웨비나
Amazon SageMaker 오버뷰 - 강성문, AWS AI/ML 스페셜리스트 :: AIML 특집 웨비나
 
Sharepoint2010을 활용한 개발환경 구축
Sharepoint2010을 활용한 개발환경 구축Sharepoint2010을 활용한 개발환경 구축
Sharepoint2010을 활용한 개발환경 구축
 
MS SharePoint를 활용한 개발환경 구축
MS SharePoint를 활용한 개발환경 구축MS SharePoint를 활용한 개발환경 구축
MS SharePoint를 활용한 개발환경 구축
 
[AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, A...
[AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, A...[AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, A...
[AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, A...
 
Amazon Personalize 개인화 추천 모델 만들기::김태수, 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon Personalize 개인화 추천 모델 만들기::김태수, 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon Personalize 개인화 추천 모델 만들기::김태수, 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon Personalize 개인화 추천 모델 만들기::김태수, 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
 
[2017 Gaming on AWS] GameLift를 통한 실전 DevOps: 세션형 멀티플레이어 게임의 구현부터 운영까지 Step by...
[2017 Gaming on AWS] GameLift를 통한 실전 DevOps: 세션형 멀티플레이어 게임의 구현부터 운영까지 Step by...[2017 Gaming on AWS] GameLift를 통한 실전 DevOps: 세션형 멀티플레이어 게임의 구현부터 운영까지 Step by...
[2017 Gaming on AWS] GameLift를 통한 실전 DevOps: 세션형 멀티플레이어 게임의 구현부터 운영까지 Step by...
 
권기훈_포트폴리오
권기훈_포트폴리오권기훈_포트폴리오
권기훈_포트폴리오
 
Release note 1.2
Release note 1.2Release note 1.2
Release note 1.2
 
20170813 django api server unit test and remote debugging
20170813 django api server unit test and remote debugging20170813 django api server unit test and remote debugging
20170813 django api server unit test and remote debugging
 
블랙보드 학습자 메뉴얼_중앙대
블랙보드 학습자 메뉴얼_중앙대블랙보드 학습자 메뉴얼_중앙대
블랙보드 학습자 메뉴얼_중앙대
 
Bug sense 분석
Bug sense 분석Bug sense 분석
Bug sense 분석
 
Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018
Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018
Serverless로 이미지 크롤링 프로토타입 개발기::유호균::AWS Summit Seoul 2018
 
리눅스와 웹표준(2004)
리눅스와 웹표준(2004)리눅스와 웹표준(2004)
리눅스와 웹표준(2004)
 
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드 Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
Postman과 Newman을 이용한 RestAPI 테스트 자동화 가이드
 
(교수계정용) Turnitin feedback studio상세이용매뉴얼 20170801
(교수계정용) Turnitin feedback studio상세이용매뉴얼 20170801(교수계정용) Turnitin feedback studio상세이용매뉴얼 20170801
(교수계정용) Turnitin feedback studio상세이용매뉴얼 20170801
 
부록1_Webometric Analyst 메뉴얼(9Oct2012)
부록1_Webometric Analyst 메뉴얼(9Oct2012)부록1_Webometric Analyst 메뉴얼(9Oct2012)
부록1_Webometric Analyst 메뉴얼(9Oct2012)
 

Media labguide bootcamp_20180327

  • 1. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 1 of 24 Amazon Media LAB Guide 27 March 2018 안보양 솔루션즈아키텍트 (boyangan@amazon.com)
  • 2. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 2 of 24 Table of Contents Table of Contents ......................................................................................................................................... 2 Lab 개요 ........................................................................................................................................................... 3 준비 조건 ......................................................................................................................................................... 3 STEP1. Amazon MediaConvert 구성하기 ................................................................................................ 3 1-1. 미디어 화일 준비 ................................................................................................................................................ 3 1-2. MediaConvert 구성.......................................................................................................................................... 4 1-3. HLS 스트리밍 확인 ........................................................................................................................................... 10 1-4. DASH 스트리밍 ................................................................................................................................................ 11 STEP2. Amazon MediaPackage 구성하기 ............................................................................................. 12 2-1. MediaPackage Input 준비............................................................................................................................ 12 STEP3. Amazon MediaLive 구성하기 ..................................................................................................... 14 3-1. MediaLive Input 준비 .................................................................................................................................... 14 3-2. MediaLive Channel 준비 .............................................................................................................................. 16 3-3. MediaLive Input 을 위한 라이브 신호 준비 ............................................................................................... 18 STEP4. Amazon MediaPackage Endpoint 구성하기 ........................................................................... 19 4-1. MediaPackage 입력 확인 .............................................................................................................................. 19 4-2. MediaPackage Endpoint 생성 .................................................................................................................... 20 STEP5. Amazon MediaStore 구성 – MediaLive 출력 수신 ................................................................. 22 5-1. MediaStore Container 생성......................................................................................................................... 22 5-2. MediaLive 의 출력을 MediaStore 로 설정 ................................................................................................. 23
  • 3. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 3 of 24 Lab 개요 § OTT 기반의 미디어 서비스에 대한 기본 지식과 메타 데이터 구성에 대한 기본 지식을 이해 합니다. § MediaConvert, MediaLive, MediaStore, MediaPackage 그리고 MediaTailor 의 구성을 이해 합니다. 준비 조건 • 인터넷 브라우저: Chrome with HLS Native Player Plug-in installed • OBS 다운로드 및 설치: https://obsproject.com/ • 개인방송 테스트를 위해 iOS, Android App Bitstream 사용 • AWS 계정 및 기본적인 AWS 사용 방법 숙지 STEP1. Amazon MediaConvert 구성하기 1-1. 미디어 화일 준비 1) 미디어 화일 다운로드(Click URL, curl 또는 wget 을 이용), https://s3.ap-northeast- 2.amazonaws.com/elementalkr-demo/Galaxy_Note_7.mp4 2) S3 에 미디어 화일 업로드, AWS CLI 또는 Console UI 에서 업로드. 이때 해당 버켓은 public 으로 read 될 수 있도록 설정. (Permissions > Buckey Policy 내 아래 policy 복사 입력) 3) 미디어 화일은 30 초 분량으로 크기는 6Mbytes { "Version": "2012-10-17", "Statement": [ { "Sid": "AddPerm", "Effect": "Allow", "Principal": "*", "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::버킷명으로 변경/*" ] } ] }
  • 4. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 4 of 24 1-2. MediaConvert 구성 1) AWS Console Login, 본 Lab 을 수행할 리젼 선정 (Tokyo Region 사용) 2) 콘솔 화면에서 MediaConvert -> ‘Get started’ 버튼 선택 3) Step 1 : Create job 의 Inputs 에 input1 에 미디어 화일이 있는 경로를 선택 4) Step 2: Output groups 에서 Add 버튼 선택 후 File group 선택 5) Step 3: Output groups 에서 Add 버튼 선택 후 File group 선택, Custom group name, Destination (S3 bucket) 그리고 Output1 의 Name modifier 기입
  • 5. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 5 of 24 6) Step 4: Output1 선택후 Container -> No Container 선택, Video codec -> Frame Capture to JPEG 선택, Resolution -> 320 x 240 선택 7) 아래와 같이 Audio 1 을 클릭하여 Remove Audio 버튼을 선택해 Audio 1 삭제. 8) Step 5: Output groups 에서 Add 버튼 선택 후 Apple HLS 선택
  • 6. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 6 of 24 9) Step 6: Custom group name, Destination (S3 Bucket), Segement lengh -> 2 기입, Outputs -> Add output 버튼을 2 회 사용하여 Output1, Output2 그리고 Output3 생성 10) Step 7: Output 1 을 선택 후 Output settings -> Name modifier 의 값과 Stream settings -> Video 의 Resolution(w x h)과 Bitrate(bits/s)을 업데이트. 아래의 표와 같이 Output2 와 Output 3 에 대해서 적용 Name modifier Timecode burn-in Resolution Bitrate
  • 7. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 7 of 24 Output1 _360p 360p_500K_ (small) 640 x 360 500K, 500000, 0.5M Output2 _480p 480p_1M_ (Medium) 720 x 480 1M, 1000000 Output3 _720p 720p_2M_ (Large) 1280 x 720 2M, 2000000 11) 별도 브라우저를 띄워 AWS 콘솔에서 IAM > Roles > Create Role 버튼을 선택. 아래와 같이 AWS Service 내 MediaConvert 선택 후 Next.
  • 8. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 8 of 24 12) 리뷰화면에서 Role name : MediaConvertRole 입력 후 Create Role 버튼으로 생성 13) Step 8: Job settings 에 Setting 에서 Queue 와 IAM role 설정. Role 은 이전단계에서 생성한 MediaConvertRole 을 선택(생성한 Role 이 보이지 않는 경우 이전 Output 화면으로 가셨다가 다시 돌아옮)
  • 9. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 9 of 24 14) Step 9: Create 후에 Job summary 에서 Status 가 SUBITTED -> PROGRESS -> COMPLETE 을 확인, Job ID, Duration in transcoding 확인
  • 10. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 10 of 24 1-3. HLS 스트리밍 확인 1) S3 Bucket, MediaConvert 출력이 저장된 곳으로 이동하여 HLS Master m3u8 화일을 선택, Link 복사 2) Chrome 을 실행한후 복사한 Link 를 URL 창에 복사, 비디오 영상이 안나오고 파일이 다운로드 되면 HLS Player 가 설치가 안되어 있으므로 Native HLS Player 설치
  • 11. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 11 of 24 3) Native HLS Playback 추가후 “option + command + I”(맥 기준) 를 선택하여 개발자 모드 사용, 복사한 Link 를 URL 창에 복사 하여 영상 재생, 재생되는 영상과 오른쪽 창에 실제 메타데이터, 영상 파일 수신에 대한 절차를 확인 (Network 탭 선택 후 Command + R 로 reload) 1-4. DASH 스트리밍 1) Add output group 을 선택한후 DASH ISO 선택 2) Group name, Destination 을 선택, Fragment length 를 원하는 초로 기입, 아래는 2 초로 되어 있습니다. 그리고 Single File, Segmented File 중 하나를 선택
  • 12. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 12 of 24 STEP2. Amazon MediaPackage 구성하기 2-1. MediaPackage Input 준비 1) AWS Console Login, 본 Lab 을 수행할 리젼 선정 (Singapore Region 사용) 2) Step 1: 콘솔 화면에서 MediaPackage -> Channel ID 기입 -> ‘Next step’ 버튼 선택 3) Step 2: Channel details 에서 Description 기입 후 Input type 에서 “Apple HLS” 선택 - > Create
  • 13. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 13 of 24 4) Step 3: Input URL, Username 그리고 Password 복사 5) Step 4: 추가로 한개의 MediaPackage 생성을 위해 Step 1 ~ 3 을 반복. 6) Step 5: Input URL, Username 그리고 Password 복사
  • 14. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 14 of 24 STEP3. Amazon MediaLive 구성하기 3-1. MediaLive Input 준비 1) AWS Console Login, 본 Lab 을 수행할 리젼 선정 (Singapore Region 사용) 2) 콘솔 화면에서 MediaLive -> ‘Create input’ 버튼 선택 (Create Channel 만 보이는 경우 선택 후 왼쪽 Inputs 메뉴 선택 후 Create Input 버튼 선택) 3) Step 1: Input detail 에 이름 기입, input type 에 RTMP (push) 선택, Input security group 에 Create 선택후 “0.0.0.0/0” 기입 -> Create input security group 선택하여 그룹 생성, Input destinations 중 Destination A 에 “live/test1” Destination 에 “live/test2” 기입
  • 15. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 15 of 24 4) Step 2: Step 1 에서 Create 선택후 Inputs 에서 생성한 Input 클릭하여 Endpoints 확인
  • 16. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 16 of 24 3-2. MediaLive Channel 준비 1) Step 1: Create channel -> Channel name 기입 -> IAM role 선택 -> “Create role from template” -> Create IAM role -> Channel template -> “Live event” 선택 -> Attach input “생성한 input 선택” -> 2) Step 2: 좌측 창의 HD(HLS) 선택 -> HLS Group destination A 에 MediaPackage 첫번째 Package URL, User name 기입 -> Password 에서 Create AWS Elemental MediaLive parameter 선택 -> Name 에 “medialive1” -> Password value 에 MediaPackage 첫번째 Package 의 Password 복사 -> Create AWS Elemental MediaLive parameter 선택
  • 17. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 17 of 24 3) Step 3: HLS Group destination B 에 MediaPackage 두번째 Package URL, User name 기입 -> Password 에서 Create AWS Elemental MediaLive parameter 선택 -> Name 에 “medialive2” -> Password value 에 MediaPackage 두번째 Package 의 Password 복사 -> Create AWS Elemental MediaLive parameter 선택 4) Step 4: 좌측 창의 Create channel 버튼 선택 -> Channels 페이지로 이동
  • 18. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 18 of 24 5) Step 5: 채널 선택후 Start 선택 3-3. MediaLive Input 을 위한 라이브 신호 준비 1) OBS 소프트웨어 구동 -> Source -> + 버튼 선택후 Video Capture Device 선택 -> Device 에 노트북 Builtin 카메라 디바이스 선택 후 (그리고 640*480) -> OK 2) 오른쪽 하단의 Settings -> Stream -> Stream Type 을 Custom Streaming Server 를 선택 URL 에 MediaLive Input 의 URL 을 기입, URL 에 마지막 단어를 포함시키지 않고 마지막 단어는 Stream Key 에 적용. (예: MediaLive 의 Input 이 rtmp://52.76.42.222:1935/live/test1 인 경우 URL 에는 rtmp://52.76.42.222:1935/live/ 만 기입 하고 Stream Key 에 test1 기입
  • 19. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 19 of 24 3) OK 후에 Start Streaming 버튼 선택 -> 하단의 타이머, CPU 가 제대로 동작 하는지 확인 STEP4. Amazon MediaPackage Endpoint 구성하기 4-1. MediaPackage 입력 확인 1) 콘솔 내 MediaPackage 서비스로 이동하여 Package 에 입력이 들어 오는지 확인
  • 20. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 20 of 24 4-2. MediaPackage Endpoint 생성 1) MediaPackage 의 Package -> Endpoints -> Add endpoints -> ID 에 demo_endpoint1 을 입력하고 Segment duration (sec)을 2 로 변경 후 -> Save 2) Choose endpoing in Endpoins and Playback preview
  • 21. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 21 of 24 3) HLS Meta Data sample Master .m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-STREAM-INF:BANDWIDTH=2515864,AVERAGE- BANDWIDTH=2187343,CODECS="avc1.4d4020,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=30.020 20171026_120742720p_hls_.m3u8 #EXT-X-STREAM-INF:BANDWIDTH=5920683,AVERAGE- BANDWIDTH=5306785,CODECS="avc1.4d4028,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=30.020 20171026_1207421080p_hls_.m3u8 Sub .m3u8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:3 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:2.998, 20171026_120742720p_hls__00001.ts #EXTINF:2.998, 20171026_120742720p_hls__00002.ts #EXTINF:2.998, 20171026_120742720p_hls__00003.ts #EXTINF:2.998, 20171026_120742720p_hls__00004.ts #EXTINF:2.998, 20171026_120742720p_hls__00005.ts #EXTINF:2.998, 20171026_120742720p_hls__00006.ts #EXTINF:2.998, 20171026_120742720p_hls__00007.ts #EXTINF:1.499, 20171026_120742720p_hls__00008.ts #EXT-X-ENDLIST
  • 22. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 22 of 24 4) DASH Meta Data sample <?xml version="1.0" encoding="UTF-8"?> <MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="static" minBufferTime="PT30S" profiles="urn:mpeg:dash:profile:isoff-main:2011" mediaPresentationDuration="PT22.485S"> <Period start="PT0S" duration="PT22.485S" id="1"> <AdaptationSet mimeType="video/mp4" codecs="avc1.4d4028,avc1.4d4020,mp4a.40.2" frameRate="45000/1499" segmentAlignment="true" subsegmentAlignment="true" startWithSAP="1" subsegmentStartsWithSAP="1" bitstreamSwitching="false"> <ContentComponent contentType="video" id="1"/> <ContentComponent contentType="audio" id="2"/> <Representation id="1" width="1920" height="1080" bandwidth="5000000"> <BaseURL>20171026_1207421080p_dash_.mp4</BaseURL> <SubRepresentation contentComponent="1" bandwidth="0" codecs="avc1.4d4028"/> <SubRepresentation contentComponent="2" bandwidth="96000" codecs="mp4a.40.2"/> <SegmentBase indexRange="1221-1356"> <Initialization range="0-1220"/> </SegmentBase> </Representation> <Representation id="2" width="1280" height="720" bandwidth="2000000"> <BaseURL>20171026_120742720p_dash_.mp4</BaseURL> <SubRepresentation contentComponent="1" bandwidth="0" codecs="avc1.4d4020"/> <SubRepresentation contentComponent="2" bandwidth="96000" codecs="mp4a.40.2"/> <SegmentBase indexRange="1218-1353"> <Initialization range="0-1217"/> </SegmentBase> </Representation> </AdaptationSet> </Period> </MPD> STEP5. Amazon MediaStore 구성 – MediaLive 출력 수신 5-1. MediaStore Container 생성 1) 콘솔 내 MediaStore 서비스로 이동하여 Continer 생성 2) 생성된 Continer 를 확인
  • 23. Amazon Web Services – APN Bootcamp Lab Guide 2018 Page 23 of 24 3) Container 의 Data Endpoint 확인 그리고 Policy 에서 수신 받을 리소스의 정보를 입력. 예제에서는 모두에게서 받는 것으로 수정 (“*”) 5-2. MediaLive 의 출력을 MediaStore 로 설정 1) 콘솔 내 MediaLive 서비스로 이동하여 Destination 에서 CDN Setting 에서 HLS media store 선택. HLS group destination A 와 B 에 Mediastore endpoint 의 URL 을 입력. https 대신 mediastoressl 로 변경하여 입력. (예: mediastoressl://mn63czzbzfhvt5.data.mediastore.ap-northeast- 1.amazonaws.com/test2/index) 마지막 test2 는 prefix 이며 index 는 master m3u8 을 위한 이름