I have a video clip, and an audio clip extracted from it. How can I trim the the video clip to to the portion extracted in the audio clip?
I imagine the solution will consist of:
- Automatically identify the pair of start position of the audio clip in the video clip, and the end position (e.g. <03:05,09:55>);
- Trim the video from the identified start to the identified end (that's easy).
To trim your video you can use ffmpeg:
With -ss you mark your start and with -t the final duration. The -t option indicates the diference between your two absolute positions, you have to calculate it, link1 link2