docker-nginx-vod-module
docker-nginx-vod-module copied to clipboard
A Dockerized NGINX build of the nginx-vod-module
Docker NGINX VOD Module
A Dockerized NGINX build with the nginx-vod-module
and ngx_aws_auth
for serving VOD content to DASH, HLS, and MSS.
nginx-vod-module
is configured in remote-mode with ngx_aws_auth
to securely serve content stored in a private S3 bucket.
Setup
Requirements
- Docker
- AWS Account for S3
- Python 2.7
Setup AWS Credentials
- Create an AWS account and S3 Bucket (private)
- Create a user via IAM with Programmatic Access and read access to the S3 Bucket
- Run
python scripts/generate_signing_key.py -k <aws secret access key> -r <aws region>
to generate a signing_key and key_scope.
Setup Server
- Configure
docker-compose.yml
with the following environment variables:
- AWS_ACCESS_KEY=<aws access key>
- AWS_S3_BUCKET=<aws s3 bucket>
- AWS_SIGNING_KEY=<aws signing key from script>
- AWS_KEY_SCOPE=<aws key scope from script>
- Start server:
docker-compose up
-
Test Upload an MP4 to your S3 bucket and load the manifest to test different outputs:
-
DASH - http://localhost:8080/dash/video.mp4/manifest.mpd
-
HLS - http://localhost:8080/hls/video.mp4/master.m3u8
-
MSS - http://localhost:8080/mss/video.mp4/manifest
λ curl -I http://localhost:8080/dash/video.mp4/manifest.mpd
HTTP/1.1 200 OK
Use one of the players below to test playback.
Setup CDN
TODO
Demo
Type | Source | URL |
---|---|---|
DASH | Origin | Shaka Player |
HLS | Origin | HLS.js PLayer |
MSS | Origin | HASPlayer.js |
DASH | CDN | Shaka Player |
HLS | CDN | HLS.js Player |
MSS | CDN | HASPlayer.js |
Test Players
HTML5 Players for testing.
- https://shaka-player-demo.appspot.com
- http://video-dev.github.io/hls.js/demo/
- http://orange-opensource.github.io/hasplayer.js/
TODO
- DRM Example
- Test with S3-compatible APIs (Digital Ocean Spaces)
References
- https://www.nginx.com
- https://github.com/kaltura/nginx-vod-module
- https://github.com/anomalizer/ngx_aws_auth