Best way to extract AAC from mp4 losslessly
Subject says it all. I have an mp4 file I'd like to get the audio out of (details below if you want to know), and every method I've seen suggested either produces a junk file, re-encodes it with loss in quality (noticeable), or re-encodes it at 64kbps (which is disgusting for music, frankly). Not looking for anything more than an audio rip. Tips, anyone?
EDIT: Just obtained Avidemux and am attempting with it. Have a feeling it's doable, but frankly, I've never used the program and have no clue how to work it. If that'd do it, tips there would work too! And now for a second edit, after looking into it, seems in the newer versions of avidemux, that feature is broken. Ah well. File info: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Andrea .mp4': Duration: 00:03:30.28, start: 0.000000, bitrate: 4157 kb/s Stream #0.0(und): Video: h264, yuv420p, 1920x942 [PAR 1:1 DAR 320:157], 4024 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 128 kb/s |
this seems to cover it...
http://www.linuxquestions.org/questi...format-834464/ Hope this helps, Glenn |
Not quite, unfortunately. Worth note is that I'm not trying to produce a flac, which produces a 22.4MB file for 3.2MB of data. I'm just trying to get the AAC stream -out-, really. Already tried with ffmpeg (can produce an Mp3 at 64kbps, but can't produce a usable file of any other type, nor any other bitrate without attempting a lossy transcode) and mplayer (produces junk files). As mentioned above, I also attempted Avidemux, only to find out that feature is very nicely broken in the current release. I did try mencoder, but if there's a way to manage what I'm attempting using it, I have a feeling I'm approaching it from the wrong angle. All I managed with it was a wav, which suffered the same issue as the flac file did.
The quality of audio is already somewhat impaired in the file I'm working with, and any loss of quality from transcoding beyond the current state is -very- noticeable. Thanks for the response though! I'm going to keep fiddling with these and see if I can come up with something that works, but if you or anyone else has any suggestions, please, feel free to share, I'm up for trying anything. |
This is a new one to me, I have been looking in my local haunts and have only come up with a 2 step process.
And that would be to... convert to .wav or .flac using avidemux or ffmpeg (or whatever) change to the dir where the file is, Code:
ffmpeg -i input.flv output.flac Code:
cd ~/build select all and export it as .m4a (which is mpeg4-aac, from what I can gather). Quality?, as long as you convert up to wav or flac before converting to aac or mp3 I'd be surprised if you lost anymore detail. 49.3Mb .wav to 3.9Mb .m4a My assumption is based on a quick check of audacity's import/export functions. If you can try it you should see , you can change the file format at the bottom of the same window as export (type). If you need/want to install audacity, install the lame package first, for mp3 support. please try it, and ask here... Regards Glenn edit acc/aac typos |
Have you found a solution for this yet?
I am trying to accomplish the same thing and this is how I am doing it (pretty dirty, but it works):
If anyone has a cleaner solution please let us know! |
Hmmm... step three doesn't transcode the audio at all? I hadn't ever considered that option. And no, I never really found a good, clean, working solution. I just ended up having to eat the loss of quality from the AAC>FLAC>AAC convert. Believe me, I'm still -very- interested in a solid solution.
|
I agree with mkvextract, that's the way I always do it.
You can also extract it as is with ffmpeg: Code:
ffmpeg -i input.mp4 -acodec copy output.aac |
Bingo. That syntax for ffmpeg is the mythical one I couldn't manage to piece together. Just tested and it worked like a charm.
|
Quote:
Code:
avconv -i input.mp4 -acodec copy output.aac |
Quote:
Code:
ffmpeg -i input.mp4 -vn -acodec copy output.aac |
Let me add a little detail here because aac-files wont play in some players and e.g. puddletag wont open them, but if you use mp4 or m4a as output here ffmpeg will still encode the video. So add -vn to strip the video.
ffmpeg -i input.mp4 -vn -acodec copy output.aac or since ffmpeg will be replaced through avconv (I think avconv has a shorter syntax too) avconc -i input.mp4 -vn -acodec copy output.aac Greets |
All times are GMT -5. The time now is 07:07 PM. |