-
Notifications
You must be signed in to change notification settings - Fork 514
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
Improve Waveform generation (speed etc.) #2035
Labels
💡 enhancement
This issue describes an improvement, enhancement, or feature request for OpenShot
Comments
This was referenced Aug 26, 2018
DylanC
added
the
💡 enhancement
This issue describes an improvement, enhancement, or feature request for OpenShot
label
Aug 27, 2018
Did this get implemented? |
[incomplete feature] E.g. you have sound (100%)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
💡 enhancement
This issue describes an improvement, enhancement, or feature request for OpenShot
This issue exists to track the suggestions made in the comments of #2029;
Especially This comment:
I've dug quite a lot through the the code in the QT app (js, py), libopenshot (C++) and libopenshot-audio to see whether I could also improve the generation of the audio samples in their reduced form.
One thing I wanted to address is the
samples_per_second
constant, that is stored in two places (py and js).I would have that constant transmitted together with the data in the JSON.
Also, the waveform data is based on Max-Values (see libopenshot-audio: AuidoSampleBuffer/getMagnitude)
That library also provides RMS values (Mean) which aren't exposed by the libopenshot Frame.
I learned that it is pretty useful to see visually both max peaks and average values, therefore I would propose to also expose this in libopenshot and rewrite the get_waveform python to provide both max and average values
While doing all this, I would also suggest to consistently use
waveform_data
as a name and notaudio_data
to make obvious this has a reduced sample rate.One of the most confusing features imo is that the audio waveform contains the volumes animated on the clip; but only if they exist while the rendering is triggered.
All together, I would suggest to change the waveform JSON data to be changed to something like this:
Which also isn't influenced by the volume values.
They should instead be rendered separately eg. as a red line on top of the waveform.
I wasn't able to implement these changes because of the dependency on the library and because I do not have a development setup right now (literally just edited the files in the installation folder).
Maybe someone of you guys can implement these changes (they should be pretty simple if you have a dev setup)
Other considerations
For speed improvements it also would make a lot of sense in my opinion, to move the generation of the waveform data completely to C++.
It should be integrated with the Clip class and also be cached, I think
I've created another issue for this on the libopenshot-repo:
OpenShot/libopenshot#156
The text was updated successfully, but these errors were encountered: