Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: poutnik on January 18, 2015, 12:19:54 PM

Title: AAC Faac versus Lav
Post by: poutnik on January 18, 2015, 12:19:54 PM
Which of Faac and Lav encoder is recommended for AAC audio ?
IIRC, Lav came later, so is it better ?

Title: Re: AAC Faac versus Lav
Post by: zakk on January 18, 2015, 12:22:11 PM
Personnally my standalone player reads Avidemux's flac but not it's lav. I would first check my players if I were you.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 18, 2015, 12:28:59 PM
 HW decoders in MXplayer  reads both AAC lav/faac in both mp4/mkv
on my Android 4.3 phone Sony Xperia M dual.

I have found this thread in Hydrogenaudio forum..    http://www.hydrogenaud.io/forums/index.php?showtopic=100909 (http://www.hydrogenaud.io/forums/index.php?showtopic=100909)

In MeGUI/Windows I am used to great Nero AAC encoder, highly configurable.
Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 18, 2015, 12:59:01 PM
As a general rule: I never touch audio tracks.
If needed: I drag and drop the video on to Audacity, change/edit what is needed and export these in the same original format MP2 MPEG Audio (Version 1) (Layer 2) or AC-3 (48 Khz)
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 19, 2015, 07:02:44 AM
I respect your approach, but it is not the answer to the question, rephrased as
"Which AAC encoder provides objectively or subjectively better results ?"

I understand reasons to keep untouched audio, but when once edited, why the same format ?

My target device is Android smartphone with limited storage ( external SD card is filled mostly by raster and vector maps for GPS applications).
I record/watch mostly documentaries with speech based audio, wit occasional background music often rather disturbing than appreciated.

MP2 track with high bitrate would consume large portion of filesize.  That is  not so true for 128 kb MP2, but valid for 192+ ones.
Speech at 192+ kb/s seems as luxury to me, as it does not share the same requirements with High fidelity audio.

I have not tested yet if my device plays mp2 format - probably will, but it will not matter.
Title: Re: AAC Faac versus Lav
Post by: AQUAR on January 19, 2015, 11:52:05 AM
QuoteI understand reasons to keep untouched audio, but when once edited, why the same format ?
Editing doesn't necessarily mean recoding and audio also deteriorates when recoded.

The OP wasn't explicit enough as to why you were asking the question.
And the rephrased version is indeterminate:
Objectively: You already know the answer!
Subjectively: Thats a personal attribute - You have to decide for Youself!

 
Title: Re: AAC Faac versus Lav
Post by: zakk on January 19, 2015, 11:57:42 AM
Quote from: AQUAR on January 19, 2015, 11:52:05 AM
Editing doesn't necessarily mean recoding
What ??
Title: Re: AAC Faac versus Lav
Post by: AQUAR on January 19, 2015, 12:34:09 PM
Never chopped the credits of a movie????
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 19, 2015, 01:57:11 PM
Quote from: AQUAR on January 19, 2015, 12:34:09 PM
Never chopped the credits of a movie????

One need not Audacity for cut the credits, if he can cut them with video directly in ADM.

I understood mentioning Audacity as editing of content to be kept.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 19, 2015, 02:15:20 PM
Quote from: AQUAR on January 19, 2015, 11:52:05 AM
QuoteI understand reasons to keep untouched audio, but when once edited, why the same format ?
Editing doesn't necessarily mean recoding and audio also deteriorates when recoded.

The OP wasn't explicit enough as to why you were asking the question.
And the rephrased version is indeterminate:
Objectively: You already know the answer!
Subjectively: Thats a personal attribute - You have to decide for Youself!


Aside of cutting, that need not mentioned Audacity, how to edit without reencoding ?

I am aware re-encoding alone deteriates quality - "I understand reasons to keep untouched audio,"
So does re-encoding MPEG2 to H264.  But there may be good reasons for both to do so.

Aside of size reason,  re-encoding with advanced Avisynth precessing, like with ssripts MCTemporalDenoise, or QTGMC,
can provide result of better subjective quality than original. similarly as advanced audioprocessing, but this is less common.

Hm, if I as OP asked about AAC encoder in ADM forum, I want probably encode audio in my ADM videoprocessing as AAC.
Similarly if I encode Myvideo.TS to MKV container, I probably want to save it as Myvideo.mkv.  :-)

I do not know objective answer, as I do not know if I can trust the mentioned HydrogenAudio thread and I do not have tools to compare it.
And even in the thread is unclear, what encoder they consider "better".

I am not really good in subjective comparison of audio and I am interested in subjective evaluations of others.
Well, you may say in such a case it doesnot matter what encoder. :-)
Evaluation of others I cannot do.

Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 19, 2015, 07:40:43 PM
Quote from: zakk on January 19, 2015, 11:57:42 AM
Quote from: AQUAR on January 19, 2015, 11:52:05 AM
Editing doesn't necessarily mean recoding
What ??
Cutting parts in between on key frames  with both video and audio set to Copy = re-muxing and not re-encoding.
As shown in this demo video (real time) : Avidemux 2.6.3 Edit Cut Trim (https://www.dropbox.com/s/3idao0bju5j5mbm/Avidemux263EditCutTrim.mp4?dl=0)
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 19, 2015, 08:46:14 PM
Quote from: Jan Gruuthuse on January 19, 2015, 07:40:43 PM
Cutting parts in between on key frames  with both video and audio set to Copy = re-muxing and not re-encoding.

Sometimes I perform automatic unattended batch processing via OneClick MeGUI feature,
and then I manually cut commertials in resulting MP4/AVC/AAC at I frames by ADM.

Jumping on H264 I-frames by UP/DOWN arrow is in ADM really convenient.
And, I like MP4 not being indexed ( in opposite to MKV, that is like 2pass indexed)
As it is not for archiving, I-frame cut resolution is enough for me.
Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 20, 2015, 08:34:58 AM
One reason to use mp2 audio = constant bitrate, variable bit rate can take more processing power then you want.
29 minutes stereo takes in
256 Kbps 55.7 MB
192 Kbps 41.7 MB
128 Kbps 27.8 MB
you would get the same using mp3

PS: If you want to save space GPS wise: have a look at android app MapFactor Navigator Free for android (http://navigatorfree.mapfactor.com/en/) and use OpenStreetMap only.
Big warning: you need the ability to adapt how you work with gps navigator ;) there is a functional beta in their forum: google for Test of Android version 1.4.x
Title: Re: AAC Faac versus Lav
Post by: AQUAR on January 20, 2015, 09:11:04 AM
Is that really an issue these days with ample cheap storage?
Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 20, 2015, 09:34:35 AM
android yes and getting worse: I have 32 GB memory cards in my android phone & tablet (720p displays). Tendency is now to restrict access to SD cards or not even have those on the devices :( The moment you start keep some video footage and GPS maps.
A gps map of
Germany: 4 maps (East, North, South, West) takes 0.8 GB
France: 0.8 GB
Netherlands: 0.2 GB
Australia takes only 98 MB (not that many roads over there)
USA: 1.6 GB
It is a constant Juggling with files.
My music favourites is 46.1 GB and wont fit.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 20, 2015, 11:22:55 AM
Quote from: Jan Gruuthuse on January 20, 2015, 08:34:58 AM
One reason to use mp2 audio = constant bitrate, variable bit rate can take more processing power then you want.
29 minutes stereo takes in
256 Kbps 55.7 MB
192 Kbps 41.7 MB
128 Kbps 27.8 MB
you would get the same using mp3

PS: If you want to save space GPS wise: have a look at android app MapFactor Navigator Free for android (http://navigatorfree.mapfactor.com/en/) and use OpenStreetMap only.
Big warning: you need the ability to adapt how you work with gps navigator ;) there is a functional beta in their forum: google for Test of Android version 1.4.x


The question was not what to do, but how to do what I want to do.  :-)

I want to use AAC at low bitrates for speech, just wondering which encoder to use in ADM.
In windows I use AAC-HE of Nero AAC encoder within MeGUI, usually in  unattended queue processing with live adding,
but combining windows NERO AAC with ADM processing is loosing convenience for serial work.

I will look for utility that help with blind subjective comparison of 2 encodings wrt original.

BTW, I need not advicing related to GPS applications, as I know why I do what I do. :-)

As I do you use OSM based applications ( Like previously on symbian I used GPSMid J2ME application where I generated my own maps in J2SE app OSM2GPSmid,  and currently OSMAnd with Brouter for cycling with its great routing profiles). So do I use raster maps in OSMAnd or Locus when  OSM maps are not sufficient - like for details in outdoor location not properly mapped in OSM.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 20, 2015, 11:31:34 AM
Quote from: AQUAR on January 20, 2015, 09:11:04 AM
Is that really an issue these days with ample cheap storage?

"There is one rule - no storage is big enough".

I have about 3 GB free space on 16 GB SD to feed phone by several documentaries..
as 1 hour of MPEG2 TS takes about 1-1.5 GB.......

Also, for archiving purposing, I use some fine scripts in Avisynth ( there is already Linux port Avxsynth, or new Python based implementation Vapoursynth )
Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 20, 2015, 12:01:59 PM
Quote from: poutnik on January 20, 2015, 11:22:55 AM
BTW, I need not advicing related to GPS applications, as I know why I do what I do. :-)
I'm not giving advice regarding GPS, just passing on the info. You do what you want do with whatever application you want.

I don't understand why this always turns in to this? Left with a feeling of bitterness.
I'm not in to discussions. You take my info, deal with it every way you want, ignore it if it pleases you to do so.
Title: Re: AAC Faac versus Lav
Post by: AQUAR on January 20, 2015, 12:15:58 PM
Quote"There is one rule - no storage is big enough".
Rules are meant to be broken - especially if they have impractical boundaries!

The audio overhead (in the examples!) is negligible in terms movie data storage.
Its true that the usability of that overhead is accumulative with increasing capacity.
But 3GB is small and so you won't fit another movie in it because of that audio overhead.
Another 16GB SD is cheap and solves more than saving 1 MB / 1 Min of movie.

Put another way:
The cost of incremental gain is exponential,.
You seem to be having difficulty finding the break even point for looking at cost effective alternatives.

Quote: You can't have the cake and eat it. 

Anyway: Wish you good luck in squeezing that extra drop of blood out of the stone.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 20, 2015, 12:48:18 PM
Quote from: Jan Gruuthuse on January 20, 2015, 12:01:59 PM
Quote from: poutnik on January 20, 2015, 11:22:55 AM
BTW, I need not advicing related to GPS applications, as I know why I do what I do. :-)
I'm not giving advice regarding GPS, just passing on the info. You do what you want do with whatever application you want.

I don't understand why this always turns in to this? Left with a feeling of bitterness.
I'm not in to discussions. You take my info, deal with it every way you want, ignore it if it pleases you to do so.
I think I took you note well about GPS, just reference. I apreciate it. You may have taken me too seriously.
So do I accept other info you provided - as info.

Scripting ways have their usage, so does CLI and GUI. They complement  each other.
I am fine with that.

If I ask about or suggest some things to a developers of Windows applications ( e.g. SmartDVB ), it is fine on both sides, and my participation is appreciated.
If I ask about or suggest some things to a developers of CrossPlatform Linux-main applications ( e.g. Avidemux), I have often feelings I may should not as I may will regret. Like if they are overprotecting their product.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 20, 2015, 01:20:53 PM
Well, 192 kb/s makes 1/10 up to 1/4 of my total bitrate, depending on video, using CRF encoding.
Keeping intact original original makes sense, if you can notice the difference, ot if difference bothers you.

Let have for given encoder testing set of bitrates ( or q parameter in Nero AAC - what is analog to AAC CRF number )
48-64-80-96-128-192-256-320.
If I do not notice difference above 80, usage higher bitreate than 80 or 96 is not well justified.

Such approach is valid for speech audio, video as well as images.
Few people stay at RAW format and never save it as JPG.
192 kb/s for speech is luxury almost as like saving photos as PNG or videos in Huffyuv.

I asked about what AAC encoder to use, as I do not know them, in sense what is experience of other users.
Not If I should use it.

Perhaps video and audio encoders should be removed in ADM 2.7,
as not many people process videos and audios originally in lossless formats. :-)(little sarcastic)

Yes, 3GB is small, and that is why I use MPEG2AVC transcoding, together with Avisynth processing in case of archiving.
My shrinking size depending on video, process chain and target resolution to 1/3 - 1/8 of original size, with CRF26.

I am not going to switch SDs.

Cost free solution is enough cost effective, itnt it ?  :-)
Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 20, 2015, 02:27:47 PM
If you already processed the audio track outside avidemux: you can passthrough the audio track: Leave Audio Output set to Copy
QuoteFAAC has been evaluated as a somewhat "lower quality" option than other aac encoders
...
FFmpeg's native AAC encoder (considered experimental by the developers as of December 2010)[14] (part of libavcodec)
source: FAAC (http://en.wikipedia.org/wiki/FAAC)

ps still greater reduction would by made if you downmix tracks to mono and probably drop to 22050 Khz.
Title: Re: AAC Faac versus Lav
Post by: Jan Gruuthuse on January 20, 2015, 03:39:35 PM
Quote from: poutnik on January 20, 2015, 12:48:18 PM
If I ask about or suggest some things to a developers of CrossPlatform Linux-main applications ( e.g. Avidemux), I have often feelings I may should not as I may will regret. Like if they are overprotecting their product.
Perhaps how you bring it? I don't know? Is a fact developer(s) do read here  and do pick up on suggestions, and have a big time shortage.
Time is a main problem. Implementing some suggestions/requests are hard to do, require perhaps complete rewrite, only developer knows.

Mark thread clearly as suggestion or request. And perhaps at some point in time you may find some are implemented or not.
Feature requests (http://www.avidemux.org/admWiki/doku.php?id=general:feature_requests)

Contributions are always welcome in Documentation & Tips (http://avidemux.org/smuf/index.php/board,10.0.html) or Patch gallery (http://avidemux.org/smuf/index.php/board,9.0.html)
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 20, 2015, 05:30:02 PM
Quote from: Jan Gruuthuse on January 20, 2015, 02:27:47 PM
If you already processed the audio track outside avidemux: you can passthrough the audio track: Leave Audio Output set to Copy
QuoteFAAC has been evaluated as a somewhat "lower quality" option than other aac encoders
...
FFmpeg's native AAC encoder (considered experimental by the developers as of December 2010)[14] (part of libavcodec)
source: FAAC (http://en.wikipedia.org/wiki/FAAC)

ps still greater reduction would by made if you downmix tracks to mono and probably drop to 22050 Khz.

Thank for your input. In fact I do often what you propose.

  - I copy all TS to a folder dedicated for MeGUI batch processing - so I need not to add them one by one - but I can do so during progress..
   -I Launch MeGUI batch processing of the whole folder, with defined  MeGUI/X264/NeroAAC profiles. 
   - I take resulting MP4/AVC/AAC one by one to ADM, cut them at I-frames and remux in video/audio copy modes.

I have read the notice about FAAC, but it was also mentioned somewhere about big FAAC improvement, so I am not sure how much it still applies.
I could go to mono 22050 kHz, but it may be slowly aiming to the opposite extreme.  I rather prefer some universal profile.
But you are true, as majority of my recording are commentary based, I will consider that.

There was somewhere said AAC 80-96 kb is about equivalent to MP3 128.  80kb is good enough for speech.

I have downloaded crossplatform ABX double blind tester http://lacinato.com/cm/software/othersoft/abx (http://lacinato.com/cm/software/othersoft/abx)
and just for curiosity I will try to test what AAC bitrate makes edge of being noticable for speech commentary.

Title: Re: AAC Faac versus Lav
Post by: poutnik on January 21, 2015, 09:12:10 PM
For some reason, I did not make lacinato work properly. Perhaps I have all encoding convert to wav or so, as it seems to me reading wav only.

But I did ABX blind testing in ABX plugin of FOOBAR2000 player for Nero AAC Encoder.

I compared WAV, decoded from original 128 kb/s MP2 speech commentary
with this WAV encoded by Nero AAC q=0.14 ( variable bitrate )  of size of equivalent ABR cca 32kb/s.

Note that I kept for AAC original 48kHz stereo.

I guessed well 9 times from 16, with reported probability of just guessing cca 40%.
Not bad for AAC.

But Nero AAC turn on AAC-HE at bitrate about 80kbs, so spectral band replication and parametric stereo helps.
For Faac and Lav AAC without AAC-HE and AAC-HEv2 results would be worse.
Title: Re: AAC Faac versus Lav
Post by: poutnik on January 25, 2015, 07:16:23 AM
Interesting graph is here. note that AAC=AAC LC, AACPlus v1=AAC HE, AACPlus v2 = AAC HEv2,  all supported by Nero AAC, but AFAIK ONLY LC by FAAC / LAV.
Not sure if QAAC by Apple, probably the best one, supports HEv2 as Nero does. ( both encoders supported by MeGUI ).

So I will probably stay at Nero AAC HE/HEv2 for low bitrate mostly speech audio.

(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fi231.photobucket.com%2Falbums%2Fee166%2Fimg_f%2Ffigure_1.png&hash=346273ce94014b5f8be13912b22846b7225b511c)
Title: Re: AAC Faac versus Lav
Post by: xpmule on March 12, 2016, 09:01:06 AM
Sadly you guys did not answer the question.
I'd imagine the dev added it for a reason.
Too bad he did not say what that is.
Could have been a lot of reasons too.

EDIT:
I tried to do a quick test..
First thing i noticed right away is FAAC's menu options only goes to 384
and LAV's AAC encoder goes to 448 kbps
But i think i had set 320 LAV_AAC before via scripting so i don't know.
Just presets ?
LAV seemed to take longer and make a bigger file too.
BUT..
I was re-encoding an MP3 VBR file that was at or below 192 (to 384 kbps) stereo.

Then i had an idea !
One thing i can do is take a file i know that has a higher than or equal to bitrate of 448 kbps
then i can encode using both encoders @ 384 kbps (stereo)
then i can use Spek (easier to deal with than Audicty that i don't want to bother with) to save some images
then i can do a compare of those images too.
This will give me 2 ways to see with my eyes the difference / result
as well as hearing them which i think would be almost impossible for me to tell.

Also since i had seen the option for LAV_AAC i have always used it !
I use the LAV codec package on my Win 7 install for years now + Icaros (disabling media Foundation)
I have been following the LAV project for years and know it is updated current.
And LAV is a respected high quality set of decoders etc.
LAV download page = http://forum.doom9.org/showthread.php?t=156191

So.. i am wondering if that is part of the reason it was added.. the fact that LAV is great LOL

It is a bit confusing having multiple encoders for the same codec though with out any explanation to be seen easily.
Compatibility reasons to keep more than one too ?

I have been using Avidemux for a long time and yesterday i started messing around removing some of them..
The list of them has grown over time and i get tired of the scrolling when all i ever use is the same 3 or 4 etc.
It is cool they are there though in case they are needed.

My advice OP ? use LAV (and maybe just remove the other one from your install folder)
I don't need to do more checking.. i bet LAV AAC will Beat FAAC quality wise etc.
And yeah i have Nero encoders etc with dbPowerAmp but that has nothing to do with the topic does it ? LOL
I have on super rare occasions use DBPoweramp to encode my video audio.
But i prefer to use Avidemux's.. that is what it's there for. (and it's convenient)
Title: Re: AAC Faac versus Lav
Post by: mean on March 12, 2016, 09:37:25 AM
LAV is part of libavcodec, so it is bundled with avidemux
FAAC/D are an external dependencies, so you may have them or not

Hence why there is both
From memory, decoder wise, faad is picked over lav when present
Title: Re: AAC Faac versus Lav
Post by: AvidemuxForumRant on March 27, 2021, 01:06:21 PM
I just signed up just to reply to this thread, as I had the very same question and Google brought this up as the first result. Strangely the helpful hint was not in here but on ffmpegs help page, where is stated:

libopus > libvorbis >= libfdk_aac > libmp3lame >= eac3/ac3 > aac > libtwolame > vorbis > mp2 > wmav2/wmav1

Source:
https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio

And on another site ffmpeg recommands:

If you require a low audio bitrate, such as ≤ 32kbs/channel, then HE-AAC would be worth considering if your player or device can support HE-AAC decoding. Anything higher may benefit more from AAC-LC due to less processing. If in doubt use AAC-LC. All players supporting HE-AAC also support AAC-LC.

Source:
https://trac.ffmpeg.org/wiki/Encode/AAC

To reach transparency FDK LC AAC >= 128 kbit/s is recommended by ffmpeg. This is what I would go for. FDK (Fraunhofer FDK AAC) seems to give the best results of all available AAC codecs, especially with bitrates above 128 kbit/s.

Also I like to downmix from multichannel to stereo with Dolby Pro Logic II.

And then as a personal note:
What is it with you guys that there are two pages full of b....sh.. answers, without a barely helpful hint?  >:(  Is it just about pushing your personal post count or ego? There was a clear question ask. Having three different AAC codec is really confusing. How is it of any help to explain, that you're not touching audio or how large the storage of an Android device is? Please enlighten me. I don't get the connection. You really should talk to the devs, as it must be totally useless to have all those AAC options [/sarcasm].
If this note is not to your liking, you may feel free to ban me from this site. But please keep the useful part, so that it might be of help to someone how is directed here via a search engine.
Title: Re: AAC Faac versus Lav
Post by: arora2deepak on April 20, 2021, 11:14:35 AM
I understood mentioning Audacity as editing of content to be kept. vidmate app (https://get-vidmate.com) instasave.onl (https://instasave.onl)
Title: Re: AAC Faac versus Lav
Post by: xyzzy on April 20, 2021, 11:55:24 AM
My own subject tests were: opus > AAC (FDK) > AAC (FAAC) > AC3 > AAC (LAV)

Other codecs didn't have device support I wanted.  Pretty similar to ffmpeg's help that I hadn't seen before just now.

I re-encode mostly talking multichannel to DPL II with Opus at 112 kbps.