-
Notifications
You must be signed in to change notification settings - Fork 63
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
Visualisation of audio as a waveform #5803
Conversation
Good addition to the project. Some remarks:
|
The configuration makes sense if only the audio files should be captured but no waveform is required, e.g. chapters or sequences should not be captured.
Yes, that definitely needs to be done. Currently, there are no direct templates available. I will take a look at how other repositories handle this, or do you have a template that we can use as a reference? |
I have added the LICENSE file directly to the "lib/wavesurfer" folder. According to my understanding of this license, that should be sufficient. In the future, you could potentially consider using a JavaScript package manager for these libraries. This would require adding an additional build step for downloading the libraries. With this approach, you could easily manage the libraries and their versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found only a few minor things mainly regarding code style. Functionality is fine!
Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/partials/media-detail.xhtml
Show resolved
Hide resolved
...agement/src/main/resources/db/migration/V2_125__Add_audio_media_view_waveform_to_project.sql
Outdated
Show resolved
Hide resolved
Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js
Outdated
Show resolved
Hide resolved
Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js
Outdated
Show resolved
Hide resolved
Kitodo/src/main/webapp/WEB-INF/resources/js/media_detail_audio_waveform.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Arved Solth <[email protected]>
Co-authored-by: Arved Solth <[email protected]>
This PR adds a waveform to an audio element in the media view and includes tools for navigating within the waveform e.g. zoom, checkbox for centered cursor or forward and backward jumping.
The waveform in its default state without zoom.
This is what it looks like when something has been zoomed into the waveform.
In the project settings, the waveform must be enabled for this. This setting is only displayed if an audio folder has also been configured. By default, the waveform is disabled.
The Wavesurfer library is used for drawing the waveform. The library is well-supported and has been around for a few years. Additionally, the developer is very responsive to issues or inquiries.
During the development, I encountered the following problem, which has now also been included in the Wavesurfer FAQ.
Another potential issue in the future could be that the files become too large. However, there is an option to pre-generate the peaks of the waveform. Evaluating these pre-generated files would need to be implemented as needed and is not part of this PR.
During development, I worked with an audio file that was approximately 30 minutes long and 30 MB in size. There were no issues regarding the length of the file. Additionally, in the current implementation, the peaks are cached on the client-side for use in the metadata editor.