Given multiple sources (screen recording and cam recording) with both having audio (important!) the audio will often be out of sync. Syncing videos per audio or syncing 2 videos at all isn't the big problem to solve here but it's part of the solution.
The problem however is cutting those sources in a way that will remove the silent parts as this is cumbersome, time-consuming work.
- Sync the sources by detecting the syncing point (can be done pretty will by running
syncstart -s videoA.mkv videoB.mkv
which will return the offset. It will return something like{'videoB.mkv', 1.942120}
- Cut the offset via
ffmpeg -ss 1.942120 -i videoB.mkv -vcodec copy -acodec copy fixed_videoB.mkv
- Use
auto-editor fileName.mkv --margin 0.2sec --export premiere
to create an XML file with the cuts to be imported in DaVinci. Then, if feasible, use the exact same file and replace the filename and clip name occurences to meet with the other file - Now both files should be well-cut in davinci/premiere whatever and can still be changed. They should align
- If they don't, we can also sync them from the end and make a cut off at the end. This will ensure they can be in exact sync
- The final tool should not only combine these things and make them easily accessible (e.g. CLI) but also allow to add additional manual offset in case there was an audio/video delay (it probably just makes sense to substract/add it to
-ss
)
https://github.com/rpuntaie/syncstart