How can I play HLS streams from Wasabi in Ant Media Server?

Viewed 270

I want to play my HLS streams from Wasabi. I enabled S3 options in Ant Media Server Dashboard. But it seems that Ant Media Server uploads HLS files after the stream ends. How can I play HLS chunks on Wasabi?

2 Answers

s3fs 1.88 and later buffers data locally and flushes according to the -o max_dirty_data flag, defaulting to 5 GB. If you reduce this value you should see updates more often. Note that these flushes require server-side copies and may do more IO than you anticipate.

We recommend S3 Fuse for instant transfer and deletion of your HLS files to S3. You do not need to activate S3 in the panel. If the streams folder of the application in the Ant Media directory is linked to a folder under s3, it automatically syncs to S3.

I briefly list the steps below:

  1. Install s3fs
sudo apt install s3fs
  1. You need to add the access key and secret key from wasabi account.
echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs

chmod 600 ${HOME}/.passwd-s3fs
  1. In order to mount S3, you need to update the mybucket below with the bucket in wasabi, add the folder you will mount and add the endpoint url to the url. For example: https://s3.us-west-1.wasabisys.com

    You need to replace us-west-1 with your own region. You can access the Region parameter from the bucket list.

sudo s3fs -o dbglevel=info -o curldbg -o allow_other -o use_cache=/tmp/s3-cache mybucket /usr/local/antmedia/webapps/LiveApp/streams/ -o url=https://s3.us-west-1.wasabisys.com -o use_path_request_style
-o passwd_file=${HOME}/.passwd-s3fs
  1. Please check the disk if mount is successful. You should see a line similar to below in the output when you run df
s3fs    274877906944   0 274877906944   0% /usr/local/antmedia/webapps/LiveApp/streams
Related