Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClipCreator StartTime and Storage Issues #6996

Open
mekya opened this issue Feb 3, 2025 · 1 comment
Open

ClipCreator StartTime and Storage Issues #6996

mekya opened this issue Feb 3, 2025 · 1 comment
Assignees

Comments

@mekya
Copy link
Contributor

mekya commented Feb 3, 2025

1. Start time problem with Clip-Creator VoDs

Expected Behavior:

When the Clip-Creator interval triggers, the “startTime” for the VoDs should match the time that the VoD starts at.

Actual Behavior:

Sometimes when the Clip-Creator interval triggers, the start time varies drastically from the actual start time of VoD.

Also, sometimes when the server has to make multiple VoDs because there are multiple simultaneous streams,

if it takes 30 seconds to make the first VoD, the next one might have a startTime that is 30 seconds later than the first. Or the video starts 30 seconds later.

This will shift farther with more streams being recorded.

Steps to reproduce (Shorter periods of time may still cause the issue, this is how we used the system.)

  1. Start the clip creator-interval. (ours is 60 minutes)
  2. Publish 3 streams simultaneously
  3. Wait one hour
  4. Once all the VoDs are created look at the VoD startTime in the database (not creationDate)
  5. Notice that each VoD has a later start time than the VoD created before it.
  6. Also notice that the durations do not match 60 minutes. They will be a little bit shorter.
    Let the streams go another hour.
  7. Notice when the VoDs get created that again, the startTime are different for each VoD and the durations will not match 60 minutes.

I have been unable to replicate this when using single streams and shorter intervals.

It seems that the longer it takes the server to create each mp4 from HLS files, the farther these values deviate.

2. Storage Problem with Clip-Creator

Expected Behavior:

Once you run out of storage, you should be able to delete the VoDs from the Management console, and reclaimed all the storage space used since begin to record.

Some space will still be used by HLS files.

Actual Behavior:

We are never able to regain all the space used from creating VoDs.

It seems some mp4 files are created and are never deleted.

Steps to reproduce:

  1. Set up a server with limited storage space. (Our test server is 30GB)
  2. Start the clip interval (ours is set to 60 minutes)
  3. Take note of how much storage space is taken up by the app on the Management Console dashboard page.
  4. Publish a stream to the server (Our testing was publishing two or three at a time)
  5. Once the storage fills up, delete all the VODs from the Management Console.
  6. Notice you do not reclaim as much space as expected
  7. On the server, go the /usr/local/amtmedia/webapps//streams folder and notice there are mp4 files there despite deleting all VODs.

After searching the ant-media-server.log file, I am finding lines like this for these mp4 files:

2025-01-30 05:30:40,742 [Thread-484] INFO i.a.plugin.ClipCreatorConverter - [out#0/mp4 @ 0x5c2ea24cf600] Error writing trailer: No space left on device

[out#0/mp4 @ 0x5c2ea24cf600] Error closing file: No space left on device

2025-01-30 05:30:40,743 [Thread-484] INFO i.a.plugin.ClipCreatorConverter - Conversion failed!

It seems the server may create the files, but never clean it up if it runs out of space during the creation process.

@mekya mekya self-assigned this Feb 3, 2025
@mekya mekya converted this from a draft issue Feb 3, 2025
@burak-58 burak-58 moved this from Next Sprint to 🔖 Sprint in Ant Media Server Feb 3, 2025
@mekya
Copy link
Contributor Author

mekya commented Feb 9, 2025

Hi @burak-58 ,

For the first issue, I've sent the PR and merged it into master.

For the second issue, I could not reproduce the problem. Here is the video that I've asked to Jeremy to debug together

Screen.Recording.2025-02-09.at.14.00.53_1080p.mov

@mekya mekya moved this from 🔖 Sprint to After sprint in Ant Media Server Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: After sprint
Development

No branches or pull requests

1 participant