yingfeng
The heart is as bright as a mirror. If you don't, you won't be welcomed

Using ffmpeg to extract audio from video files

Because of some reasons to extract video audio tracks, it is troublesome to find them after searching. Do you need to install a voice and shadow, a PR? Do I think so? I just extract an audio.
It suddenly occurred to me that ffmpeg can do this thing. I really can. Just as the blog has not been updated for a long time, it can be regarded as a memo.

First download ffmpeg
Github download address: https://github.com/BtbN/FFmpeg-Builds/releases

If you already have ffmpeg or some tools with it (such as JJDown), switch directly to skip this step.

Download the win64 gpl shared
After downloading, unzip the file, and cmd switches to the "bin" folder of the unzipped file

Execute the following command to extract audio

 ffmpeg -i video.mp4 -ab 320k audio.mp3

The "video. mp4" here refers to the path of the video file, the "audio. mp3" refers to the path of the output after the audio is extracted, and the "- ab 320k" option is used to specify the bit rate of the audio. If ffmpeg is not added, the audio will be extracted at 124kbps, so you will get a full loss audio quality, so you must add this option.

After waiting, the audio file will be in the output position of your command
Note that when the file path has Chinese characters, spaces, etc., it should be enclosed in double quotation marks in English.

It can be seen that the extracted audio has a code rate of 320Kbps, which is the highest code rate of mp3 format. The audio code rate of the original video is 320kbps. As for the album cover and embedded lyrics of my file, I will not talk about them. I will send another article some other day.

This article is published at: yingfeng Blog >> Using ffmpeg to extract audio from video files , please indicate the source for reprinting.

comment four

  • Nickname (required)
  • Email (required)
  • website
  1. #0

    Hello, blogger, your website is very good. Can I change a friend chain with you?

    Morning Morning 1 year ago (2023-01-07) reply
  2. #0

    Audio and video bosses taught me to use ffmpeg (dog head)

    Big Faced Cat Two years ago (2022-01-19) reply
    • I usually use these tools for Baidu and Google # Goutou

      yingfeng Two years ago (2022-01-19) reply
  3. #0

    Daily visit

    Linlin Two years ago (2022-01-09) reply