Forrest logo
back to the ffmpeg tool

ffmpeg:tldr:12821

ffmpeg: Extract the sound from a video and save it as MP3.
$ ffmpeg -i ${video-mp4} -vn ${sound}.mp3
try on your machine

This command is using FFmpeg, a popular multimedia framework, to convert a video file (.mp4) into an audio file (.mp3).

Here's a breakdown of the command:

  • ffmpeg: This is the command to invoke the FFmpeg tool.
  • -i ${video-mp4}: The -i option specifies the input file for conversion. ${video-mp4} is a placeholder for the actual name and location of the video file (e.g., input.mp4). You need to replace ${video-mp4} with the appropriate file path.
  • -vn: This option tells FFmpeg to disable video recording while performing the conversion. It ensures that only the audio stream is extracted and converted.
  • ${sound}.mp3: This is the output file name. ${sound} is a placeholder for your desired name for the output file (e.g., output). The .mp3 extension specifies the desired format of the audio file.

To use this command, you need to replace ${video-mp4} with the path to your video file and ${sound} with your desired name for the output audio file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ffmpeg tool