amazon-cloudfrontmpeg-dashsmilaws-media-convertaws-mediapackage

How to stream uploaded video with AWS?


The main task is to protect video from downloading.

To achieve it, we decided to set up Video Streaming from S3.

The project has an PHP API and a client. The API generates Pre-Signed URL to where the video should be uploaded in S3 bucket. Then, client can request video by a CDN URL. But, with signed urls, video can be downloaded from the client.

We found an approach, when video is converted to MPEG-DASH with AWS Elemental MediaConverter. The Job for MediaConverter can be created via API. Then it should be streamed via AWS Elemental MediaPackage and CloudFront.

The problems are:

P.S. If I'm wrong somewhere, please, correct me.


Solution

  • How to understand when the video upload is finished, to start MediaConverter Job? It could be achieved by the following workflow

    1. the ingest user uploads a video to the watchfolder bucket in S3
    2. the s3:PutItem event triggers a Lambda function that calls MediaConvert to convert the videos.
    3. Converted videos are stored in S3 by MediaConvert

    High level instructions as follow.

    MPEG-DASH file has a .mpd manifest, but MediaPackage requires .smil manifest. How to auto generate this file from a .mpd?