Ubuntu – How to extract audio from video ?? (Not converting video into audio file ???)


It sounds strange to ask this question as it has been asked before. However the answers only refer to converting video files into audio files.
I would like to get into the container and separate the video file from the audio file and only keep the audio file. Simple conversion of the container to the audio file, makes the file way to big, and containing more info than I need.
Converting the whole container file (avi, mpg, wav…..) etc is easy enough but that does not do the trick.
Preferably I would like to do this without using the terminal. Working with the latest version of Ubuntu at this moment (march 2014). Also please do not suggest any cross platform ideas. I run my computer on only Ubuntu, there is nothing left of any other OS.

H.W. Roos

Best Answer

  • You can use avidemux.

    Install it command line with:

    sudo apt-get install avidemux

    You can rip the audio from the video file.

    In the toolbar, click on the top left folder icon and load the video file from your computer.

    enter image description here

    Click on the Audio option on the left side panel and choose the audio codec you want to use

    Now, click on the “Audio” option in the menu bar and select “Save” to save the audio

    enter image description here

    If you prefer a CLI give ffmpeg a try

    ffmpeg -i input_file -vn -acodec CODEC output_file

    CODEC= libmp3lame if output .mp3

    CODEC= libvorbis if output .ogg


    ffmpeg -i ~/Desktop/video.mp4 -vn -acodec libmp3lame audio.mp3

    In case you don't have ffmpeg installed:

    sudo apt-get install ffmpeg