Extract audio from video with FFMPEG but not the same duration

烂漫一生 提交于 2021-02-07 04:32:04

问题


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 ?


回答1:


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


来源:https://stackoverflow.com/questions/29261283/extract-audio-from-video-with-ffmpeg-but-not-the-same-duration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!