[英]How to Record HLS Streamsto S3 in Ant Media Server?
I want to record all HLS streams/previews to S3 bucket.我想将所有 HLS 流/预览记录到 S3 存储桶。 How can I do that?
我怎样才能做到这一点?
There are a couple of ways to upload the HLS files to S3.有几种方法可以将 HLS 文件上传到 S3。 First solution is writing files to S3(mounting the S3 Bucket) while broadcasting and second solution is writing the files after broadcasting is finished.
第一个解决方案是在广播时将文件写入 S3(挂载 S3 Bucket),第二个解决方案是在广播完成后写入文件。
If you would like to have full recording of HLS files, you need to do following settings如果您想完整录制 HLS 文件,您需要进行以下设置
settings.hlsPlayListType
) to event and settings.deleteHLSFilesOnEnded
to false .settings.hlsPlayListType
)设置为 event 并将settings.deleteHLSFilesOnEnded
为 false 。 Edit your /usr/local/antmedia/webapps/{YOUR_APP}/WEB-INF/red5-web.properties
for the application and set the following settings/usr/local/antmedia/webapps/{YOUR_APP}/WEB-INF/red5-web.properties
并设置以下设置settings.hlsPlayListType=event settings.deleteHLSFilesOnEnded=false
sudo service antmedia restart
sudo apt install s3fs
echo {WRITE_YOUR_ACCESS_KEY_ID}:{WRITE_YOUR_SECRET_ACCESS_KEY} | sudo tee /etc/passwd-s3fs > /dev/null sudo chmod 600 /etc/passwd-s3fs
sudo mkdir /mnt/myS3Bucket
sudo s3fs -o dbglevel=info -o curldbg -o allow_other -o use_cache=/tmp/s3-cache myS3Bucket /mnt/myS3Bucket
Please check the disk if mount is successful.df
df
时,您应该在输出中看到类似于以下的行s3fs 274877906944 0 274877906944 0% /mnt/myS3Bucket
streams
directory to your mount directorystreams
目录链接到挂载目录sudo ln -s /mnt/myS3Bucket /usr/local/antmedia/webapps/{YOUR_APP}/streams
After that all your streams are directly written to S3 bucket.之后,您的所有流都直接写入 S3 存储桶。
You can do that with Ant Media Server S3 integration.您可以通过 Ant Media Server S3 集成来做到这一点。 Check this out
看一下这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.