I am running Adobe Media Server 5 on a EC2 machine and I also have a recording application that saves .flv file to the default AMS folder, I`d like to send all recorded files to S3 as soon as they get to the folder.
Since we are using RTMP, I need to do that after the user stops the recording, then, the connection is closed and I run that routine (automatically)
Is there a way to do that?
My EC2 and S3 are in the same region, but do you know if these transfers are like lighting speed, or just like any other upload to a server?
Thanks
Take a look at s3cmd , it will allow you to interact with S3 directly from the shell of your EC2 instance. So you can integrate the file upload into your workflow. A simple upload looks like that:
s3cmd put --acl-public --guess-mime-type test.flv s3://example.com/videos/test.flv
The response will look like this:
File 'test.flv' stored as s3://example.com/videos/test.flv (xxxx bytes)
Public URL of the object is: http://example.com.s3.amazonaws.com/videos/test.flv
You can use regex to extrect the public url if needed. If you don't want your files to be public just strip the --acl-public
out of the put command.
Regarding speed: There is a informative thread on this topic here on stackoverflow: Improving Data Transfer Rate on Amazon EC2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.