4

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:

  1. 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>);
  2. Trim the video from the identified start to the identified end (that's easy).
blahdiblah
  • 33,069
  • 21
  • 98
  • 152
simpatico
  • 10,709
  • 20
  • 81
  • 126

1 Answers1

0

To trim your 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 and with -t the final duration. The -t option indicates the diference between your two absolute positions, you have to calculate it, link1 link2

Community
  • 1
  • 1
Álvaro
  • 2,872
  • 4
  • 20
  • 25