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 > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th May 2018, 21:20   #1541  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Posts: 2,290
manolito is offline   Reply With Quote
Old 1st June 2018, 10:42   #1542  |  Link
Photon
Registered User
 
Photon's Avatar
 
Join Date: May 2018
Posts: 3
Cannot set custom quality level for AAC/MP4

Hi all,

I have been using LameXP for over a year - excellent program! However, I'm running into a bug when trying to encode using AAC (qaac 2.66). I don't encounter this problem with either OPUS, MP3 or Vorbis.

I'm currently using Version 4.16, Build 2134.

The problem is this: under the advanced settings tab, when inputting a custom encoding parameter for AAC (in this case, simply: "--tvbr 87") the encode fails, every time.

When inspecting the log, I figured out what the problem was:



As you can see, instead of replacing and overriding the default quality setting (--tvbr 91, which the slider is set to under the Compression tab), the custom setting that I want (--tvbr 87) is just appended to the command string, thus conflicting with the first setting. Naturally this means that the encode stops in its tracks before it can do anything. It throws up this message at the bottom:



Please let me know if you can replicate this. It's the only thing holding me back from using LameXP for AAC encoding (which is otherwise first class).

Last edited by Photon; 1st June 2018 at 10:59.
Photon is offline   Reply With Quote
Old 1st June 2018, 12:17   #1543  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
Quote:
Originally Posted by Photon View Post
Hi all,

I have been using LameXP for over a year - excellent program! However, I'm running into a bug when trying to encode using AAC (qaac 2.66). I don't encounter this problem with either OPUS, MP3 or Vorbis.

I'm currently using Version 4.16, Build 2134.

The problem is this: under the advanced settings tab, when inputting a custom encoding parameter for AAC (in this case, simply: "--tvbr 87") the encode fails, every time.

When inspecting the log, I figured out what the problem was:



As you can see, instead of replacing and overriding the default quality setting (--tvbr 91, which the slider is set to under the Compression tab), the custom setting that I want (--tvbr 87) is just appended to the command string, thus conflicting with the first setting. Naturally this means that the encode stops in its tracks before it can do anything. It throws up this message at the bottom:



Please let me know if you can replicate this. It's the only thing holding me back from using LameXP for AAC encoding (which is otherwise first class).
Well, the "custom" parameters are simply appended to the command-line that is generated automatically. And, of course, the generated command-line must contain the switches for the selected RC mode.

If you try to set the RC mode via "custom" parameter too, RC mode will unavoidably appear in the command-line twice – as the program clearly says: "custom" parameters are not validated and you use them at your own risk.

Most CLI tools will allow to specify even "conflicting" switches, in which case simply the last option on the command-line will take effect. This way you can easily "override" options already set by the generated command-line.

But: It appears that QAAC does more "pedantic" checking and won't allow to "override" the already-set RC mode.

There is no easy solution for this, because we would need figure out any possible combination of "conflicting" options. And, if a "conflicting" option was detected, remove that option from the generated command-line...

(Maintaining a list of potentially "conflicting" options – for every supported encoder – would be a lot of work. Just to enable a use-case that was never really intended)
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 1st June 2018 at 12:29.
LoRd_MuldeR is offline   Reply With Quote
Old 1st June 2018, 19:52   #1544  |  Link
Photon
Registered User
 
Photon's Avatar
 
Join Date: May 2018
Posts: 3
Quote:
Originally Posted by LoRd_MuldeR View Post
Well, the "custom" parameters are simply appended to the command-line that is generated automatically. And, of course, the generated command-line must contain the switches for the selected RC mode.

If you try to set the RC mode via "custom" parameter too, RC mode will unavoidably appear in the command-line twice – as the program clearly says: "custom" parameters are not validated and you use them at your own risk.

Most CLI tools will allow to specify even "conflicting" switches, in which case simply the last option on the command-line will take effect. This way you can easily "override" options already set by the generated command-line.

But: It appears that QAAC does more "pedantic" checking and won't allow to "override" the already-set RC mode.

There is no easy solution for this, because we would need figure out any possible combination of "conflicting" options. And, if a "conflicting" option was detected, remove that option from the generated command-line...

(Maintaining a list of potentially "conflicting" options – for every supported encoder – would be a lot of work. Just to enable a use-case that was never really intended)
Thanks for the explanation. So in short, there is no way of using a custom-defined bitrate or quality level for AAC in LameXP?

Would it be possible in that case to provide an option somehow tweak the TVBR slider so that we have more granular control? (Maybe an "advanced" slider activated by a checkbox, that allows the user to move up and down in increments of 1). That's the only solution I can think of for this but I don't know how feasible it would be to implement.

Other software allows you to select the TVBR quality level in increments of one right from the GUI, it's just that they don't have any easy was of importing your whole library in one go like LameXP does.

Last edited by Photon; 1st June 2018 at 20:00.
Photon is offline   Reply With Quote
Old 1st June 2018, 20:08   #1545  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
Quote:
Originally Posted by Photon View Post
Thanks for the explanation. So in short, there is no way of using a custom-defined bitrate or quality level for AAC in LameXP?
Yes. Obviously QAAC doesn't allow overwrite of previous options.

Quote:
Originally Posted by Photon View Post
Other software allows you to select the TVBR quality level in increments of one right from the GUI, it's just that they don't have any easy was of importing your whole library in one go like LameXP does.
Probably a case of "Placebo Effect"

From QAAC wiki:




From LameXP code:
Code:
static const int g_qaacVBRQualityLUT[16] = {0 ,9, 18, 27, 36, 45, 54, 63, 73, 82, 91, 100, 109, 118, 127, INT_MAX};

class QAACEncoderInfo : public AbstractEncoderInfo
{
	virtual int valueCount(int mode) const
	{
		switch(mode)
		{
		case SettingsModel::VBRMode:
			return 15;
			break;
		[...]
		}
	}
	virtual int valueAt(int mode, int index) const
	{
		switch(mode)
		{
		case SettingsModel::VBRMode:
			return g_qaacVBRQualityLUT[qBound(0, index , 14)];
			break;
		[...]
		}
	}
	[...]
}
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 1st June 2018 at 20:15.
LoRd_MuldeR is offline   Reply With Quote
Old 1st June 2018, 21:09   #1546  |  Link
Photon
Registered User
 
Photon's Avatar
 
Join Date: May 2018
Posts: 3
Quote:
Originally Posted by LoRd_MuldeR View Post
Probably a case of "Placebo Effect"

From QAAC wiki:

Well, I just went away and encoded an album using TVBR 87 and 91 using another program... and you're right, exactly the same file size! Not a jot of difference between them. Never would have known that if I hadn't signed up here. Thanks MuldeR.
Photon is offline   Reply With Quote
Old 7th July 2018, 12:21   #1547  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
LameXP v4.17 Alpha-3

Quote:
Changes between v4.15 and v4.16 [2018-04-30]:
* Upgraded build environment to Microsoft Visual Studio 2017.7 (MSVC 19.14)
* Updated Opus encoder/decoder libraries to v1.3-RC-1 (2018-06-01) and Opus-Tools to v0.1.10-71 (2018-04-30)
* Updated MediaInfo to v18.05 (2018-05-09), compiled with ICL 18.2 and MSVC 15.7
* Downgraded FAAD to from v2.8 to v2.7 for now, because v2.8 is currently broken with certain MP4 files
* Fixed detection of certain WMA and AAC files (regression in LameXP v4.16)
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 26th August 2018 at 21:51.
LoRd_MuldeR is offline   Reply With Quote
Old 7th July 2018, 15:45   #1548  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Posts: 2,290
Quote:
Originally Posted by LoRd_MuldeR View Post
I'm currently looking into a problem regarding the new FAAD version. Maybe I will make a new release after that issue has been resolved...
Looks to me like this is not gonna happen...
I won't bother with LameXP Alpha, Beta or RC versions any longer, it's just too annoying. I went back to the stable version 4.15 and updated a few tools, and this will do until the next stable version comes out...


Cheers
manolito
manolito is offline   Reply With Quote
Old 11th July 2018, 17:48   #1549  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 51
thanks for your regular updates. still using this tool mainly for opus low bitrate encoding stuff
now there's one request i'd like to mention. in LameXP you can only choose between preset bitrate options. 8;16;24 beeing the lowest. now there is quite a big quality gap between 8 and 16 kbit/s in opus.
could you make it possible to somehow be able to set custom bitrate values?
thx
RieGo is offline   Reply With Quote
Old 13th July 2018, 20:34   #1550  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
Quote:
Originally Posted by RieGo View Post
thanks for your regular updates. still using this tool mainly for opus low bitrate encoding stuff
now there's one request i'd like to mention. in LameXP you can only choose between preset bitrate options. 8;16;24 beeing the lowest. now there is quite a big quality gap between 8 and 16 kbit/s in opus.
could you make it possible to somehow be able to set custom bitrate values?
thx
Hello,

for now you could just add "--bitrate <value>" to the custom parameters for OpusEnc, on "Adavanced Options" tab.

This will overwrite the bitrate selected on "Compression" tab.

But if you think that we should add more bitrate steps for Opus towards the lower end, then I could probably do that. Maybe adding 12 kbps and 20 kbps would suffice?

Regards.
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 13th July 2018, 21:22   #1551  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
Quote:
Originally Posted by LoRd_MuldeR View Post
Hello,

for now you could just add "--bitrate <value>" to the custom parameters for OpusEnc, on "Adavanced Options" tab.

This will overwrite the bitrate selected on "Compression" tab.

But if you think that we should add more bitrate steps for Opus towards the lower end, then I could probably do that. Maybe adding 12 kbps and 20 kbps would suffice?

Regards.
Okay, I have adjusted the bitrate mappings for OpusEnc a bit. Can you please try with new TEST version?
https://sourceforge.net/projects/mul...6.exe/download
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 22nd July 2018, 16:49   #1552  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 51
Quote:
Originally Posted by LoRd_MuldeR View Post
Okay, I have adjusted the bitrate mappings for OpusEnc a bit. Can you please try with new TEST version?
https://sourceforge.net/projects/mul...6.exe/download
I apologize for my late response, was on vacation.

just tried this new build and it works just as expected.
you are awesome!
RieGo is offline   Reply With Quote
Old 26th August 2018, 21:51   #1553  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
LameXP v4.17 Beta-1

Quote:
Changes between v4.16 and v4.17 [unreleased]:
* Upgraded build environment to Microsoft Visual Studio 2017.8 (MSVC 19.15)
* Updated Opus encoder/decoder libraries to v1.3-RC-1 (2018-06-01) and Opus-Tools to v0.1.10-71 (2018-04-30)
* Updated MediaInfo to v18.05 (2018-05-09), compiled with ICL 18.2 and MSVC 15.7
* Downgraded FAAD to from v2.8 to v2.7 for now, because v2.8 is currently broken with certain MP4 files
* Fixed detection of certain WMA and AAC files [regression in LameXP v4.16]
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 27th September 2018 at 20:42. Reason: deprectaed
LoRd_MuldeR is offline   Reply With Quote
Old 27th September 2018, 20:33   #1554  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
LameXP v4.17 Beta-2

Quote:
Changes between v4.16 and v4.17 [unreleased]:
* Upgraded build environment to Microsoft Visual Studio 2017.8 (MSVC 19.15)
* Updated Opus encoder/decoder libraries to v1.3-RC-1 (2018-06-01) and Opus-Tools to v0.1.10-71 (2018-04-30)
* Updated MediaInfo to v18.05 (2018-05-09), compiled with ICL 18.2 and MSVC 15.7
* Downgraded FAAD to from v2.8 to v2.7 for now, because v2.8 is currently broken with certain MP4 files
* Fixed detection of certain WMA and AAC files [regression in LameXP v4.16]
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 3rd October 2018 at 20:49.
LoRd_MuldeR is offline   Reply With Quote
Old 3rd October 2018, 20:47   #1555  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,920
LameXP v4.17 RC-1
https://sourceforge.net/projects/lam...8.exe/download

Quote:
Changes between v4.16 and v4.17 [unreleased]:
* Upgraded build environment to Microsoft Visual Studio 2017.8 (MSVC 19.15)
* Updated Opus encoder/decoder libraries to v1.3-RC2 (2018-09-27) and Opus-Tools to v0.2+2 (2018-09-30)
* Updated MediaInfo to v18.05 (2018-05-09), compiled with ICL 18.2 and MSVC 15.7
* Downgraded FAAD to from v2.8 to v2.7 for now, because v2.8 is currently broken with certain MP4 files
* Fixed detection of certain WMA and AAC files [regression in LameXP v4.16]
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 5th October 2018, 07:43   #1556  |  Link
danlock
Registered User
 
Join Date: Oct 2017
Posts: 6
Quote:
Originally Posted by LoRd_MuldeR View Post
Yes! Thank you, LoRd_MuldeR! Danke sehr!
danlock is offline   Reply With Quote
Reply

Tags
aac, aotuv, flac, lame, lamexp, mp3, mp4, ogg, oggenc, opus, vorbis

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 09:32.


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