Try Live Demo

Today, I’m going to show you How to record streams to S3 compatible systems (OVH, GCS, Digital Ocean, Wasabi). Using S3 services is more cost-effective than storing files on your own server. It’s also easy to manage. Furthermore, S3 services have a lot of API capabilities. For example, you can add CORS policies, rules, and triggers to your system.

Table of Contents

  • How to record streams on OVH Object Storage
  • How to record streams on Google Cloud Storage
  • How to record streams on Digital Ocean Spaces
  • How to record streams on Wasabi Storage

How to record streams on OVH Object Storage

OVH is a cost-effective cloud provider and it is preferred by many people. If you installed Ant Media Server on an OVH cloud instance, you may want to upload your stream recordings to S3 storage. You could do that with a few steps. Let start!

Firstly, you need to generate Secret Key and Access Key with your OpenStack username/password. You can learn more about it in OVH’s docs.

After generating Secret Key and Access, you just need to create an Object Storage as an image.

record streams on OVH

record streams on OVH

You will see the Dashboard below after clicking the Create the Container.

ovh-object-storage-dashboard

Then, log in the http://your_ams_server:5080, enable the Record Live Streams as MP4 and Enable S3 Recording, enter the S3 credentials you have created and save the settings.

ams s3 ovh

On the Terminal

You need to add a new bean to red5-web.xml of your app as seen below. red5-web.xml file is under WEB-INF folder of your app. For example: webapps / LiveApp / WEB-INF / red5-web.xml

Here you see the sample S3 credentials. You need to set to yours:

Save the file and restart the server.

sudo service antmedia restart

Your MP4 files and Preview files will be uploaded to your OVH Object Storage automatically.

 

How to record streams on GCS Object Storage

Google Cloud is another cloud provider that is preferred by many Ant Media Server users. You could integrate your Google Cloud cloud instance easily with S3 cloud storage. Let’s see how it can be done with a few steps!

Firstly, you need to create a Bucket. Just click the Create button and fill in the blanks. You should choose the access level to Fine-grained.

 

Screen Shot 2022 09 26 at 12.47.46

After creating the Bucket, go to the bucket and create a folder named streams.

Screen Shot 2022 09 26 at 12.52.17

After creating the streams folder, go to settings and interoperability tab. On the User account HMAC section and choose the default project for interoperability access.

Screen Shot 2022 09 26 at 12.57.01

After choosing the default project, create an access key for the user account.

Screen Shot 2022 09 26 at 12.58.46

On the Dashboard:

Log in the http://your_ams_server:5080, enable the Record Live Streams as MP4 and Enable S3 Recording, enter the S3 credentials you have created and save the settings. You should enter “auto” to Region Name and enter “https://storage.googleapis.com” into Endpoint.

Screen Shot 2022 09 26 at 13.01.52

Your MP4 files and Preview files will be uploaded to your Google Cloud Storage Bucket automatically.

How to record streams on Digital Ocean

DigitalOcean is another cloud provider that is preferred by many Ant Media Server users. You could integrate your DigitalOcean cloud instance easily with S3 cloud storage. Let’s see how it can be done with a few steps!

Firstly, you need to create Spaces. Just click the Space button and fill in the blanks.

create-a-digital-ocean-spaces

After creating Spaces you need to create API keys for Access and Secret keys. Just click the API button on the left side and then click Generate New Key.

generate-new-api-key-digital-ocean

Just type the Name parameter and click the create button.

digital-ocean-spaces-access-secret-keys

After generating Access keys and Secret keys, there is only one step left.

digital-ocean-s3-endpoint

On the Dashboard:

Log in the http://your_ams_server:5080, enable the Record Live Streams as MP4 and Enable S3 Recording, enter the S3 credentials you have created and save the settings.

ams s3 do

On the Terminal:

You need to add a new bean to red5-web.xml of your app as seen below. red5-web.xml file is under WEB-INF folder of your app. For example: webapps / LiveApp / WEB-INF / red5-web.xml

Save the file and restart the server.

sudo service antmedia restart

Your MP4 files and Preview files will be uploaded to your Digital Ocean Spaces automatically.

How to record streams on Wasabi Storage

Wasabi is another cloud provider that is preferred by many Ant Media Server users. You could integrate your Wasabi storage. Let’s see how it can be done with a few steps!

Firstly, you need to create a new access key in your Wasabi account.

Wasabi create new access key

After generating Access keys and Secret keys, you need to create a bucket. Just click the Create Bucket on the right side.

Wasabi create a bucket

On the Dashboard:

Then, log in the http://your_ams_server:5080, enable the Record Live Streams as MP4 and Enable S3 Recording, enter the S3 credentials you have created and save the settings.

ams s3 wasabi

On the Terminal:

You need to add a new bean to red5-web.xml of your app as seen below. red5-web.xml file is under WEB-INF folder of your app. For example: webapps / LiveApp / WEB-INF / red5-web.xml

Save the file and restart the server.

sudo service antmedia restart

Your MP4 files and Preview files will be uploaded to your Wasabi storage automatically.

Conclusion

In this blog post, you learned how easy to integrate Ant Media Server with S3 storage. By following this blog post, you could start uploading MP4, WebM, and preview records to your storage automatically.

References

Categories: Tutorial

Selim Emre Toy

Highly motivated full-stack developer with 6 years of experience especially in Java and Angular. Constantly learning, passionate about solving complex problems. Proficient in various programming languages and technologies. Enjoys finding creative solutions to challenges.