How to extract the part of the video corresponding to this sound clip?

I have a video clip and an audio clip extracted from it. How can I crop a video clip to the part extracted in the audio clip?

I assume that the solution will consist of:

  • Automatically identify a pair of the starting position of the audio clip in the video clip and the ending position (for example, <03: 05.09: 55>);
  • Trim the video from the identified beginning to the identified end (which is easy).
+4
source share
1 answer

To crop a video, you can use ffmpeg:

ffmpeg -i input.mp4 -ss 30 -t 90 -acodec copy -vcodec copy output.mp4 

With -ss, you mark your start with -t and the final duration. The -t option indicates the difference between your two absolute positions, you must calculate it, link1 link2

0
source

Source: https://habr.com/ru/post/1391742/


All Articles