ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.24k stars 622 forks source link

Setting a Maximum Duration for MP4 VODs #6663

Open mekya opened 5 days ago

mekya commented 5 days ago

Is your feature request related to a problem? Please describe. Many of our customers use security cameras that run continuously, resulting in extremely large archives (e.g., 72 hours) that are challenging to manage. We need the ability to set a maximum duration for MP4 VODs—ideally one hour per file. This should be a configurable option in the management console, allowing users to define the maximum length of MP4 files (in minutes or hours) without needing to stop and restart the stream.

Describe the solution you'd like Solution: Create a plugin, provide a function that runs with every {Interval} minutes. It will go through the streams folder and create MP4 without transcoding from HLS streams for the last {Interval} minutes. For the first version, it’s ok to define the {interval} for application wide. It’ll be better if it’s stream-wide. Pay Attention: The created MP4 VoD has the information( “description”, “metadata”, “lat”, “long”, “alt”..) filled as described in the issue https://github.com/ant-media/Ant-Media-Server/issues/6662 .