Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th January 2022, 15:56   #1  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
Getting and running latest fdkaac and opusenc encoders for dbpoweramp and foobar.

Hi I am Rupesh from India and I have some mp3 files and I want to convert to m4a files using fdkaac encoder latest version available. Similarly I want want to convert these mp3 files to opus using opusenc encoder latest version available.

There are a number of benifits of using latest version of encoder available like the output audio quality will be good etc., rather than using old one.

Generally i am using fdkaac or opusenc in other software like dbpoweramp and foobar. Using them directly is not good as the above software provide nice guis.

These software providers supply their own encoders for fdkaac and opusenc and they are too old.

I want to use the latest version of fdkaac and opusenc encoders instead. Source code of these encoders are available from git etc.,.

I have downloaded media auto build suite and ran it. It has downloaded the source code and compiled and created .exe files for fdkaac and opusenc.

I have copied these files to encoder directory present in the dbpoweramp folder.

I tried to convert these mp3 files to m4a and opus using old fdkaac and opusenc encoders provided by dbpoweramp. After that I have converted these mp3 files to m4a and opus using new fdkaac and opusenc compiled by msys2 or mingw64.

The files converted using old fdkaac and opusenc are of small in size than the ones converted using newly compiled fdkaac and opusenc at same bitrate.

I think that msys2 compiler is inferior than others. Which is the best way to compile source code of fdkaac and opusenc in optimal way like gcc or visual studio etc.,.

Can you suggest where to get or how to compile fdkaac and opusenc encoders .exe files which converts mp3 files to best quality output audio files.

Regards,
Rupesh.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Old 21st January 2022, 08:21   #2  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
Quote:
Originally Posted by rupeshforu3 View Post
Hi I am Rupesh from India and I have some mp3 files and I want to convert to m4a files using fdkaac encoder latest version available. Similarly I want want to convert these mp3 files to opus using opusenc encoder latest version available.

I hope you are converting from 200-320kps mp3 to 100-150kps AAC/opus, otherwise this conversion is rather pointless.

Quote:
There are a number of benifits of using latest version of encoder available like the output audio quality will be good etc., rather than using old one.
According to my references, there haven't been much quality improvements to either since 2018 & 2016 respectively

https://en.wikipedia.org/wiki/Opus_(...ormat)#History

https://github.com/mstorsjo/fdk-aac/...ster/ChangeLog
https://tracker.debian.org/pkg/fdk-aac


Quote:
The files converted using old fdkaac and opusenc are of small in size than the ones converted using newly compiled fdkaac and opusenc at same bitrate.

How big is the difference? If it's small, it won't impact much on quality. If it's big, this suggests a problem with settings.

Can you hear any difference?

---

Reading HA, there is not much benefit to using Opus at >=128kps

https://hydrogenaud.io/index.php?topic=120166.0
https://hydrogenaud.io/index.php?topic=119424.0

---

PS: qAAC is also worth exporing if you want quality AAC. It's possible to use them through DBPA https://www.dbpoweramp.com/codec-central-m4a.htm & foobar
junh1024 is offline   Reply With Quote
Old 22nd January 2022, 06:39   #3  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by rupeshforu3 View Post
I tried to convert these mp3 files to m4a and opus using old fdkaac and opusenc encoders provided by dbpoweramp. After that I have converted these mp3 files to m4a and opus using new fdkaac and opusenc compiled by msys2 or mingw64.

The files converted using old fdkaac and opusenc are of small in size than the ones converted using newly compiled fdkaac and opusenc at same bitrate.
How much smaller? If the bitrate is the same, the total number of bits should be the same.

Quote:
Originally Posted by rupeshforu3 View Post
I think that msys2 compiler is inferior than others. Which is the best way to compile source code of fdkaac and opusenc in optimal way like gcc or visual studio etc
Use opusenc from the foobar2000 encoders pack.
It looks like the current opus version was released April 2019, and opusenc.exe in the fb2k encoders pack is dated April 2019.

Quote:
Originally Posted by rupeshforu3 View Post
Can you suggest where to get or how to compile fdkaac and opusenc encoders .exe files which converts mp3 files to best quality output audio files.
I've never compiled anything, but the only difference I've (sometimes) noticed between different builds of the same fdkaac version is encoding speed.

Look for a link for fdkaac.exe in one of the posts here.
https://forum.doom9.org/showthread.php?t=171561

Last edited by hello_hello; 22nd January 2022 at 23:23.
hello_hello is offline   Reply With Quote
Old 22nd January 2022, 11:35   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
@rupeshforu3 follow the recomendations of junh1024 and hello_hello, but remember than recode a lossy mp3 never can improve the quality, you can obtain only a little less quality with a little less size.

About last know encoders and recommended (qaac for AAC) read the Updated FAQ.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 22nd January 2022, 15:50   #5  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
From the past 4 years I am using fdkaac and opusenc with dbpoweramp and I am satisfied with the audio quality of converted audio files.

So I want to use same fdkaac and opusenc with dbpoweramp but with latest versions of the above.

As I want windows versions of the above encoders I think that visual studio produces perfect executable files than msys2 or mingw64 gcc.

At present I have downloaded visual studio community edition 2022 and all the components of vc ++ and Linux make tools etc.,. But I don't know how to compile source code obtained from git.

I have seen the source code of fdkaac present in the nu774 fdkaac repository of git. In it I can see .sln and .vcxproj files.

If I open these files can I compile source code automatically without any much effort of installing mingw and passing parameters to it.

In the doom forum I have noticed that someone has compiled fdkaac 2.0.1 with msys2 and provided media fire link. The link is

http://www.mediafire.com/file/jphuy8...v2.0.1.7z/file

Can I trust it and use it in my dbpoweramp or foobar.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Old 23rd January 2022, 11:15   #6  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Your link is from 2019-12-08, the kedautinh12 compile include commits until 2021-08-24.

Using a encoder or other only change the size and speed of the compiler (the exe), the output encodes (the aac/m4a) are the same with the same source codes.

About the version check the previous Tormento links fdkaac 1.0.2 libfdk-aac 0.1.6+2.0.2 from 2021-06-08
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 23rd January 2022 at 11:24.
tebasuna51 is offline   Reply With Quote
Old 24th January 2022, 10:34   #7  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
Hi at present I am using fdkaac encoder latest which is obtained from media auto build suite.

It has downloaded msys2 and ming64, gcc etc.,. After that it has compiled source code of many audio tools and ffmpeg.

First I tried to create ffmpeg tool but after compiling fdkaac and opusenc the process has been stopped due to errors.

Many of you may be struggling to compile source code of fdkaac and opusenc, ffmpeg etc.,. Including me as I tried to compile fdkaac source code in visual studio but not succeeded.

I am suggesting to all of you to try this tool called media auto build suite.

I have tested m4a files generated by various versions of fdkaac ie., One downloaded from media fire, compiled by msys2, old fdkaac etc.,. My conclusion is all versions generated little differences in file size but quality is same of all output audio files.

My doubt is all source mp3 files are of 16 bit depth. What happens when I convert these mp3 files to m4a files by specifying bit depth as 24 bit.

I think that encoding to 24 bit may improve the quality of output m4a files.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Old 24th January 2022, 11:03   #8  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by rupeshforu3 View Post
My conclusion is all versions generated little differences in file size but quality is same of all output audio files.
Correct.

Quote:
My doubt is all source mp3 files are of 16 bit depth. What happens when I convert these mp3 files to m4a files by specifying bit depth as 24 bit.

I think that encoding to 24 bit may improve the quality of output m4a files.
Wrong all this.

- A lossy encode don't have bitdepth, only lossless encodes (flac, thd, etc) can have a sample bitdepth.

- You can't improve the quality of a source. Maybe you can edit it to correct some noise or errors but never improve quality changing the bitdepth or the bitrate.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 24th January 2022, 15:02   #9  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
I don't want to improve the quality of source mp3 files but while running fdkaac encoder and passing parameters to it can I instruct the fdkaac encoder to encode source mp3 file at 24 bit bit depth.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Old 24th January 2022, 15:47   #10  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
Sorry for the disguise I am asking lot of questions because previously I mean five years back I have searched a lot to convert MP3 files to other codecs and used various tools but none of them satisfied me and finally I have tried dbpoweramp and after that fully satisfied.

At the starting i have converted MP3 files of size 450gb to other codecs using dbpoweramp. At present I have bought new PC with latest intel processor with Intel hd sound and realtek 897 alc.

Again I want to convert these same MP3 files to other using latest version of fdkaac and opusenc encoders. So I have searched web and compiled myself using msys2.

I have seen the version of opusenc in windows terminal and found that both are same.

I have used four fdkaac encoders one compiled using msys2 and the one provided by dbpoweramp 17.1 and two others downloaded from web.

Two encoders ie., One provided by dbpoweramp and the one downloaded from web are of same size and produced same output m4a file size.

The id tag properties of the m4a file generated by these two encoders are as below

fdkaac 1.0.0, libfdk-aac 4.0.0, VBR mode 1

The other two fdkaac encoders are one compiled by msys2 and the other downloaded from web

The id tag properties of the m4a file generated by these two encoders are as below

fdkaac 1.0.2, libfdk-aac 4.0.1, VBR mode 1

I have played all the m4a files in my android smartphone player and all sounds good.

I think that the fdkaac encoder provided by dbpoweramp is only two months older than the one compiled by msys2 gcc.

If you instruct as "use the one provided by dbpoweramp and discard everything else" I will follow your instructions.

Or if you instruct as " use the latest fdkaac encoder compiled or downloaded from web and discard the one provided by dbpoweramp" I will follow your instructions.

Finally my request is how to use intel HD audio features and how to use realtek 897 alc during encoding. If these two can't be used strictly say no. I have installed latest drivers for hd audio and realtek 897 alc. I have loaded direct x dsp in dbpoweramp and unfortunately it has detected none.

Please try to read the current post thoroughly and try to reply to my questions

1) Is there any need to use latest fdkaac encoder

2) Is it possible to use intel HD audio and realtek 897 alc during encoding.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Old 24th January 2022, 21:41   #11  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
1) Nope
2) Nope
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 25th January 2022, 05:29   #12  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by rupeshforu3 View Post
I don't want to improve the quality of source mp3 files but while running fdkaac encoder and passing parameters to it can I instruct the fdkaac encoder to encode source mp3 file at 24 bit bit depth.
Unless something changed while I wasn't paying attention, fdkaac accepts 16, 24 & 32 bit (integer), and 32 & 64 bit (float) as the input, but it converts the audio to 16 bit internally before encoding.
Hydrogen audio still says the same thing.
https://wiki.hydrogenaud.io/index.ph...#Sample_Format
And under --raw-format
https://wiki.hydrogenaud.io/index.ph...DK_AAC#Usage_2

I haven't used dbpoweramp in a long time, but I've no idea how you'd tell any lossy encoder to encode at a bit depth of 24.

The way it works for fb2k, is fb2k decodes all lossy audio as 32 bit float, the DSPs (if you're using any) process the audio in 32 bit float, and the "Highest BPS Mode Supported" option in the encoder configuration is to tell fb2k what the input bitdepth needs to be when the encoder doesn't support 32 bit float.

For lossless encoding of a lossy source, the audio is still decoded as 32 bit float, but the default output is 16 bit for lossless encoding. You can select the output bitdepth at the bottom of the converter setup window, but you have to select a lossless encoder from the list first, or the output bitdepth option won't appear.

Also fb2k optimises M4As and MP4s after the file is written. It's why fb2k adds --no-optimize to the default command line for QAAC, so they're not optimised twice. I can't remember exactly what happens, but some of the MP4 container data is moved to the beginning, or something.....
It's a good thing, but I don't know if dbpoweramp does the same. If it doesn't, their output files might be marginally different in size.

For the version of fdkaac...
Hasn't someone already mentioned the better quality option is to use QAAC instead of fdkaac? If not because of it's higher encoding quality, or because it doesn't potentially clip the audio by converting it to 16 bit on the way in, then maybe it's because fdkaac is pretty heavy handed with the low pass filtering.
https://wiki.hydrogenaud.io/index.ph..._AAC#Bandwidth

When I first tried fdkaac, I discovered the bitrate difference between the -m5 and -m4 quality presets was far greater than expected. After reading about the default cut-off frequencies, I added a more standard cut-off to the command lines (more standard for higher quality presets). That decreased the -m5 bitrate a little and also increased the -m4 bitrate a little, so the resulting bitrates are now fairly "normal".

That's how I remember it. I don't use fdkaac for encoding so it's been a while.

-m5 fb2k command line:
--ignorelength -S -w 18500 -m 5 -o %d -

-m4 fb2k command line:
--ignorelength -S -w 18500 -m 4 -o %d -

Last edited by hello_hello; 25th January 2022 at 05:53.
hello_hello is offline   Reply With Quote
Old 25th January 2022, 13:15   #13  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by hello_hello View Post
Hasn't someone already mentioned the better quality option is to use QAAC instead of fdkaac? If not because of it's higher encoding quality, or because it doesn't potentially clip the audio by converting it to 16 bit on the way in, then maybe it's because fdkaac is pretty heavy handed with the low pass filtering
Of course:
Quote:
Originally Posted by tebasuna51 View Post
About last know encoders and recommended (qaac for AAC) read the Updated FAQ.
But rupeshforu3 seems ignore the recommendations.

Like qaac support mp3 input the easy way to convert all mp3 in a folder is run in that folder:

FOR %I in (*.mp3) DO "C:\QAACPATH\qaac.exe" -v 128 -o "%I.m4a" "%I"

Where C:\QAACPATH\ is the path of your qaac encoder, and 128 is the average bitrate desired (change it at your taste).
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 26th January 2022, 06:14   #14  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
May I know which is best among fdkaac and qaac.

Is it possible to encode source mp3 files to aac using fdkaac or qaac with 24 bit depth or 32 bit float.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Old 26th January 2022, 13:27   #15  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by rupeshforu3 View Post
Is it possible to encode source mp3 files to aac using fdkaac with 24 bit depth or 32 bit float.
Please rupeshforu3 read the answers:
Quote:
Originally Posted by hello_hello View Post
Unless something changed while I wasn't paying attention, fdkaac accepts 16, 24 & 32 bit (integer), and 32 & 64 bit (float) as the input, but it converts the audio to 16 bit internally before encoding.
Hydrogen audio still says the same thing.
https://wiki.hydrogenaud.io/index.ph...#Sample_Format
And under --raw-format
https://wiki.hydrogenaud.io/index.ph...DK_AAC#Usage_2
Then is useless supply any source with a big precission format.

Quote:
or qaac with 24 bit depth or 32 bit float.
One more time: a lossy mp3 don't have bitdepth.
Please read https://en.wikipedia.org/wiki/MP3#/media/ to understand how work a lossy encoder:

- The encoder convert time samples (these samples have depth) in frequency samples (MDCT filter, with float maths) and discard the less relevant (according to bitrate), these frequency samples losse the time bitdepth. We don't know the precission of we can recover the source, of course less than 16 bits int.

- The decoders convert the frequency samples in time samples most the times using float maths, and output float samples, than can be (or not) converted to int with a bitdeph not related at all with the original bitrate of source used to encode the mp3.

- The quality of a lossy encode is the bitrate, any bitdepth of the source is losse. If you are using low bitrates:
Quote:
Originally Posted by rupeshforu3 View Post
fdkaac 1.0.2, libfdk-aac 4.0.1, VBR mode 1

I have played all the m4a files in my android smartphone player and all sounds good.
with average bitrate less than 100 Kb/s does not make sense worry about the bitdepth used in the encode.

- If qaac have a internal mp3 decoder the best format can be used automatically. I think float samples can be used without conversions.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 26th January 2022 at 13:48. Reason: add info
tebasuna51 is offline   Reply With Quote
Old 27th January 2022, 03:04   #16  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
Thanks for your clarification but many sites said that aac defaults to 16 bit depth and I thought that aac is inferior than other codecs. Is it true.

Sent from my LM-G710 using Tapatalk

Last edited by rupeshforu3; 27th January 2022 at 17:57.
rupeshforu3 is offline   Reply With Quote
Old 2nd February 2022, 13:22   #17  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
Rupesh, what about making a simple diff to compare ?
Not asking here to make somebody else compare "what many sites say".

You heard the most knowledgeable people here and at hydrogenaudio.

Put your source file into audacity.
Put your test encoded file from your preferred encoder into audacity.
Subtract them. Now listen to the residue.
Anything different from silence is artifacts.
Judge if you can live with that.
Choose the next encoder, the next setting, the next source.

(Maybe you want to amplify the residue and facepalm...
Maybe you will be amazed, and maybe you won't look back to anything .mp3/.ac3/.m4a/.aac compressed for music anymore)

Compression in digital domain means to lose something
(often only details are named, but often flesh is lost where bones stay)
which can never be regained completely, and you want to start with lossy .mp3.
Their bitrate ?

There is no additional sorcery to be expected from the latest compile of any such encoder, if that is what you are hoping for. The faults coming from the first .mp3 encode will be already much worse than anything that might be lost in later 16 vs 24 vs 32 bittage.

As with video: Just give bits from the first conversion on and there at most.
One may try to save down the road, but one may end up as "Hans im Glück"
(maybe the tale is really called "Hans in luck" as suggested),
keeping nothing in his hands after ... unlucky conversions.

But hope is...always there.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 2nd February 2022 at 13:33.
Emulgator is offline   Reply With Quote
Old 3rd February 2022, 04:01   #18  |  Link
rupeshforu3
Registered User
 
rupeshforu3's Avatar
 
Join Date: Mar 2021
Posts: 86
Thanks for your suggestions and I will do as you said.

Sent from my LM-G710 using Tapatalk
rupeshforu3 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.