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 25th February 2011, 14:12   #181  |  Link
codres
Registered User
 
Join Date: Dec 2002
Location: Galati
Posts: 11
Is there a setting in the new version to change the temp folder. Is default in C:\. In the older one i could change it quickly. But in this I must be blind or maybe is not implemented? Thanks for your efforts in the development.
__________________
Codres A Bogdan
codres is offline   Reply With Quote
Old 25th February 2011, 14:19   #182  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by codres View Post
Is there a setting in the new version to change the temp folder. Is default in C:\. In the older one i could change it quickly. But in this I must be blind or maybe is not implemented? Thanks for your efforts in the development.
There is no such option currently.
__________________
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 25th February 2011, 15:28   #183  |  Link
codres
Registered User
 
Join Date: Dec 2002
Location: Galati
Posts: 11
That's too bad, I must downgrade then. I have under 1GB space on C. Also multithreading could be disabled?
__________________
Codres A Bogdan
codres is offline   Reply With Quote
Old 25th February 2011, 15:53   #184  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by codres View Post
That's too bad, I must downgrade then. I have under 1GB space on C.
Then it's probably time to clean-up your system drive/partition

You will run into all kinds of problems with low disk space on your system drive/partition (not only with LameXP!), that's for sure.

Anyway, I can add an option to manually choose the directory for TEMP files...


Quote:
Originally Posted by codres View Post
Also multithreading could be disabled?
Not sure what you mean. But I recently added an option to manually overwrite the number of parallel instances (available in the latest snapshot build).

Settings this option to "1" effectively disables multi-threading, at least on the "batch processing" level. Although this usually isn't recommended...
__________________
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 25th February 2011, 19:19   #185  |  Link
codres
Registered User
 
Join Date: Dec 2002
Location: Galati
Posts: 11
Well, usually my comp also encodes x264 most of the times. So I don't want to stress too much with mp3 encodings. So, yes, I want to use only 1 core. Thanks for the tips. Right now I have 1.3 Gb free on C which usually is enough but for a movie of 2h30 min gave me an error.
__________________
Codres A Bogdan

Last edited by codres; 25th February 2011 at 19:23.
codres is offline   Reply With Quote
Old 27th February 2011, 06:45   #186  |  Link
codres
Registered User
 
Join Date: Dec 2002
Location: Galati
Posts: 11
Thanks for the new implementions! They work great mr. mulder
__________________
Codres A Bogdan
codres is offline   Reply With Quote
Old 28th February 2011, 19:07   #187  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Yet another aoTuV Beta-6 update

Quote:
aoTuV Beta6.02 [beta6.01 >> beta6.02] (2011/02/27)
# In the specific pattern (different from beta6.01), the bug that caused overflow was fixed.
__________________
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; 2nd March 2011 at 21:54.
LoRd_MuldeR is offline   Reply With Quote
Old 6th March 2011, 22:36   #188  |  Link
John_J
Registered User
 
John_J's Avatar
 
Join Date: Nov 2010
Posts: 14
Hello LoRd_MuldeR!

After a fresh reinstall of Windows XP, I also wanted to use LameXP again for my audio encodings and saw your update to v4.0.
First, I want to say that this new version became excellent...same simple workflow as before, but a brilliant new UI and nice updates.

I've played around in different ways and wondered myself where all extracted tool files have gone, because I couldn't find them in default temporary folder. After a look at Avast (Realtime-Scan is very useful in more than one way ), I found them in "\Documents and Settings\USER\Local Settings\App Data\Temp".
You've stated that temporary files go to the %TEMP% folder, but this folder is usually found at "\Documents and Settings\USER\Local Settings\Temp", isn't it? Or is this due to newer OS like Windows 7?

Regards,
JohnJ

EDIT: Forget above...looked at changelog of new beta build 350:

Code:
Changes between v4.00 and v4.01:

        * Added an option to select a user-defined TEMP directory
Thanks!!

EDIT2:

Spoke too soon! It only affects folder of temporary audio files, so please have a look at it.

Last edited by John_J; 7th March 2011 at 03:02.
John_J is offline   Reply With Quote
Old 7th March 2011, 00:26   #189  |  Link
Gabrielgoc
Member
 
Join Date: Jun 2002
Location: Buenos Aires - Argentina
Posts: 43
LoRd_MuldeR, I was reading post #100 (http://forum.doom9.org/showthread.php?p=1473735 and I very interested about replaygain.

Replaygain main objective is not to adjust the volume without recompressing, but normalize the loudness based on the response of the human ear, so leave all the tracks on an even level. (http://en.wikipedia.org/wiki/Loudness). While replaygain is the most widely used algorithm, the EBU (European Broadcasting Union) has developed a new algorithm based on ITU-R BS.1770 as a loudness measurement method. This was standardized as EBU R-128. (http://tech.ebu.ch/loudness). If you are interested the following libraries can help you determine how to adjust the volume with SOX: http://www.hydrogenaudio.org/forums/...howtopic=85978 and http://www.hydrogenaudio.org/forums/...howtopic=86116.

I hope this info will be interesting to you. I apologize for my English. Greetings.

Gabriel
Gabrielgoc is offline   Reply With Quote
Old 7th March 2011, 11:38   #190  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by John_J View Post
I've played around in different ways and wondered myself where all extracted tool files have gone, because I couldn't find them in default temporary folder. After a look at Avast (Realtime-Scan is very useful in more than one way ), I found them in "\Documents and Settings\USER\Local Settings\App Data\Temp".
You can also use ProcessMonitor. Or look at the source code directly

Quote:
Originally Posted by John_J View Post
You've stated that temporary files go to the %TEMP% folder, but this folder is usually found at "\Documents and Settings\USER\Local Settings\Temp", isn't it? Or is this due to newer OS like Windows 7?
The Windows operating system doesn't provide any API to detect the system's TEMP folder! Neither SHGetKnownFolderPath() nor SHGetFolderPath() knows about the TEMP folder. There is a function GetTempPath(), however this function does NOT return the path to the system's TEMP folder, but the current value of the %TMP% (or if that one isn't set %TEMP%) environment variable. Now %TMP% and %TEMP% will usually be set and they will usually point to the system's TEMP path, but they also may point to an arbitrary non-writable path or they may even contain complete garbage*! After all the environment variables are user-defined and may be screwed up. So it's something we better do not rely on! Question is: How do we detect the system's TEMP folder, if the Win32 API doesn't reveal it? Solution that works in practice: Obtain the path of the 'LocalAppData' folder (usually located at: "%USERPROFILE%\AppData\Local"), which is known to the Win32 API functions, and then simply append "\Temp" to that path. The result exactly matches the system's standard TEMP folder on Win7 (and probably Vista too), which is "C:\Users\John Doe\AppData\Local\Temp". It slightly differs from WindowsXP's default TEMP folder, but I see no problem there...

*from MSDN documentation: "Note that the function does not verify that the path exists, nor does it test to see if the current process has any kind of access rights to the path."

Quote:
Originally Posted by John_J View Post
Spoke too soon! It only affects folder of temporary audio files, so please have a look at it.
That is exactly how it is intended. The "primary" Temp folder needs to be accessed even before user-settings have been loaded, so it cannot be user-controlled. However that shouldn't be an issue at all, as the amount of data extracted to that folder is really small. The user-controlled ("secondary") Temp folder will be used for all intermediate/temporary audio files during the encoding process. So that's the place where the "big" files will go to. Consequently users with a small system partition may want to change the location of the "secondary" Temp folder, while the location of the "primary" one shouldn't matter for anybody.

(If you don't have the ~10 MB of free space, that LameXP will occupy on start-up, available on your system partition, you will run into all kinds of problems with other applications too)
__________________
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; 7th March 2011 at 14:09.
LoRd_MuldeR is offline   Reply With Quote
Old 7th March 2011, 12:03   #191  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by Gabrielgoc View Post
Replaygain main objective is not to adjust the volume without recompressing, but normalize the loudness based on the response of the human ear, so leave all the tracks on an even level. (http://en.wikipedia.org/wiki/Loudness). While replaygain is the most widely used algorithm, the EBU (European Broadcasting Union) has developed a new algorithm based on ITU-R BS.1770 as a loudness measurement method. This was standardized as EBU R-128. (http://tech.ebu.ch/loudness). If you are interested the following libraries can help you determine how to adjust the volume with SOX: http://www.hydrogenaudio.org/forums/...howtopic=85978 and http://www.hydrogenaudio.org/forums/...howtopic=86116.
The "volume normalization" filter in LameXP already is implemented using the "gain" filter of SoX.

SoX also has a "--replay-gain" parameter, but apparently this can only be used to re-gain files that have already been tagged with ReplayGain information before.

From the SoX manual:
One important use of audio file comments is to convey ‘Replay Gain’ information. SoX supports applying Replay Gain information, but not generating it.
__________________
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; 7th March 2011 at 14:12.
LoRd_MuldeR is offline   Reply With Quote
Old 7th March 2011, 22:57   #192  |  Link
John_J
Registered User
 
John_J's Avatar
 
Join Date: Nov 2010
Posts: 14
Hello LoRd_MuldeR,

thanks for your fast response!

Quote:
Originally Posted by LoRd_MuldeR View Post
You can also use ProcessMonitor. Or look at the source code directly
Yes, you're right ...but Process Monitor isn't installed, yet (fresh installation).

BTW: Is this the right function which specifies temporary tool path?

Code:
Global.cpp

/*
 * Get LameXP temp folder
 */
const QString &lamexp_temp_folder(void)
{
	static const char *TEMP_STR = "Temp";

	if(g_lamexp_temp_folder.isEmpty())
	{
		...
	}
	...
}
Quote:
Originally Posted by LoRd_MuldeR View Post
The Windows operating system doesn't provide any API to detect the system's TEMP folder! Neither SHGetKnownFolderPath() nor SHGetFolderPath() knows about the TEMP folder. There is a function GetTempPath(), however this function does NOT return the path to the system's TEMP folder, but the current value of the %TMP% (or if that one isn't set %TEMP%) environment variable. Now %TMP% and %TEMP% will usually be set and they will usually point to the system's TEMP path, but they also may point to an arbitrary non-writable path or they may even contain complete garbage*!
Yeah, I browsed MSDN too and didn't find any function which returns system's temporary folder. However...maybe you're thinking just a little bit too far ahead. It's the purpose of temporary environment variable to change the according folder in an easy way by the user and provide this information system-wide. I'v never seen any corrupted environment variables. Any software uses the correct path, even LameXP 3.18

Quote:
Originally Posted by LoRd_MuldeR View Post
Question is: How do we detect the system's TEMP folder, if the Win32 API doesn't reveal it? Solution that works in practice: Obtain the path of the 'LocalAppData' folder (usually located at: "%USERPROFILE%\AppData\Local"), which is known to the Win32 API functions, and then simply append "\Temp" to that path. The result exactly matches the system's standard TEMP folder on Win7 (and probably Vista too), which is "C:\Users\John Doe\AppData\Local\Temp".
Correct, but...

Quote:
Originally Posted by LoRd_MuldeR View Post
It slightly differs from WindowsXP's default TEMP folder, but I see no problem there...
That's the reason why I did that post here. Exiting LameXP v4.0 running WinXP leaves behind an empty folder in the wrong path and no other applications are using it. I know, that sounds very pedantic

Quote:
Originally Posted by LoRd_MuldeR View Post
That is exactly how it is intended. The "primary" Temp folder needs to be accessed even before user-settings have been loaded, so it cannot be user-controlled. However that shouldn't be an issue at all, as the amount of data extracted to that folder is really small.
It's not the required disk space, but the folder left behind

Perhaps you could implement a function to delete it in an XP environment or create it in "%USERPROFILE%\Local Settings\Application Data\LoRd_MuldeR", if you really need this folder at this location and don't want to trust temporary variable.

--JohnJ
John_J is offline   Reply With Quote
Old 7th March 2011, 23:38   #193  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by John_J View Post
BTW: Is this the right function which specifies temporary tool path?
Yup.

Quote:
Originally Posted by John_J View Post
Yeah, I browsed MSDN too and didn't find any function which returns system's temporary folder.
Indeed.

Quote:
Originally Posted by John_J View Post
However...maybe you're thinking just a little bit too far ahead. It's the purpose of temporary environment variable to change the according folder in an easy way by the user and provide this information system-wide. I'v never seen any corrupted environment variables. Any software uses the correct path, even LameXP 3.18
Well, users do kind of all strange things, such as messing with environment variables, and then forget about it. Of course when something goes wrong they'll complain to the software author.

Moreover it can even happen that other programs/installers modify environment variables. Consequently we should avoid 'uncertainties' (like depending on environment variables) as much as possible.

BTW: LameXP v3.18 used GetTempPath(), because back at that time I hadn't realized that this function is just a wrapper for getenv("TMP")

Quote:
Originally Posted by John_J View Post
That's the reason why I did that post here. Exiting LameXP v4.0 running WinXP leaves behind an empty folder in the wrong path and no other applications are using it. I know, that sounds very pedantic
Yes, I think this is more a pedantry than a real problem.

After all, given that all applications clean up properly, you should always find the TEMP folder empty, after exiting all running applications

Quote:
Originally Posted by John_J View Post
Perhaps you could implement a function to delete it in an XP environment or create it in "%USERPROFILE%\Local Settings\Application Data\LoRd_MuldeR", if you really need this folder at this location and don't want to trust temporary variable.
Yes, of course I could do that. But I want to avoid OS-specific code paths as much as possible. This easily creates bugs, which are hard to identify/reproduce...
__________________
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 7th March 2011, 23:39   #194  |  Link
mariush
Registered User
 
Join Date: Dec 2008
Posts: 590
In Windows, the correct way to do it is to actually use GetTempPath() ... It's designed to return the go through these one after another:

1. TMP
2. TEMP
3. User profile env. variable
4. The Windows folder

You're right, though, they're not guaranteed to be valid, even the example for this API function mentions it: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
However, it's your job to test if the folder actually exists and you can write in it, and only then if it fails, go on and use your own location.

The reason is because there are quite a few particularities and reasons why the TMP and TEMP variables are used - one I can mention from the top of my head is for example this one, where depending on how someone configures Remote Desktop, you get a different temporary folder *on purpose* : http://blogs.msdn.com/b/oldnewthing/.../10119675.aspx

If everything fails, I guess you can always fall back to Application Data and you to be careful which one to pick, because there's two of them: http://blogs.msdn.com/b/oldnewthing/...01/434647.aspx . You can use SHGetFolderLocation with the right CLSID to determine the paths: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx


and btw, the correct wording is actually directory, because "folders" are a virtual thing (but encapsulate regular directories): http://blogs.msdn.com/b/oldnewthing/.../10129908.aspx
mariush is offline   Reply With Quote
Old 7th March 2011, 23:58   #195  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by mariush View Post
However, it's your job to test if the folder actually exists and you can write in it, and only then if it fails, go on and use your own location.
That sounds like feasible solution, although it adds some more complexity.

Quote:
Originally Posted by mariush View Post
The reason is because there are quite a few particularities and reasons why the TMP and TEMP variables are used - one I can mention from the top of my head is for example this one, where depending on how someone configures Remote Desktop, you get a different temporary folder *on purpose* : http://blogs.msdn.com/b/oldnewthing/.../10119675.aspx
Well, writing my stuff to a sub-directory inside the 'application data' directory should always be admissible.

(Google's installers even install the complete application there )

Quote:
Originally Posted by mariush View Post
If everything fails, I guess you can always fall back to Application Data and you to be careful which one to pick, because there's two of them: http://blogs.msdn.com/b/oldnewthing/...01/434647.aspx . You can use SHGetFolderLocation with the right CLSID to determine the paths: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
Actually I use SHGetKnownFolderPath(), if available, as SHGetFolderPath() and SHGetFolderLocation() have been deprecated since Vista.

Quote:
Originally Posted by mariush View Post
and btw, the correct wording is actually directory, because "folders" are a virtual thing (but encapsulate regular directories): http://blogs.msdn.com/b/oldnewthing/.../10129908.aspx
__________________
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 8th March 2011, 01:00   #196  |  Link
John_J
Registered User
 
John_J's Avatar
 
Join Date: Nov 2010
Posts: 14
Quote:
Originally Posted by mariush View Post
and btw, the correct wording is actually directory, because "folders" are a virtual thing (but encapsulate regular directories): http://blogs.msdn.com/b/oldnewthing/.../10129908.aspx
Now, it goes really the pedantic way...

I'll write a VB script for my personal use to start LameXP and clean up directories afterwards.

Anyways, keep on the excellent work and I hope to see your website back online, soon!

Regards,
JohnJ
John_J is offline   Reply With Quote
Old 8th March 2011, 01:14   #197  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by John_J View Post
Now, it goes really the pedantic way...

I'll write a VB script for my personal use to start LameXP and clean up directories afterwards.

Anyways, keep on the excellent work and I hope to see your website back online, soon!

Regards,
JohnJ
I just changed the function like mariush suggested:
LameXP will now try the directory pointed to by %TMP% first and it will only fall back to "%LOCALAPPDATA%\Temp" if the former doesn't exist or isn't writable.

See for details:
http://lamexp.git.sourceforge.net/gi...e6330adf4b4600

Hopefully this will make everybody happy, finally
__________________
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; 8th March 2011 at 01:20.
LoRd_MuldeR is offline   Reply With Quote
Old 8th March 2011, 01:35   #198  |  Link
John_J
Registered User
 
John_J's Avatar
 
Join Date: Nov 2010
Posts: 14
Quote:
Originally Posted by LoRd_MuldeR View Post
LameXP will now try the directory pointed to by %TMP% first and it will only fall back to "%LOCALAPPDATA%\Temp" if the former doesn't exist or isn't writable
...
Hopefully this will make everybody happy, finally
Yes, indeed it does! Thank you very much!
John_J is offline   Reply With Quote
Old 9th March 2011, 05:39   #199  |  Link
Romario
Registered User
 
Romario's Avatar
 
Join Date: Dec 2005
Location: Qetchua mountains in Peru, and Klingon battlecruiser D'Mar
Posts: 393
Thank you for newest snapshot,but, where is changelog ???
__________________
Live long and prosperLive long and prosperLive long and prosper
Romario is offline   Reply With Quote
Old 9th March 2011, 11:59   #200  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by Romario View Post
Quote:
Originally Posted by LoRd_MuldeR View Post
Thank you for newest snapshot,but, where is changelog ???
Changelog.html

And if you need even more details, you may look at the GIT repository's commit log:
http://gitorious.org/lamexp/lamexp/commits/master
__________________
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; 9th March 2011 at 16:02.
LoRd_MuldeR 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 14:14.


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