-
Notifications
You must be signed in to change notification settings - Fork 56
Getting Started with VOD
If you're new to application development with AWS Amplify, we recommend starting by following the Amplify Getting Started guide for Javascript
To add a VOD Video Resource to your application, run the command and Follow the prompts. Use the default values as they will be sufficient for most users, but remember to choose the VOD option when prompted. You can also select No
for the question Do you want Amplify to create a new GraphQL API to manage your videos?
to skip the majority of the prompts.
amplify add video
With the Video Resource configured in our project, simply push the project to deploy the AWS resources that back it.
amplify push
Navigate to the S3 console. Amplify Video has deployed a few buckets into your environment. Select the input
bucket and upload a .mp4
file you have stored locally on your computer.
Once the file has been successfully uploaded, navigate the the Mediaconvert Console to see your transcode job kicked off. This job takes the input file, transcodes it into the Apple HTTP Live Streaming Protocol (HLS), and outputs the segment files to the S3 bucket labeled output
.
After the MediaConvert job has reached a completed state, navigate back to the S3 Console and locate the output
bucket. When you step into the bucket you will see a folder with the name of the file you uploaded. Step into the folder and you will see the output files created by MediaConvert. Locate the HLS Manifest, the file with the .m3u8
extension, and copy it's S3 object url to your clipboard.
To test playback, navigate to an HLS native browser such as Safari and paste the link into the browser. If you are not on a Mac workstation, you can download the Native HLS Playback extension for chrome.
Congratulations, you've built a resource that serves live video. Try creating your own application and adding other Amplify categories like Auth, API, or Analytics alongside your video stream or deploying your application to AWS for hosting using amplify console
.
For a more detailed application development guide, check out our UnicornFlix Workshop that will show you how to build a content management API on top your video transcoding workflow.