How to share videos of the kids so that the close relatives can browse them easily but they will not be available in the public internet, e.g. in Youtube?
A web application for storing and viewing videos in AWS S3. It uses AWS Elastic Transcoder to transcode videos in HTML5 compatible video formats: MP4 and Webm.
This project is based on the AWS S3 Direct Upload Example.
- Create a user in AWS IAM Management Console.
- Create a group with two Managed Policies: AmazonS3FullAccess and AmazonElasticTranscoderJobsSubmitter
- Assign the group to the user
- Save the Access key ID and Secret Access Key. They will be configured in
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
You need to set up two AWS S3 buckets: one for AWS_S3_BUCKET_UPLOAD
and one for AWS_S3_BUCKET_TARGET
. See Heroku documentation for the initial setup of the upload bucket and its permissions.
- Setup a Pipeline in AWS Elastic Transcoder Console.
- Use the previously created
AWS_S3_BUCKET_UPLOAD
as the Input Bucket. - Use the previously created
AWS_S3_BUCKET_TARGET
for both Transcoded Files and Playlists and Thumbnails - Save the Pipeline ID. It will be configured in
AWS_TRANSCODER_PIPELINE
- Create two presets, one for MP4 and one for Webm format:
- Copy System preset: Web, set jpg as the thumbnail format and select suitable output resolutions
- Copy System preset: Webm VP9 720p and select suitable output resolutions.
- Save the Preset IDs. They will be configured in
AWS_TRANSCODER_MP4
andAWS_TRANSCODER_WEBM
.
Set the following environment variables:
AWS_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_S3_BUCKET_UPLOAD
AWS S3 Bucket for file uploadsAWS_S3_BUCKET_TARGET
AWS S3 Bucket for transcoded videosAWS_TRANSCODER_PIPELINE
Pipeline ID in AWS Elastic Transcoder that reads fromAWS_S3_BUCKET_NAME_UPLOAD
AWS_TRANSCODER_MP4
Job ID in AWS Elastic Transcoder for converting video to MP4 format and JPG thumbnailsAWS_TRANSCODER_WEBM
Job ID in AWS Elastic Transcoder for converting video to Webm format
Make sure you have Leiningen installed.
$ git clone https://github.com/ykarikos/aws-s3-direct-upload-example.git
$ cd aws-s3-direct-upload-example
$ lein ring server-headless
Your app should now be running on localhost:3000.
$ lein ring uberjar
$ java -jar target/aws-videoindex-standalone.jar
$ heroku create
$ git push heroku master
$ heroku open
See Clojure on Heroku for more information.
- You can see all the videos listed per year in the root context.
- Use
/upload.html
to upload videos.
Licensed with Eclipse Public License v1.0.
This project is a grateful recipient of the Futurice Open Source sponsorship program.