This small application creates a sound wave and superimposes it on each frame of a video.
Check a small description of its inner workings in its original post.
- ffmpeg to handle video encoding/decoding
- opencv to create the visuals (waves)
- scipy to get the spectral information of the audio
- numpy to handle the data
- Matplotlib is not really needed, but shows the intermediate data, if you want to know what's happening behind scenes.
from VideoWave import Waver
wave_clip = Waver("clip.mp4")
wave_clip.export("new_clip.mp4")
And that's it. You have now a new clip with audio waves on top of the image looking like this:
You can install the latest version of VideoWave directly from the repository using git
and pip
:
git clone https://github.com/Mayitzin/VideoWave.git
cd VideoWave
pip install .