Improve performance. Especially with rendering the video generation.
When using PIL for everything (due to conversions and others), the iterations/sec for adding the dots in frames was ~30it/s -> 100it/s. When moving to CV2, as of now it's ~70it/s -> 200it/s. Now generating the dots is not a bottleneck 🥳
I probably should have kept track of my cProfiling as "proof" 😞
Fixes #(issue number)
I'll still need to
[x] Fix color values. CV2 is BRG, while the color pickers are in RGB so this messes with opacity and colors when rendering.
[x] Make the cover image smaller. something like max(2/3width, 2/3height) so non 1:1 images are still in frame.
[x] Test text.
[x] Test rendering a 3+ minute video with audio visualizer and 30+ fps.
Previously, when rendering longer videos with above specs, the program crashed due to memory issues (OOM). I probably had a memory leak somewhere, but with these major changes, hopefully not anymore 🤞🏼
Used to either OOM or take 20-30 mins for above. Now it's about 3 mins. Happy days 😭
[x] Re-implement using custom images for the audio visualizer. Currently it's just a pass.
Type of change
Please delete options that are not relevant.
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration.
[ ] Test A
Checklist:
Before you submit your pull request, please review the following checklist:
[ ] I have performed a self-review of my own code.
[ ] I have made corresponding changes to the documentation.
[ ] My changes generate no new warnings.
[ ] I have updated the Dockerfile with any new dependencies (if applicable).
Additional context
Add any other context about the pull request here.
Description
Improve performance. Especially with rendering the video generation.
When using PIL for everything (due to conversions and others), the iterations/sec for adding the dots in frames was ~30it/s -> 100it/s. When moving to CV2, as of now it's ~70it/s -> 200it/s. Now generating the dots is not a bottleneck 🥳
I probably should have kept track of my cProfiling as "proof" 😞
Fixes #(issue number)
I'll still need to
pass
.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:
Before you submit your pull request, please review the following checklist:
Additional context
Add any other context about the pull request here.