Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
477 views
in Technique[技术] by (71.8m points)

recording - Should I record my stream in HLS or mp4 format in Ant Media Server?

I am using Ant Media Server for live streaming and I want to record the streams. I know I can do it by enabling mp4/webm recording. But HLS seems to be a good alternative according to this. What is the most effective way?

question from:https://stackoverflow.com/questions/66048068/should-i-record-my-stream-in-hls-or-mp4-format-in-ant-media-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

mp4/webm recording is the easiest way to record your streams. As you said you just need to enable. However, in case of disk capacity fullness or unexpected stop in the stream, mp4.tmp_extension file could not be converted to the final mp4 file. Then you may lost whole record.

If you disabled HLS file deletion, you would have the records as HLS chunks. Moreover, you can convert them at the end of the stream to mp4. Therefore, if you will record long-duration streams the mp4 file size will be large and if disk capacity is full then you lost everything. If you record as HLS then you may lost few parts after disk is full.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...