I'd like to extract the audio from an mp4 video. Is there a software for Ubuntu, which does the job?
Asked
Active
Viewed 1e+01k times
3 Answers
64
You can use ffmpeg:
ffmpeg -i /PATH/TO/INPUT.mp4 /PATH/TO/OUTPUT.mp3
If it is not installed, you can install it with:
sudo apt install ffmpeg
You can find a help page on using ffmpeg here, by running ffmpeg --help, or man ffmpeg. On some older versions of Ubuntu it is sometimes called avconv, which is largely similar in functionality.
For the above commands you use the Terminal, which can be accessed by opening it from the dash/launcher, or by pressing Ctrl+Alt+T.
Stefan Bollmann
- 177
Wilf
- 30,832
15
If you don't want to use the terminal and you don't have any real demands to do the job, you can always use VLC player to do this, which is probably installed in your distribution.
- Open VLC player.
- From the menu bar, please select "Media" and then "Convert/Save".
- Click "Add" and select your file.
- Click "Convert/Save".
- You should then select "Audio - MP3", enter a name in the "Destination File" and then click "Start".
Your file should converted to MP3 format in no time.
-
1First of all, i don't understand why i should have to "Add" to select my file when my file is already loaded and even playing. Second, it's claiming the output file exists... but it does NOT! An mp4 file exists whereas i instructed to save as mp3! The only choices are to overwrite or keep existing file, but the latter just leads me back to the same dialog box! When I select to overwrite it claims to be converting but no file appears and then the same dialog box pops up again! – Michael Feb 15 '25 at 19:41
-
2Over ten years later, I get the same strange behaviour as @Michael does. – Teemu Leisti Jun 15 '25 at 06:37
-
-
The function is utterly useless due to the above problem. I have to use
ffmpeg. – Yan King Yin Sep 04 '25 at 16:39
11
I think that the most detailed answer with several options can be found here:
avconvwith same terminology instead. – Takkat Oct 21 '14 at 21:30ffmpeg -i in.mp4 -vn -c:a copy out.m4a-vnremoves the video andc:a copycopies the audio track over. mp3 is a different format so it would need to be re-compressed (with e.g.ffmpeg -i in.mp4 -vn -ab 250k out.mp3). – Wilf Aug 06 '15 at 18:01