Audio Video Sync Tool
AVST is a tool that syncs two videos based on their audio.
avst-sync:
- Extract audio from both videos
- Sync the audio of both videos, using cross correlation
- Pad the audios and videos to the same length considering the delay
- Save the corresponding synced audios and videos, then mux them into a single video
- [Optional] Save the synced videos stacked vertically for easier visualization
avst-sync with --reference:
- Extract audio from both videos
- Sync the audio of video2 to video1, using cross correlation
- Pad or cut video2 to match video1's start time and length
- Save the synced audio and frames of video2, then mux them into a single video
- [Optional] Stack the original video1 and synced video2 vertically for easier visualization
avst-cut:
- Pass the start and end times to cut the video
- Save the cut video
- Python >=3.11
- ffmpeg
Additional python packages are listed in the requirements.txt file.
pip install avstconda create -n avst python=3.11
conda activate avst
git clone https://github.com/fodorad/AVST
cd AVST
pip install -e .avst-sync --video1_path path/to/video1.mp4 --video2_path path/to/video2.mp4 --visualize| Video Name | Description |
|---|---|
| synced_video1.mp4 | Video 1 synced to Video 2 |
| synced_video2.mp4 | Video 2 synced to Video 1 |
| synced_session.mp4 | synced_video1.mp4 and synced_video2.mp4 stacked vertically for easier visualization |
avst-sync --video1_path path/to/video1.mp4 --video2_path path/to/video2.mp4 --reference --visualize| Video Name | Description |
|---|---|
| synced_video2.mp4 | Video 2 synced to Video 1 |
| synced_session.mp4 | Original video1.mp4 and synced_video2.mp4 stacked vertically for easier visualization |
avst-cut --input path/to/video.mp4 --start 10 --end 20 --output path/to/cut_video.mp4| Video Name | Description |
|---|---|
| cut_video.mp4 | Cut video from 10s to 20s |
- Ádám Fodor (fodorad201@gmail.com) [website]