Extract audio data using FFMPEG

Introduction to FFmpeg

  I have introduced FFmpeg in my last blog post, explained how to download and install it, and extract video data into image data under the command line. If necessary, please check:Use FFMPEG to extract image data

Extract audio data using FFmpeg

  There are many audio formats to extract. Here we only explain the extraction of two formats: mp3 and wav. Both mp3 format and wav format are digital audio formats. The wav format is the closest to lossless music format. The mp3 format compresses certain parts by encoding the audio, thereby saving space.

  • Extract mp3 format audio from video
ffmpeg -i input.mp4 -vn -c:a libmp3lame -q:a 1 output.mp3
  • Extract wav format audio from video
ffmpeg -i input.mp4 -vn -f wav  output.wav

end

Everyone is welcome to discuss and learn in the comment area!
Station B: Silver__Wolf_
Q: 130856474

Guess you like

Origin blog.csdn.net/Silver__Wolf/article/details/131873657