Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cjsimmons0

macrumors newbie
Feb 19, 2012
1
0
Found fix

If you are looking to extract the audio from a mp4, just use ffmpegX to convert the mp4 into a FLV file. Once you have converted, use the program iExtractMP3 to convert to mp3. Works well and is VERY fast!
 

justytylor

macrumors newbie
Sep 9, 2002
24
0
Washington, DC
Solution: Extract audio from mp4

Okay: I'm assuming you have access to QuickTime Pro 7 (where the Command-J command works).

You will open the movie in QTPro 7.

Type Command-J (or choose "View -> Show Movie Properties").

The top pane of that window will have all the resources within the .mp4 file listed. You'll have a Video track and a sound track. Click on the sound track.

Click the "Extract" button. This will open just the sound track in a new QuickTime document window.

Choose "Export..." from the File menu.

In the Export dialog box, in the Export: pull down menu, choose "Movie to MPEG-4". Click the "Options..." button next to that pull-down menu.

In the next window, choose the "Audio" tab."

In the "Audio Format:" pull-down menu, choose "pass-through".

Click "OK" to commit that change and exit this dialog box.

Name your file, click "Save" and you'll have exactly what you want: an audio-only .mp4 file with no reencoding.
 

bleater

macrumors newbie
Jul 19, 2008
6
1
Okay: I'm assuming you have access to QuickTime Pro 7 (where the Command-J command works).

You will open the movie in QTPro 7.

Type Command-J (or choose "View -> Show Movie Properties").

The top pane of that window will have all the resources within the .mp4 file listed. You'll have a Video track and a sound track. Click on the sound track.

Click the "Extract" button. This will open just the sound track in a new QuickTime document window.

Choose "Export..." from the File menu.

In the Export dialog box, in the Export: pull down menu, choose "Movie to MPEG-4". Click the "Options..." button next to that pull-down menu.

In the next window, choose the "Audio" tab."

In the "Audio Format:" pull-down menu, choose "pass-through".

Click "OK" to commit that change and exit this dialog box.

Name your file, click "Save" and you'll have exactly what you want: an audio-only .mp4 file with no reencoding.

I can confirm that this is the best way to achieve the desired result of extracting AAC audio from an MP4 file without re-encoding it and using only Apple-provided tools.

I would add only one more thing, which is when saving the file, give it the .m4a extension (or rename it with this extension once exported). That way, iTunes will correctly list it as "AAC audio file" rather than "MP4 video file" (even though it has no video track).
 

CJYetman

macrumors newbie
Nov 13, 2002
17
0
great ideas.... thanks. but couldn't you just extract directly from the video file? another words, skip to the "Choose "Export.."" step and just make sure in the Options that on the "Video" tab you have the video format set to "none"?

I think that would do the same thing and make this a bit less complicated.
-cj


Okay: I'm assuming you have access to QuickTime Pro 7 (where the Command-J command works).

You will open the movie in QTPro 7.

Type Command-J (or choose "View -> Show Movie Properties").

The top pane of that window will have all the resources within the .mp4 file listed. You'll have a Video track and a sound track. Click on the sound track.

Click the "Extract" button. This will open just the sound track in a new QuickTime document window.

Choose "Export..." from the File menu.

In the Export dialog box, in the Export: pull down menu, choose "Movie to MPEG-4". Click the "Options..." button next to that pull-down menu.

In the next window, choose the "Audio" tab."

In the "Audio Format:" pull-down menu, choose "pass-through".

Click "OK" to commit that change and exit this dialog box.

Name your file, click "Save" and you'll have exactly what you want: an audio-only .mp4 file with no reencoding.
 

SkwidSpawn

macrumors newbie
Jan 28, 2010
1
0
Here's how it worked for me

Here's how it worked for me under Mountain Lion, for anyone who finds this on Google and simply wants to pull the audio out of a movie file:

Open the file in Quicktime Player, then go to:
File->Export… (or hit command-shift-S)
Screen%20Shot%202012-08-10%20at%2010.55.18%20AM.png


Then select "Audio Only" from the Format drop-down:
Screen%20Shot%202012-08-10%20at%2010.55.39%20AM.png


Then Save it:
Screen%20Shot%202012-08-10%20at%2010.55.46%20AM.png


It appears to work as a pass-through rip, and I don't know if it works on every file, but it worked a charm on this one, pulling out 256kb/s aac audio.
 

smaghe

macrumors newbie
Dec 9, 2012
1
0
Extract audio from multiple mp4

Hi everybody,

Thanks to the previous messages I was able to succeed in splitting the audio from the video.
However, I needed to automate the steps, as I had a lot of videos to split.

Here's the script that I wrote :

#!/bin/bash
for f in *.mp4; do
./ffmpeg -i "$f" -vn -acodec copy "${f%.mp4}.m4a"
done


For people who aren't so much into scripts, open Terminal, type "Nano"
Paste the script. Type Ctrl + X to close the editor, a prompt asking what to do will appear, save the file with ".sh" suffix.
Assuming you saved it in a convenient folder, navigate to the directory where the script is with the terminal. For example, script being in the Resources folder (mentioned in page 2), type :
cd Desktop/Resources/
Being in the folder, where your script and videos are, you then have to make the script executable; type :
chmod u+x nameofscript.sh
Then you just have to run the script in the same folder of the videos, to do so type :
./nameofthescript.sh


Thanks for the help that you gave me.
Cheers.


Stas
 

Elias Hedberg

macrumors newbie
Jun 12, 2013
1
0
No, FCP.guru.guy, you really don't get what Canubis is trying to do.

Canubis, here's how I do what you're describing:
1. Get Rogue Amoeba's Fission
http://rogueamoeba.com/fission/
2. Open the movie file with Fission
3. Go to File > Save Audio and you will be able to save the audio track losslessly

Small update to halfthelaw’s post: with the latest version of Fission (2+) there is no "Save Audio" option, just use "Save as…" and it will save the audio separately and, as far as I can tell, without doing any recompression (hence it should be the original aac track).
 

berthaconners

macrumors member
May 20, 2014
86
3
Without using any software:

Upload the videos to youtube.
Copy and paste the URL for the youtube page into youtube-mp3 converter.
You now have audio track.

I know that that is quite a process, but it works, and you dont have to install anything to your computer.
 

512ke

macrumors 6502a
Sep 10, 2003
577
186
Sorry if somebody else already suggested it, but I use

AUDACITY

The Swiss Army knife of audio. You can drag just about anything into audacity including videos, and it will extract the audio. Then you just export it in any format you need.

The great benefit is that you can use the filters, for instance AMPLIFY to make sure your audio is at uniform and maximum sound-good level.
 

newyorknight

macrumors newbie
Feb 26, 2008
7
0
OP's original question is still not answered!

Wow, I can't believe that this question is still not answered, years ago.

And the question is simple: how do you extract the audio file from a .mp4 video file without any loss? Logically, the audio file should be much smaller than the video. Has anyone found a method?

I have tried the following methods:
1) opened the .mp4 video in Audacity and then exported out as AIFF.
2) opened the .mp4 video in Quicktime (not Pro) and exported out as AIFF.
3) opened the .mp4 video in VLC. Then Convert/Stream to WAV.

All resulted in huge files, much larger than the .mp4 video, about 3 times the size of the video file. That makes no sense to me.

Further, and importantly: the .mp4 video plays better and louder than the WAV or AIFF, suggesting loss of audio. Problem. Greater file size for lesser quality? There must be a better way.

Has anyone found a way to simply extract the audio only from a .mp4 video?

Thanks!
 
Last edited:

newyorknight

macrumors newbie
Feb 26, 2008
7
0
Which file format in the dropdown under extract audio?

Keith, thank you for those instructions.
However, it is not exactly consistent with the latest version of MPEG Streamclip, 1.9.2 and 1.9.3b8.

There is an option to File/Export Audio.

From there, you have dropdowns of choices of AIFF, or MP4 AAC at 256kbps.

Which one should I pick?

I am guessing the AAC format since the video format in mp4 does not contain HQ audio anyway. At least not AIFF level quality.
The downside is that AAC is really an Apple format and I would rather have AIFF.

So is there any way to extract a lossless audio file from a (for example, youtube) video?

Many thanks
 

KeithPratt

macrumors 6502a
Mar 6, 2007
804
3
Keith, thank you for those instructions.
However, it is not exactly consistent with the latest version of MPEG Streamclip, 1.9.2 and 1.9.3b8.

There is an option to File/Export Audio.

Are you following the instructions precisely? File > Save Track > Save Audio Track?

I haven't used MPEG Streamclip (1.9.3b8) since my Snow Leopard days, but that would save the audio portion to an MP4 file without re-encoding.
 

patent10021

macrumors 68040
Apr 23, 2004
3,505
794
I've found that I can simply click "Export as Audio" in QTX and it does the job. However the audio ends up much quieter than the source. For example when I import the movie and the exported audio file into Logic X the source has nice waveforms and the exported waveform is barely visible. Maybe it's because QTX is exporting to m4a and doesn't allow for export options like QTP7?
 

newyorknight

macrumors newbie
Feb 26, 2008
7
0
Keith, ok. I see it now. Interesting. I wonder how this is different from the export audio function.

So, ultimately, if the video doesn't have a lossless, AIFF quality audio segment, then this is the best we can do, is that right?

Thanks!
 
Last edited:

MikB

macrumors member
Jan 18, 2013
52
12
Are you following the instructions precisely? File > Save Track > Save Audio Track?

I haven't used MPEG Streamclip (1.9.3b8) since my Snow Leopard days, but that would save the audio portion to an MP4 file without re-encoding.

It works exactly the same already in Quicktime Player in OS X 10.11 El Capitan.
  1. Open the video file in Quicktime Player of El Capitan
  2. Go to the Archive menu and select Export > Audio Only
  3. Save the file
The resulting file will get an .m4a extension and be smaller than the original and will have the same quality.

In fact this can be proven if you take the two files and rename the mp4 with an m4a extension and open the files in an audio editor like OcenAudio, where if you invert one of the files and mix both together they will cancel out to silence.

In OcenAudio this is done by selecting
  1. Go to one of the files
  2. Select all and copy
  3. Move to the other file
  4. Select Paste Special
  5. Choose Overlap (Mix) and make sure you check "invert" on each channel
 
Last edited:
  • Like
Reactions: phrehdd

phrehdd

macrumors 601
Oct 25, 2008
4,311
1,311
Try TSmuxer for Mac (if you can find it). Add the file, select "demux" and let it run. Then go play with the audio file created.
 

MikB

macrumors member
Jan 18, 2013
52
12
Try TSmuxer for Mac (if you can find it). Add the file, select "demux" and let it run. Then go play with the audio file created.

Doing what you suggest creates an .aac file that doesn't open in iTunes not even if you change the file extension to .m4a.
 
Last edited:

phrehdd

macrumors 601
Oct 25, 2008
4,311
1,311
I am sorry it doesn't seem to work for me either. However, I did manage to try an MP4 with Quicktime and EXPORT only the audio. It played back fine. Again, my apologies about TSmuxer. I have used it in the past but alas, things change.
 
  • Like
Reactions: MikB
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.