How to extract the sound from videos in FLV or MP4 formats, such as videos downloaded from YouTube or other video sharing sites

Have you ever needed to extract the sound file from a downloaded video, such as videos from YouTube or other video sharing sites? In this post I will show how to separate the audio track from a video file (a process also known as “demuxing”).

Of late it seems that there is an increased interest in how to do this, which might have something to do with YouTube becoming the go-to destination for many people who want to look up music. Also, many download-from-YouTube programs are now adding the option to save straight to MP3.

Demux FLV and MP4 videos illustration

Two sets of instructions will be presented for video files in FLV or MP4 formats, which are typically used in video sharing sites. Note that the tools covered here can also demux AVI, MOV and TS formats as well.

Some background info:

  • This tutorial in two sections: (1) FLV videos, and (2) MP4 videos. FLV and MP4 are the two formats typically used by the majority of video sharing sites (e.g. normal YouTube vids are in FLV format, while HD YouTube vids are MP4s). Also note that M4V, MOV, and AVI formats can be demuxed using the same procedure as MP4s.
  • Local files: I am assuming that your video is already downloaded to your hard drive.
  • Video formats: This process does not work on FLV videos downloaded from Hulu. Although in fact the idea for this posting came after someone who read my “How to download from Hulu” article enquired about demuxing downloaded Hulu FLVs. See the bottom of this posting for more on my experience trying to demux Hulu videos.
  • Downloading from video sharing sites: three of my favorites are TubeMaster++, xVideoServiceThief, and StreamTransport. These three present varying abilities to download both regular and encrypted videos. TubeMaster++ and xVideoThief can save the audio component separately from the get go, while StreamTransport is able to download from Hulu.
  • Changing the audio format: if your resulting audio file is not in an audio format that you want, you can convert it to another format using any of the following apps: BonkEnc, Any Audio Converter, or MediaCoder Audio Edition.
  • Increasing the volume: for the resulting audio file, can be done using a freeware program called MP3Gain.

(1) FLV format

The software used to do this is called ExtractFLV. This free program unpacks your video and audio tracks without re-encoding them, which means it is superfast and does not alter the original sound track.

FLV Extract ScreenshotStep#1: visit this site and download FLV Extract, then unzip. (Go here for a review of ExtractFLV previously published on Freewaregenius).

Step#2: run FLVExtract.exe; in the dialog, uncheck “Video” and “Timecodes” but keep “Audio” checked. (Note: if you would also like to extract the video component as its own seperate file, keep the “Video” box checked”)

FLV Extract Drag and DropStep#3: drag and drop you file or files to the FLVExtract dialog (see screenshot to the right).

You can drag files in batch if you like, and the program will process them serially.

Step#4: once processed, the audio files will appear in the same directory (typically in MP3 or AAC formats). The format of the audio depends on how the sound was FLV Extract operation completeencoded before it was packed into the FLV container; FLVExtract does not re-encode the audio but simply unpacks the audio file from the FLV container.If you would like to convert the sound file to a different audio format, see the “more notes” section below for some freeware conversion options.

 

(2) MP4 format

The software used to do this is called Yamb. It will extract the sound from MP4, M4V, AVI, and MOV file formats.

Step#1: you will need to download two files; visit this site and download the latest version of MP4Box and this site and download the latest version of Yamb. Unzip both folders to an appropriate location.

Step#2: if your video is in M4V format rename the extension to MP4.

Step#3: run Yamb.exe. Select “settings” from the left pane and click on the entry that appears: “Advanced Settings for Yamb and tools used by this GUI etc..”. In the new screen click on MP4Box in the left pane then point the “Location” field to the MP4Box executable you extracted in step1. For “Temp dir” you can simply point it to any directory of your choice or leave it blank. Click “next” when you’re done.

Yamb Screenshot1-AYamb Screenshot1-B

Step#4: click “editing” in the left pane, then in the right pane choose “click to extract streams from AVI/MP4/MOV/TS files.

Step#5: click on the folder icon to the right of the input field to select your video, select the audio track from the list underneath (typically the second one and typically in AAC format), then click the “Extract to MP4″ radio button. Finally, change the output folder if you like then click next; the demuxing process will start and after a few seconds you’re done.

Yamb Screenshot2-AAYamb Screenshot2-B

That’s it You’re done. If you want to convert the resulting file to another audio format or increase the volume, see the last bullet point in “some background info” above for a list of free software that can help you do this.

Demuxing FLV’s downloaded from Hulu – please share your experience.

I tried in vain to demux FLV videos downloaded from Hulu. I would appreciate your input if you were able to do it successfully.

  • I downloaded a video from Hulu using StreamTransport, and added keyframe objects using FLVMDIGUI (as outlined here).
  • ExtractFLV fails to recognize or extract the audio or video tracks.
  • Surprisingly, neither Avidemux nor Movica would demux the video.
  • I tried Gspot to get some info on the audio encoding used, without success.
  • MediaInfo ScreenshotNext I used MediaInfo, which showed that the audio format was AAC version 4 LC (see screenshot to the right).
  • More research lead me to AVInaptic, which seemed to extract the audio file. Instead of RAW format, I manually entered AAC for the file extension, but the file still would not play in any media player.
  • I loaded the file into Audacity. It seemed that the audio was accelerated, yet my attempts to slow it down failed to render anything that sounded coherent.
  • That’s when I gave up. Except I had a feeling that I may have made this too complicated, and that perhaps there was a much simpler approach that I totally missed.

 
 
 
Samer Kurdi

Samer Kurdi

Has been reviewing software since 2006 when he started Freewaregenius.com
flattr this!
  • Anupam

    Interesting article. By xVideoThief, I think you mean xVideoServiceThief, which is available on Sourceforge.net. xVideoThief is a commercial software, and so I think names should be corrected to avoid confusion. I tried xVideoServiceThief, and found it to be good. Thanks for the suggestion.

    For metadata injecting, Any Flv Player can also be used. Besides playing flv, the player can also inject metadata into the flv files. I have tried it before. Although, for playing of flv files, I use FlvPlayer4Free.

    I cannot access Hulu, because I am in India. But, I can suggest two software for extracting audio out of the video. You can give it a try, and see if it works.
    They are Pazera Audio Extractor : http://www.pazera-software.com/products/audio-extractor/
    and
    AoA Audio Extractor Free : http://www.aoamedia.com/audioextractor.htm

    Both are free. I have used both, and have had success using both the software in extracting audio out of video files.

    Thanks.

  • Hitesh Chavda

    Hey you should try ffmpeg

    ffmpeg is command line but you need one following command,
    convert -i input_file.flv output_file.mp3 <– for flv format

    just chang extensions

  • meisnate12

    for mp4 and the others like it all i do is drag it into any audio converter and it coverts the audio to whatever i want it to

  • Dave

    Format Factory can extract the audio. Just select ‘All to MP3′ and drop the file into it. Done. And it’s freeware

  • bigjohnny

    For batch extraction of MP3s from FLV/MP4, etc. try WinFF from http://winff.org It is a nice simplified GUI for FFMPEG, which save you from typing stuff in a command prompt

  • Samer

    Thanks guys for some great suggestions. I have yet to test these with Hulu-downloaded FLVs (although am not optimistic).
    @Anupam: yes I meant xVideoServiceThief, I changed the text, thanks for pointing it out!

  • Anupam

    You are welcome Samer :).

    Yes, some nice suggestions there in the comments.

    FormatFactory as suggested by Dave, also has the option to extract audio from videos, so it might work too. Its a great piece of software, with many options.

    Some audio converters also have that option I think. I am not sure though, I don’t have one installed at the moment. “Any Audio Converter” is good.

  • http://www.sevensheaven.nl Sevensheaven

    Pazera free audio extractor is the best freeware tool for this purpose I have discovered so far.

  • Toni

    I am outside the U.S. so I can’t access Hulu. But probably the simplest workaround is to record the audiostream while playing a video. I did this on other websites with Audacity. Just press the record button in Audacity while playing back the video. That’s all. If necessary you can easily trim the beginning and the end of the recording. You can save the result as mp3, wav, or ogg.

  • Doug Quitanen

    An even easier approach, if you’re using YouTube:

    http://www.dirpy.com will strip out the audio, tag it, and let you download a high-bitrate MP3. There’s even a bookmarklet.

  • ken

    Ditto for dave on Format Facrtory. An amazing free conversion tool. It cannot perform all your video whims, but it can do most of them!

  • Brandon

    i use goldwave, it’s shareware but it gets the job done.

  • Todd Bissell

    RE: http://www.dirpy.com “High-bitrate” = 128.
    :-|
    //TB

  • Anupam

    So Samer, did any of the software suggestions mentioned in the comment worked? We are waiting to hear from you :).

  • Pingback: Some FREE Software Which is Very Useful « On the Road Again…

  • Pingback: Some FREE Software Which is Very Useful « On the Road Again…

  • Pingback: fritz freiheit.com blog » Link dump

  • Pingback: Extract the sound from videos in FLV or MP4 formats, such as videos downloaded from YouTube or other video sharing sites

  • Bill

    Great article. If you want to go straight from youtube to mp3, check out http://www.video2mp3.net/

  • Pingback: ?????????????? YouTube?

  • Pingback: Quisple: find and play any song from your desktop (via YouTube) - hypershare.info

  • mavrtrr

    takeyoutube.com – download video from youtube!

  • http://takeyoutube.com mavrtrr

    What to download video from a site youtube I use service takeyoutube.com

  • sprinter

    Yamb or rather MP4box doesn’t seem to be able to demux many MP4 files. I use MKVmerge -> MKVextract to demux these instead.

    I also use AVIdemux to remux H264/AAC i.e. youtube flash video to MKV or MP4. MKV can be demuxed with MKVextract or TSmuxer.

  • SIM

    there no good solution to extract ORIGINAL audio from mp4 FILE
    (like what FLVExtract is doing for flv file)
    AoA audio extractor is not a solution
    it is not extracting the original file

  • niels

    a lot of people left comments saying: “I just use Format Factory or xyz converter, and it does it very easily:

    What you either don’t realize or fail to mention is the fact that those converter tools re-encode the audio, leading to substantial quality loss.

    The author of this Blog went to the trouble of writing this up to help you get your audio without butchering it any further than the respective YouTube uploader already has.

    If you use Format Factory on YouTube content, you can expect that you’re doing the 3rd lossy encoding of this audio, which leads to ugly things that sound like baby hickups at worst, but always turns it into a digital soup sound if you have half way decent speakers at your house.

    Sure, if you listen to it over a set of crummy computer speakers, where the subwoofer cranks out a surprisingly wobbly bass that drowns out any detail up to the mids, you might be fine with triple-encoded files.

    But even on (relatively) cheap Sony in-ear headphones, I can hear the encoding artifacts long before it reaches the strength to give you that MP3 warbling everybody has probably heard at one time or another.

  • Beval

    Hi, folks. Thanks for your article.
    If you want to rip audio from MP4, YouTube videos, and any video that are streamed on the internet and save it as audio files, you could search for a streaming audio recorder or an audio capture.

  • Mercy

    Hi, folks. Thanks for your article.
    If you want to rip audio from MP4, YouTube videos, and any video that are streamed on the internet and save it as audio files, you could search for a streaming audio recorder or an audio capture.
    http://www.recordstreamingaudio.org/rip-audio-from-mp4.html

  • Lucy

    i use on firefox add on download helper it’s easy to download youtube music and also rel player

  • http://www.youtubemp3download.net Youtube Converter

    Here’s a quick one for high bitrate YouTube to mp3 or mp4 conversion: Youtube Mp3 Download

  • Rafal

    It worked great. thank you!

  • BlackFireNova

    With regard to the above article, the MP4Box download link seems to be gone, however I found it here: http://www.digital-digest.com/software/download.php?sid=1487&ssid=0&did=3 You may want to fix up the link in that article.

  • Pingback: RN modulation levels compared « FM DXing

  • Laxman1454

    Nice one….

  • http://owlsheadservices.com KJ

    Many thanks, worked like a champ to extract audio from my client’s video (yamb/mp4box). I needed to reduce the noise and wanted to use audacity. Good to know for the future!

  • default

    If you’ve got the (latest) Sony SoundForge this is very simple: open the MP4 video file… :D

7