Which AAC Encoder can get closest to lossless?

Started by divergirl, May 08, 2016, 06:22:02 PM

Previous topic - Next topic

divergirl

I need to remux an MP4 with an external audio file and keep the audio as lossless as possible. The audio is being exported from Adobe Audition. I had hoped to remux with the ALAC codec to keep the audio truly lossless, but neither the main 2.6 version nor the nightly version of Avidemux will read my 16-bit stereo ALAC files (which are .m4a). If I replace Track 1 with my ALAC audio and play the clip in Avidemux, there is no audio. Furthermore, if I remux as an MP4 with Video and Audio on Copy, the resulting file has no audio track. I don't think it's my m4a files because they open and play in iTunes just fine.

Because I cannot get this to work, my workaround for now has been to export my audio from Audition as a 16-bit lossless wav file, replace Track 1 with the wav file, set the Audio Output to AAC, configure the audio encoder to the highest bitrate, and then remux the file. My question is thus: when aiming for the maximum audio quality, which AAC encoder does a better job, Faac or lav? The resulting file size is unimportant, just that the audio is as lossless as possible. I see the maximum bitrate for Faac is 384 and the maximum bitrate for lav is 448, but I don't want to assume that lav's 448 is higher quality than Faac's 384 just because the number is higher.

My last question is thus: if I am using fairly complacent audio and video streams and having no problems with either muxer, is MP4 Muxer still the better choice over MP4v2 Muxer? I remember reading on here once that the Mp4v2 muxer is able to cope with a wider range of file variations, but that the MP4 Muxer has less audio sync issues and I was wondering if this was still the case.

Jan Gruuthuse

Don't know about lossless and aac. As I understand it, you only have the choice between AAC (Faac) or AAC (lav)  libavcodec
If you need AAC:
QuoteFAAC has been evaluated as a somewhat "lower quality" option than other aac encoders.[9]
QuoteFFmpeg's native AAC encoder (considered experimental by the developers as of December 2010)[14] (part of libavcodec), but considered "better than vo-aacenc" in at least some tests.[15][16][17][18] It was written by Konstantin Shishkov, and released under version 2.1 of the LGPL.
Read this well and choose one or the other, keeping in mind what your target is (required or not: AAC format supported by FAAC are the "Low Complexity" (LC))Wikipedia: FAAC or Freeware Advanced Audio Coder

mean

MP4v2 is normally more standard, but it has a limitation : It cannot deal correctly with audio & video NOT starting at the same time. When that happens, you might get problems (such as a/v sync)
MP4 is the one from libavformat. It is somehow less compatible, but is very accomodating with inputs

So if mp4 works fine for you, stick to it

divergirl

#3
Quote from: Jan Gruuthuse on May 08, 2016, 07:34:37 PM
Don't know about lossless and aac. As I understand it, you only have the choice between AAC (Faac) or AAC (lav)  libavcodec
If you need AAC:
QuoteFAAC has been evaluated as a somewhat "lower quality" option than other aac encoders.[9]
QuoteFFmpeg's native AAC encoder (considered experimental by the developers as of December 2010)[14] (part of libavcodec), but considered "better than vo-aacenc" in at least some tests.[15][16][17][18] It was written by Konstantin Shishkov, and released under version 2.1 of the LGPL.
Read this well and choose one or the other, keeping in mind what your target is (required or not: AAC format supported by FAAC are the "Low Complexity" (LC))Wikipedia: FAAC or Freeware Advanced Audio Coder

Thank for your reply! If FAAC is somewhat lower quality than Libavcodec I may want to stick with lav then. The audio I'm working with is VERY dissonant. What I'm basically doing is taking clips from TV shows, reducing the background music using the Center Channel Extractor effect in Adobe Audition, and remuxing it back with the original video in Avidemux. The resulting clip can then be used in various non-linear editors to make fanvids. But taking music out of a final product is, to quote a sentence I've read somewhere on the matter, "akin to trying to take the eggs out of a cake."

At best it leaves behind a small amount of static, and at worst, a large amount of static and a great deal of residual music. The effect works well with instrumentals but poorly with sung vocals. When it works fairly well, this is the result: CCExtractor Before and After

When I am doing these clips for MYSELF I perform the effect and then save it as a 32-bit wav file to work with, because not only is it uncompressed, but leaving the file as 32-bit removes the need for dithering. But when I'm sending the files back to people over the internet I prefer to have it muxed with video already so they do not have to try to manually sync up any audio with video themselves. A lot of their programs don't even support MKV, which is why I try to keep the video as an MP4. Because these files are going to be re-encoded again later in their NLE's, if I HAVE to re-encode the audio, I really need an encoder that will be, at its max bitrate, as close to lossless as possible. :) Perhaps the human ear cannot distinguish between 256 kbps and 320 kbps, but I figure if that audio is going to go through a lossy conversion AGAIN on their end, that keeping the original audio as high-quality as possible is advisable.

For an example of a clip I would normally trash as unusable but I feel shows the exaggerated effects of the static I'm referring to, please see my attachment.