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.31k stars 637 forks source link

Clip Creator Plugin Fails to Capture Interval When Broadcast Stops Midway Through #6837

Open lastpeony opened 1 week ago

lastpeony commented 1 week ago

Assume the MP4 creation interval is set to 30 minutes.

Scenario:

14:00: The stream starts. 14:30: An MP4 segment is created (based on the 30-minute interval). 14:45: The stream stops. Issue:

The recording from 14:30 to 14:45 is lost because the stream stopped before the next MP4 segment could be created. Solution:

The clip creator should detect when the stream goes offline and create the final MP4 segment with the remaining duration, based on the time left since the last successful segment was created.

If Clip-Creator is set for 60 minute VODs, and the user only publishes for 30 minutes, we need a 30 minute VOD. If Clip-Creator is set for 60 minute VODs, and the user publishes for 90 minutes, we expect a 60 minute VOD and a 30 minute VOD. If Clip-Creator is set for 60 minute VODs, and the user publishes for 125 minutes, we expect two 60 minute VODs and a 5 minute VOD.

lastpeony commented 5 days ago

This is fixed and new build is shared with the customer.

https://github.com/ant-media/Plugins/pull/117/commits/0c54ea453e9710aa2f9f0614ee8c66c3f25a682e#diff-a2162fa44f4e2daff51888e19bcc4c72ee5a775474df6ff8f8ee9bc31afdb7e6