Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Extract audio from mp4

  1. #1
    Join Date
    Nov 2008
    Location
    Cape Town, South Africa
    Beans
    123
    Distro
    Ubuntu 12.04 Precise Pangolin

    Extract audio from mp4

    I have an mp4 video from which I want to extract only a part of the audio - say, from 00:05:00 to 00:07:00 - and save it as an mp3 with a bitrate of 128 kbps or less. How can I go about doing it?

    Thanks.

  2. #2
    Join Date
    Nov 2008
    Location
    Cape Town, South Africa
    Beans
    123
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Extract audio from mp4

    Hello...? I hope the information given above is enough.

    Can extraction of audio from an mp4 file be done with, for example, ffmpeg? If yes, how?

  3. #3
    Join Date
    Sep 2006
    Beans
    3,470

    Re: Extract audio from mp4

    First you may need prepare FFmpeg to enable the restricted encoders:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg

    Intrepid Ibex and above:
    Code:
    ffmpeg -ss 00:05:00:00 -t 00:02:00:00 -i input.mp4 -acodec libmp3lame -ab 128k output.mp3
    Hardy Heron:
    Code:
    ffmpeg -ss 00:05:00:00 -t 00:02:00:00 -i input.mp4 -ab 128k output.mp3
    ss: time offset from beginning of input in hh:mm:ss:frames.
    t: duration of encode
    ab: audio bitrate
    Last edited by FakeOutdoorsman; April 11th, 2009 at 10:28 PM.

  4. #4
    Join Date
    Jul 2007
    Beans
    341

    Re: Extract audio from mp4

    mplayer -quiet file.mp4 -ao pcm:fast:file=output.wav -vc dummy -vo null -channels 2 -ss 5:00 -endpos 2:00

  5. #5
    Join Date
    Nov 2007
    Beans
    5

    Re: Extract audio from mp4

    I couldn't get the ffmpeg command to work because it kept complaining that libmp3lame was an unknown encoder. However, using the mplayer command to extract a wave and then lame to encode that to an mp3 worked for me.

    Thanks to both of the posters who offered an answer.

    Leif

  6. #6
    Join Date
    Sep 2006
    Beans
    3,470

    Re: Extract audio from mp4

    Quote Originally Posted by leifw View Post
    I couldn't get the ffmpeg command to work because it kept complaining that libmp3lame was an unknown encoder.
    What version of Ubuntu are you using?

  7. #7
    Join Date
    Dec 2008
    Location
    Dublin, Ireland
    Beans
    9

    Re: Extract audio from mp4

    Keep it simple.It is a very easy process with "Sound Converter" which is available in the repository. Just drop the mp4 file(s) in the Sound Converter dialogue box and convert it in to Mp3 , ogg or AAC whatever you prefer.

  8. #8
    Join Date
    Apr 2008
    Location
    hong kong
    Beans
    219
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Extract audio from mp4

    I agee with octavianus unless you want to do a whole batch of these files. I think sound Converter will only let you rip the whole file, not just the minutes you specified.

    Another, more flexible, option is to use avidemux (in the respositories). It takes a few moments to figure out how to use it (happy to help if you have trouble), but you should be able set the start and end times (using the tool to help you visually pick the right moments in the video) and rip the audio to a file in the format of your choosing.

  9. #9
    Join Date
    Jun 2009
    Location
    Juggle-World
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Extract audio from mp4

    Quote Originally Posted by octavianus View Post
    Keep it simple.It is a very easy process with "Sound Converter" which is available in the repository. Just drop the mp4 file(s) in the Sound Converter dialogue box and convert it in to Mp3 , ogg or AAC whatever you prefer.
    +1
    Tried it and worked just fine, to get the part you want you can edit the resulting audio file in Audacity, its pretty simple.

  10. #10
    Join Date
    Jan 2007
    Location
    India
    Beans
    1,023
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Arrow Re: Extract audio from mp4

    convert to mp3 with "sound conveter"

    open it in "audacity"

    play it and deleted unwanted portions & save it as mp3
    --- I am what I am because of what we all are ----

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •