Dynamically creating live RTMP stream on AWS?
I've read a bunch of tutorials that let you create a live stream with CloudFormation, but I'd like to run a website in the style of UStream or Justin.tv that lets someone go live in a completely automated way.
To do that, I'd like to be able to run backend code that creates a new live stream on-the-fly and returns the RTMP url to publish/listen to. Obviously I'm not deploying a whole cloudformation stack here, the EC2 instance with FMS would already be running, but I just need a new publish and play url, if that 开发者_JS百科makes sense.
Cloudfront exposes resources that are stored on a s3 bucket. You do not need EC2 or other services from amazon.
If you post your content to an S3 bucket that is exposed through cloudfront, then within seconds it will become available through cloudfront (synchronization is automatic, no need to trigger it).
If I understand your use case correctly, all you need to do is :
Create a location in your S3 bucket with write access to your client, let them push their data to the bucket using HTTP PUT.
Ex: yourbucket.s3.amazonaws.com/location/of/your/client/bigfile.mp4
After that, provided that your cloudfront instance is configured for streaming, the streaming will be available at the same relative address.
EX. yourcloudfront.cloudfront.amazonaws.com/location/of/your/client/bigfile.mp4
Again, to stream stuff through amazon, all you need is a S3 bucket and a cloudfront streaming configuration (and optional security to prevent abuse).
Let me know if it answers your question.
Regards, Vincent Giguère
精彩评论