How to Extract Audio From Video in Ubuntu and Other Linux Distributions

Want to convert video to MP3? Here are several ways to extract audio from videos in Ubuntu and other Linux distributions.
Warp Terminal

In a recent article, you saw the best ways to download YouTube videos in Ubuntu. In a similar post, youโ€™ll see how to extract audio from a video file in Ubuntu and other Linux distributions.

There are several tools you can use to for this. Converting video to MP3 or other audio format is a simple task in Linux.

Iโ€™ll show you three methods in this tutorial:

  • Extract audio from video using VLC media player [GUI method]
  • Extract audio using โ€œ4K Video to MP3โ€ tool [non-FOSS GUI tool]
  • Extract audio using ffmpeg [command line tool]

Method 1: Extract audio from video using VLC Media Player

If you use Linux as a daily driver, youโ€™re quite likely to have VLC Media Player installed.

VLC can do a lot of things other than playing videos. You can download subtitlessynchronize subtitles and what not. One of the cool VLC tips is to convert videos to audio.

Click on Convert/Save in the Media drop down menu or use the ctrl + R shortcut.

convert video to audio using vlc

Click on the Add button and select the desired video file, then choose the Convert/Save button to proceed to the next step.

extract audio from video using VLC

Here, choose the desired audio format by selecting the appropriate Profile option.

Set the destination for the extracted audio to be saved and as the default format for saving converted videos is .mp4, make sure the file extension matches the selected profile.

extract audio from video using VLC

Click Start to start the extraction.

Method 2: Using โ€œ4K Video to MP3โ€ tool [Not open source]

Since the source code for this tool is not available and it is only available as a .deb file, it can only be installed on Debian/Ubuntu or Linux distributions based off them like Elementary OS, Zorin OS, KDE Neon, Linux Mint and MX Linux.

4K Video to MP3 is only available for 64 bit systems, so if youโ€™re not sure, you should check whether your system is 32 bit or 64 bit.

Once downloaded, double click on it to install. For faster installation, I would recommend to use gdebi as your default installer instead of Ubuntu Software Center.

Once, 4K Video to MP3 is successfully installed, launch 4K Video to MP3 from the application menu.

When you select the Add Video option, the audio is extracted and the audio file is saved in a preconfigured location (~/Music/4K\ Video\ to\ MP3/). If you want to save it in a custom location, first click the Preferences option.

convert video to mp3 in Linux

In Preferences, you can choose the desired audio format, quality and destination folder.

convert video to mp3 in Linux

Once youโ€™ve set the required settings, click on the Add Video button, choose the source video and wait for the conversion to complete.

Method 3: Extract audio from video using ffmpeg command line tool

Almost anything can be done on the terminal and most of the time, it requires just one command. In this case, ffmpeg can be used, which is a command line tool which can extract audio fromo the desired video with just one command.

To install ffmpeg on Ubuntu and Debian based distributions, run:

sudo apt install ffmpeg

To extract audio from an input video file using ffmpeg, use:

ffmpeg -i input-video-file output-audio-file

Replace <input-video> and <output-audio> with the corresponding paths along with appropriate file extensions.

Extracting audio from video using ffmpeg

There are a lot of other options to extract audio from a video file in Linux, including Sound Converter, which is fairly simple to use and is available for all Linux Distributions as its tarball can be downloaded.

If you want to experiment with audio-video further, I suggest reading on how to record streaming audio in Ubuntu.

How to Record Streaming Audio in Ubuntu Linux
Learn to record voice-over or audio from any streaming music source in Ubuntu using these nifty tools.

I hope you find this tutorial helpful. Stay tuned for more such articles. If you have questions or suggestions, feel free to leave a comment.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! Youโ€™ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.