-
AWS Foundation 기반 온디맨드 비디오 솔루션 구현 - 이론편프로젝트/미디어 스트리밍 서버 프로젝트 2022. 12. 12. 00:01반응형
개요
그림1 스트리밍 서비스 구축을 위해 [그림]1과 같은 서비스를 배포할 수 있는 방법을 알아보겠습니다.
AWS 공식문서를 기반으로 작성되었습니다.
비디오 콘텐츠 수집과 처리에 관련하여 조금 더 복잡한 workflows가 존재합니다. (Video on Demand on AWS)
각각의 역할
- AWSElementalMedia는 소스 형식의 미디어 파일을 스마트폰, 태블릿, PC 및 기타 장치와 같은 장치에서 재생되는 버전으로 코드 변환합니다.- 객체 스토리지용 AmazonSimpleStorageService(AmazonS3)- AWSLambdator는 서버를 프로비저닝하거나 관리하지 않고 코드를 실행합니다.- AmazonCloudWatch에서 MediaConvert의 인코딩 작업을 추적합니다.- AmazonSimpleNotificationService(AmazonSNS)는 완료된 작업에 대한 알림을 보냅니다.Ingest(섭취)
video processing workflow를 수행하기 위해서는 s3 bucket에 source video를 게시해야 합니다.
(Kotlin을 통해 S3에 업로드하는 api 구현하면 될 것 같음, 또는 serverless)
기본적으로 asserts01 폴더를 S3 bucket 루트에 생성합니다.
이때 job-settings.json file이 같이 생성됩니다.
asserts01 folder에 업로드될 때마다 Amazon CloudWatch Event가 job-submit Lambda function을 발동시킵니다.
이 function은 source video에 대한 디테일 정보를 받아 S3 최상단에 있는 job-settings의 설정을 적용하고 Elemental MediaConvet에게 전달합니다.
MediaConvert에서 작업을 추적하기 위해 배포 시 정의된 워크플로의 이름과 Lambda에 의해 생성된 GUID가 MediaConvert에 같이 전달됩니다.
Encoding
AWS CloudFormation 배포의 일부로 생성된 샘플 작업 설정 파일에는 가속 트랜스코딩이 PREFERRED로 설정된 QVBR(품질 가변 비트 전송률) 속도 제어가 활성화되어 있으며 다음과 같은 출력을 생성합니다.
• HLSAdaptiveBitRate(ABR) with 5 renditions@1920x1080,1280x720,960x540,640x360,480x 270
설정을 변경하기 위해서 S3의 작업 설정 파일을 업데이트하거나 자체 설정으로 교체할 수 있습니다.
자세한 내용은 아래 문서에 기재되어 있다고 합니다.
https://docs.aws.amazon.com/mediaconvert/latest/ug/exporting-and-importing-jobs.html
Exporting and importing AWS Elemental MediaConvert jobs - MediaConvert
Settings that are likely to change from job to job include the following: input file location, output destination locations, and output name modifiers. If you run transcoding jobs for customers of yours who have different AWS accounts from your account, yo
docs.aws.amazon.com
DRM(위의 문서에는 없음)
DRM (디지털 권한 관리) 구현 - MediaConvert
이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오.
docs.aws.amazon.com
AWS Elemental과 함께 사용할 수 있는 세 가지 암호화 옵션 중 하나입니다. [그림 2 참고]
그림2 DRM 시스템을 도입하여 암호화를 통해 콘텐츠의 무단 사용을 방지할 수 있습니다.
DRM을 위해 Secure Packager and Encoder Key Exchange 이하 SPEKE라는 통신 표준을 정의합니다. (REST API)
그림3 [그림 3]은 aws cloud-base architecture입니다.
이때 DRM을 도입하기 위해서는 DRM 공급자가 있어야 합니다.
Processing
CloudWatch 이벤트 규칙은 MediaConvert에서 인코딩 작업이 시작되거나, 성공적 완료, 실패할 때마다 작업 완료 Lambda 함수를 호출하도록 구성됩니다.
이 함수는 이벤트에서 작업의 세부 정보를 검색하고 MediaConvert 출력에 대해 CloudFront Url을 생성합니다.
이후 입력 파일, 작업 설정 및 출력에 대한 세부 정보가 S3 버킷의 루트인 jobs-manifest.json 파일에 추가됩니다.
또한 작업 완료 시 생성된 Amazon SNS가 출력 요약을 보냅니다.
인코딩 프로세스의 모든 오류도 Lambda 함수에 의해 캡처되어 SNS 주제로 전송됩니다.
Regional deployments
Elemental MediaConvet는 Regions에 따라 사용 불가능할 수 있습니다.
서울 리전은 사용할 수 있습니다.
https://aws.amazon.com/ko/about-aws/global-infrastructure/regional-product-services/
AWS 리전 서비스
aws.amazon.com
AWS CloudFormation template
aws cloudformation tempplate는 템플릿을 사용하여 템플릿에 설명된 리소스를 프로비저닝과 구성을 담당합니다.
프로비저닝이란?
프로비저닝(provisioning)은 사용자의 요구에 맞게 시스템 자원을 할당, 배치, 배포해 두었다가 필요시 시스템을 즉시 사용할 수 있는 상태로 미리 준비해 두는 것을 말한다.
템플릿을 사용함으로써 리소스를 일관되고 반복적으로 설정할 수 있습니다.
또한 템플릿은 텍스트 파일로 템플릿에서 차이점을 추적하여 인프라 변경 사항을 추적할 수 있습니다.
즉, 버전 관리가 용이합니다.
video-on-demand-on-aws-foundation은 이런 cloudformation template을 지원합니다.
DRM 솔루션 비교
주요하게 고려해야 할 사항
- Widevine DRM과 FairPlay DRM을 지원하는가
- 비용
- 적용하기 쉬운가(관련 자료가 많은가)
- 지원하는 코덱, 기기 등
verimatrix
https://www.verimatrix.com/products/multi-drm/
DRM Software for Digital Rights Management: Multi-DRM | VERIMATRIX
Explore Verimatrix Multi-DRM, OTT-market’s leading digital rights management cloud solution for content providers, service operators, and App developers.
www.verimatrix.com
Multi-DRM Solutions (PlayReady, Widevine, FiarPlay Compatiable)
비용 및 지원하는 기기 등은 문의해야 합니다.
bynder
https://www.bynder.com/en/products/digital-asset-management/
What is digital asset management? - Bynder
Was ist Digital Asset Management? Wie wählen Sie die beste DAM für Ihr Unternehmen? Planen Sie Ihre Demo ein oder erfahren Sie mehr in unseren Downloads
www.bynder.com
Digital Asset Management라는 서비스를 제공합니다.
DRM만 제공하는 것이 아니라 DRM을 포함하여 전반적인 관리에 대한 툴을 제공합니다.
비용 및 지원하는 기기등은 문의해야 합니다.
VdoCipher
https://www.vdocipher.com/blog/aws-drm/
AWS DRM or Digital Rights Management Solution Providers & Benefits
AWS DRM needs to be coupled with popular license servers like Google Widevine and Apple Fairplay having widest list of compatible devices for protection.
www.vdocipher.com
OTT에서 DRM을 적용하는 일련의 과정을 잘 설명해줍니다.
DRM, 워터마킹, CDN, 다양한 비트레이트 품질, IOS & andriod App sdks 등을 지원합니다.
비용
https://www.vdocipher.com/site/pricing/
Pricing | VdoCipher
Bandwidth is calculated as the total data transferred for video streaming . If a 200 MB video is played 10 times a day, then bandwidth consumed would be 0.2*10 = 2 GB . The above hours streaming is calculated for a 600 kbps video.
www.vdocipher.com
Google Widevine
Apple TV, Safari Brower, Nintendo Switch, Microsoft Xbox를 제외하고 모든 device와 Platform을 지원합니다.
Youtube, Amazon Prime Video, Netflix, Disney+ 등의 기업이 사용하고 있습니다.
서비스에 사용하기 위해서는 라이센스 계약이 필요합니다
AWS의 Elemental mediaconvert에 google widevine을 적용하는 예제를 찾지 못했습니다.
https://developers.google.com/widevine/drm/overview
Widevine | Google Developers
Overview Widevine DRM is Google’s content protection system for premium media. It is used by major partners around the world such as Google Play, YouTube, Netflix, Disney+, Amazon Prime Video, HBO Max, Hulu, Peacock, Discovery+, Paramount+ and many more.
developers.google.com
Apple FairPlay
FiarPlay Streaming 이하 FPS라 불립니다.
IOS devides들과 Apple TV 등을 지원하며 H.264 video codec을 포함하여 ACC-LC, HE-AACV1-2, AC-3, EC-3 audio codecs을 지원합니다.
FiarPlay Streaming Deployment Package를 사용하기 위해서는 ios developer account 가 필요합니다.
ios developer account는 연간 99$ 있으면 사용할 수 있습니다.
https://developer.apple.com/streaming/fps/
FairPlay Streaming - Apple Developer
FairPlay Streaming Secure the delivery of streaming media to devices through the HTTP Live Streaming (HLS) protocol. Using FairPlay Streaming (FPS) technology, content providers, encoding vendors, and delivery networks can encrypt content, securely excha
developer.apple.com
https://developer.apple.com/forums/thread/37643
FairPlay Streaming Deployment Pack… | Apple Developer Forums
Hello there - I cannot find pricing model for I have iOs developer account 99$ per year...
developer.apple.com
Microsoft playReady
PlayReady server application을 개발하여 배포하여 end-users에게 제공하는 경우에는 라이선스 옵션에 따라야 합니다.
Microsoft PlayReady Server Agreement라는 문서가 존재함
https://www.microsoft.com/playready/licensing/
https://www.microsoft.com/playready/licensing/
Microsoft offers a flexible business model that supports a variety of scenarios regardless of whether you are shipping devices, offering live TV to end customers, operating a back-end service, or manufacturing a PlayReady-enabled silicon solution for devic
www.microsoft.com
Digify
Digify가 지원하는 코텍
DRM 이외에 다른 기능들도 지원
비용은 BUSINESS, ENTERPRISE로 나뉘어 있고 ENTERPRISE는 문의 비용 및 지원 관련 링크
https://digify.com/pricing/#/plans
Digify - Pricing
To proceed, please confirm the following: You will lose access to team trial features (e.g. company logo, presets, terms of access). All team trial settings will be discarded.Your files and data rooms will remain accessible.All admins and members (if any)
digify.com
PallyCon
- 멀티 DRM 라이선스 서비스로 SPEKE API로 AWS Elemental Media 서비스와 연동되어 있습니다.
- 멀티 리전 서비스를 통한 높은 성능과 안정성
- PallyCon 포렌식 워터마킹과의 연동 가능- 별도의 Active X가 설치가 없이 바로 서비스 가능
- 모바일 SDK 제공
SDK - Multi DRM SDK for Windows, iOS & Android | PallyCon
Multi-DRM SDK at PallyCon makes it easy to apply DRM across various OTT platforms. SDK Platform helps you apply Multi DRM easily to Windows PC, Android & iOS applications.
pallycon.com
- 데모 영상 with Elemental MediaConverter
https://www.youtube.com/watch?v=SZwphL0ryYY
PALLYCON을 사용하여 AWS 미디어 서비스에 DRM 암호화 적용하기
https://daniel-inka.medium.com/aws-미디어-서비스에-drm-암호화-적용하기-f334d47fb19e
AWS 미디어 서비스에 DRM 암호화 적용하기
AWS Elemental MediaConvert 또는 MediaPackage 서비스를 이용해 DRM으로 암호화된 VOD 또는 라이브 스트림을 생성하는 방법을 안내합니다.
daniel-inka.medium.com
- 금액 : 400만 뷰 기준 약 100만 원 내외 예상 (MAU가 늘어날수록 저렴해짐) 300만 MAU부터는 동일하게 사용자 당 월간 0.0023 USD
비용링크
https://pallycon.com/ko/pricing/
콘텐츠 보호 서비스 고객 맞춤형 가격 정책 - 팰리컨
귀사의 콘텐츠 보호를 위한 팰리컨의 멀티 DRM 솔루션과 포렌식 워터마킹 서비스의 고객 맞춤 가격 정책을 만나보십시오. 30일 간의 무료 체험이 가능하며, 언제든 원하실 때 상용 서비스로 업그
pallycon.com
PallyCon 레퍼런스
디지털 해적들로부터 영상 콘텐츠 보호하기 - 황윤상 AWS 솔루션즈 아키텍트
https://www.slideshare.net/awskorea/aws-aws-cloud-week-industry-edition-239189628
디지털 해적들로부터 영상 콘텐츠 보호하기 – 황윤상 AWS 솔루션즈 아키텍트, 김준호 잉카엔트
영상 콘텐츠의 가장 큰 적은 바로 Digital Piracy입니다. 이 세션에서는 AWS를 이용하여 미디어 서비스를 제공하고자 할 때, 어떻게 소중한 미디어 콘텐츠를 보호할 수 있는지 살펴봅니다. Amazon Cloudfr
www.slideshare.net
참고자료
https://nearhome.tistory.com/117
[AWS] AWS CloudFormation 의 개념
AWS CloudFormation 이란? AWS CloudFormation 구성요소 템플릿(Template) 스택(Stack) CloudFormation AWS CloudFormation 작동 방식 스택 생성 워크플로우 스택 업데이트 워크플로우 템플릿(Template) 구성 사항..
nearhome.tistory.com
https://www.g2.com/categories/digital-rights-management-drm
'프로젝트 > 미디어 스트리밍 서버 프로젝트' 카테고리의 다른 글
스프링과 스트리밍 서버 (0) 2022.12.23 [Kotlin] AWS S3에 업로드하기 (0) 2022.12.19 OTT는 어떻게 콘텐츠를 보호할까? (0) 2022.12.08 리팩토링에 대하여 (0) 2022.10.08 Kotlin 동시성 테스트하기 (0) 2022.10.07