-
Notifications
You must be signed in to change notification settings - Fork 60
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
Memory leak while calling "get_key_frames_from_video" function in a for loop #11
Comments
What is the average video size on which you are doing this processing ? |
These are my system details : Above list is increase in RAM % usage while these functions are called in a for loop. |
For one frame of A typical 720p video with resolution of 1280 x 720 loaded in memory takes around 3*1280 x 720 = 2764800 = 2.7648 MB in RAM So for 2500 frames RAM usage would be 2500*2.7648 MB = 6912 MB , |
Still I'm not able to limit RAM usage. It goes on increasing when I'm calling this function in a for loop. And the RAM is free only when I restart the jupyter kernel or when python script is finished running. This is the script I'm running : Python Script , Jupyter Notebook |
2.68 MB is RAM Usage if you load a single Frame of a video in RAM, typically |
Hi @RahulnKumar , thanks for reaching out. I was wondering if you would like to contribute to this project with this issue fix. We are bit overwhelmed with our office work at the moment and might not be able to investigate immediately. |
Ok, sure. I'll let you know when fixed. |
Can you also tell me which operating system and OS version you are using ? |
Also if possible can you put and then |
Yes, I tried garbage collector earlier also. Again I tried, still facing the same issue . |
This memory leak issue is fixed in katna version 0.9.0, kindly test and confirm. |
Yes Working perfectly now. 😊
You forgot to add |
It is breaking change from the last version. The function not only extracts but saves it on the disk as well via the writer. Documentation has been updated with the details |
I got it. Thanks. 🤗 |
While calling the function "get_key_frames_from_video (path_to_video, no_of_frames)" in a for loop, RAM usage goes on increasing.
For just 10 small videos ( < 1min ) in loop, RAM usage went beyond 6GB
The text was updated successfully, but these errors were encountered: