How to extract vocal from a video file

Sometimes we have a video file, and want to share it with only audio files, or just want to listen the audio of the video files, so we need…

How to extract vocal from a video file

Sometimes we have a video file, and want to share it with only audio files, or just want to listen the audio of the video files, so we need to extract the vocal from the video file.

We can use the following command to extract vocal from a video file:ffmpeg -i <inputVideoFile> -c:a libmp3lame -q:a 7 <outputFileName>

For example, I recorded a video with OBS, which is a video recording software, the description of the OBS file is like below:

Free and open source software for video recording and live streaming.

The video name is 2022–06–17 09–43–42.mkv , so I can extract the vocal of this file with the following command:ffmpeg -i 2022-06-17\ 09-43-42.mkv -c:a libmp3lame -q:a 7 output.mp3

The output file size is much smaller than the video file like below:916M Jun 17 10:31 2022-06-17 09-43-42.mkv
14M Jun 22 06:07 output.mp3

Parameter explanation

  • -i <inputVideoFile> : The input file name.
  • -c:a libmp3lame : The audio is mp3 encoding.
  • -q:a 7 : This is the alias of -qscale:a , there are some detail on this page FFmpeg MP3 Encoding Guide

Hope this article give you some help if you also want to extract vocal from a video file like me. Thanks for your reading!