2

My problem is that i need to extract with FFMPEG the audio contained in a video with the same duration. But for some files that i tested, the audio's duration is sometimes shorter than the video's duration. I need to have the exact same duration between the audio and the video file.

The command that i have already tried is this following:

ffmpeg -i input_video.mp4 output_audio.wav

How can i fix this with options in my command ?

Thomas Melcer
  • 163
  • 2
  • 13

1 Answers1

5

I found the solution. To get an audio extract with the exact same length. I use the option -async 1 like this:

ffmpeg -i input_video.mp4 -async 1 output_audio.wav
Thomas Melcer
  • 163
  • 2
  • 13
  • 2
    I tried this option but I still see duration does not match. The gap closed but there is still difference. Any suggestions? – Cihad Turhan Mar 13 '21 at 18:11