Ubuntu – How to convert audio from MP4 or FLV video files to mp3

.mp4convertflvmediamp3

Is there an application that allows me to extract the audio from a MP4 or FLV video file and store it as an MP3 file for use in a portable media player?

Best Answer

You can do the same in 12.04 by using several software.

Using WinFF

  1. Install winff and libavcodec-extra first

     sudo apt-get install winff libavcodec-extra
    
  2. Open Winff from dash

    enter image description here

  3. Then in Winff window, do these

    1. Add file

    2. Select what catagory to convert (select Audio)

    3. Select Audio file format (mp3)

    4. Type the output folder for converted file

    enter image description here

    1. Then click the Convert button. You can also click Options button to file tune the audio format and other options.

    enter image description here

    enter image description here

Using VLC

  1. Install VLC and "libavcodec-extra" package first

    sudo apt-get install vlc libavcodec-extra
    
  2. Open VLC from dash by pressing Super key and typing "VLC" there

    enter image description here

  3. Then from top panel menu, Select MediaConvert/Save.

    enter image description here

  4. Then Add file to convert in the new window. Then click Convert button.

    enter image description here

  5. In the new window, Select the directory for output file, select the conversion profile (Audio mp3) and click Start button.

    enter image description here

Using command line

  1. First install the tools

    sudo apt-get install ffmpeg libavcodec-extra libav-tools
    

    If you are using

  2. Use this simple command to extract the audio file

    avconv -i /input-file-name-with-path output-filename.mp3
    

    For example to convert the "How fast.ogg" video file into how-fast.mp3 use this command:

    avconv -i /usr/share/example-content/Ubuntu_Free_Culture_Showcase/How\ fast.ogg how-fast.mp3
    

    See the manual page for more options and information.

To Just extract audio

Check these answer