Remove or Extract Audio From a Video With FFmpeg
It turns out removing the audio from a video is very easy with FFmpeg!
To remove the audio from a video:
ffmpeg -i video.mp4 -c:v copy -an out.mp4
-an option will completely remove the audio from a video, and since we're just copying the video codec as is, this most likely will only take seconds.
To extract the audio from a video:
ffmpeg -i video.mp4 -vn audio.wav
As you might have guessed, the
-vn option will remove the video stream from the output, leaving only the audio. In this case, I'm re-encoding the audio as WAV, as that is a very good encoding to work with in terms of further processing.
Did you find this information useful? If so, consider heading over to my donation page and drop me some support.
Want to ask a question or just chat? Contact me here