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 12th May 2014, 11:18   #1001  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,776
I have a little question.
Even if the answer seems to be "no", i just want to be sure.
Is it possible to make 5.1 FLAC with LameXP ?
jpsdr is offline   Reply With Quote
Old 12th May 2014, 14:37   #1002  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by jpsdr View Post
Is it possible to make 5.1 FLAC with LameXP ?
Sure, why not?

LameXP is just a front-end, so if you feed it with a 5.1 source, it will send your 5.1 source to the FLAC encoder and thus create a 5.1 FLAC file.

Actually what is not currently possible is creating a Stereo or Mono FLAC file from a 5.1 channel source...
__________________
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; 12th May 2014 at 17:28.
LoRd_MuldeR is offline   Reply With Quote
Old 12th May 2014, 16:46   #1003  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,776
... Ok. Interesting, but i'll ask differently, to precisely explain what i have i mind, because i think you're not telepath, and so can't guess...
Is it possible with LameXP to create a 5.1 FLAC file from 6 wav files ?
If yes, how ?
Before asking, i've just take a look at the 'user manual'... very interesting... ^_^
Not found any clue in the FAQ.

Edit :
If i understand the links you can feed directly .dts, interesting to know.
Is it possible also to feed directly .dtshd ?
(But i think in this cases eac3to can also do it...)

What i truly want to know, it's if i have to decode a DTSHD-MA or a THD file into wave files, edit these files (cuting or anything), having finaly 6 new wave files, is it possible to use LameXP to create a 5.1 FLAC file from these ?

Last edited by jpsdr; 12th May 2014 at 16:56.
jpsdr is offline   Reply With Quote
Old 12th May 2014, 16:54   #1004  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,514
Quote:
Originally Posted by jpsdr View Post
Is it possible with LameXP to create a 5.1 FLAC file from 6 wav files ?
In short, no!

But you can generate a 5.1Ch FLAC file from a 'single' 5.1(6)Ch PCM.wav file
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 12th May 2014, 17:20   #1005  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by jpsdr View Post
Is it possible with LameXP to create a 5.1 FLAC file from 6 wav files ?
Nope. Currently each input file is considered a separate encoding job. So we have an 1:1 input file to output file mapping.

Quote:
Originally Posted by jpsdr View Post
What i truly want to know, it's if i have to decode a DTSHD-MA or a THD file into wave files, edit these files (cuting or anything), having finaly 6 new wave files, is it possible to use LameXP to create a 5.1 FLAC file from these ?
Nope. You either need to process the DTS file directly or combine your 1ch Wave files to a single 6ch file before processing them with LameXP.

Quote:
Originally Posted by jpsdr View Post
Is it possible also to feed directly .dtshd ?
Should be possible as long as MediaInfo can detect it and as long as Valdec (AC3Filter) can decompress it. Just give it a try
__________________
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; 12th May 2014 at 17:23.
LoRd_MuldeR is offline   Reply With Quote
Old 13th May 2014, 11:01   #1006  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,776
Ok, thanks for your answers.
jpsdr is offline   Reply With Quote
Old 19th May 2014, 20:12   #1007  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
LameXP v4.10 RC1:

Quote:
Changes between v4.09 and v4.10 [unreleased]:
* Upgraded build environment to Microsoft Visual Studio 2013 with Update-2
* Updated Qt runtime libraries to v4.8.6 (2014-04-25), compiled with MSVC 12.0
* Updated Opus libraries v1.1.x and Opus-Tools v0.1.8 to latest Git Master (2014-04-13)
* Updated MediaInfo to v0.7.69 (2014-04-26), compiled with ICL 14.0 and MSVC 12.0
* Updated mpg123 decoder to v1.19.0 (2014-03-08), compiled with GCC 4.8.2
* Fixed a bug that could cause the cover artwork to be lost under certain circumstances
* Added command-line options to adjust the LameXP font size (see FAQ doc for details)
If you find any showstopper bugs, then please report NOW
__________________
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; 30th May 2014 at 19:23.
LoRd_MuldeR is offline   Reply With Quote
Old 25th May 2014, 15:29   #1008  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 706
LoRd_MuldeR I notice now, but with Lame, on High Quality, q shouldn't be 2?
PHP Code:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

C:/Users/xxx/AppData/Local/Temp/a24c3764c4bbc8e6/lxp_flac.exe ----o C:\Users\xxx\AppData\Local\Temp\a24c3764c4bbc8e6\c1440c995af24db9.wav "C:\xxx.flac"

flac 1.3.0Copyright (C2000-20092011-2013 Josh Coalson Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY
This is free software, and you are
welcome to redistribute it under certain conditions
Type `flac' for details.
done

Exited with code: 0x0000

-------------------------------

C:/Users/xxx/AppData/Local/Temp/a24c3764c4bbc8e6/lxp_sox.exe --i C:/Users/xxx/AppData/Local/Temp/a24c3764c4bbc8e6/c1440c995af24db9.wav

Input File : 'C:/Users/xxx/AppData/Local/Temp/a24c3764c4bbc8e6/c1440c995af24db9.wav'
Channels : 2
Sample Rate : 44100
Precision : 16-bit
Duration : 00:04:35.48 = 12148668 samples = 20661 CDDA sectors
File Size : 48.6M
Bit Rate : 1.41M
Sample Encoding: 16-bit Signed Integer PCM

Exited with code: 0x0000

-------------------------------

C:/Users/xxx/AppData/Local/Temp/a24c3764c4bbc8e6/lxp_lame.exe --nohist -q 3 --abr 128 C:\Users\xxx\AppData\Local\Temp\a24c3764c4bbc8e6\c1440c995af24db9.wav "C:\xxx.mp3"

LAME 3.99.5 32bits (http://lame.sf.net)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding C:\Users\xxx\AppData\Local\Temp\a24c3764c4bbc8e6\c1440c995af24db9.wav
to C:\xxx.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) average 128 kbps qval=3
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
Writing LAME Tag...done
ReplayGain: -7.9dB

Exited with code: 0x0000 
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 25th May 2014, 17:06   #1009  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by Motenai Yoda View Post
LoRd_MuldeR I notice now, but with Lame, on High Quality, q shouldn't be 2?
Nope. The LAME default is "-q3" now, which also is the default in LameXP, aka "High Quality".

The LAME CLI help seems to be a bit outdated here (it claims the default is "-q5"), but you can see the up-to-date documentation here:
http://lame.cvs.sourceforge.net/view...etailed.html#q

Especially note that with the "new" VBR mode, which is the default since LAME 0.98, there are only three quality "levels" anyway:

Code:
-q 0 to -q 4	include all features of the other modes and additionally use the best search when applying Huffman coding.
-q 5 and -q 6	include all features of -q7, calculate and consider actual quantisation noise, and additionally enable subblock gain.
-q 7 to -q 9	This level uses a psymodel but does not calculate quantisation noise when encoding: it takes a quick guess.
For example: You can easily check with MediaInfo that any setting in the "-q0" to "-q4" range will actually result in "-q0"
__________________
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; 25th May 2014 at 18:23.
LoRd_MuldeR is offline   Reply With Quote
Old 25th May 2014, 18:58   #1010  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 706
Quote:
Originally Posted by LoRd_MuldeR View Post
Nope. The LAME default is "-q3" now, which also is the default in LameXP, aka "High Quality".

The LAME CLI help seems to be a bit outdated here, but you can see the up-to-date documentation here:
http://lame.cvs.sourceforge.net/view...etailed.html#q
but -h still set -q 2

Quote:
Originally Posted by LoRd_MuldeR View Post
Especially note that with the "new" VBR mode, which is the default since LAME 0.98, there are only three quality "levels" anyway:
0.98 was relased years before this project began.

Quote:
Originally Posted by LoRd_MuldeR View Post
Code:
-q 0 to -q 4	include all features of the other modes and additionally use the best search when applying Huffman coding.
-q 5 and -q 6	include all features of -q7, calculate and consider actual quantisation noise, and additionally enable subblock gain.
-q 7 to -q 9	This level uses a psymodel but does not calculate quantisation noise when encoding: it takes a quick guess.
For example: You can easily check with MediaInfo that any setting in the "-q0" to "-q4" range will actually result in "-q0"
MediaInfo says
Code:
Formato                                 : MPEG Audio
Dimensione                              : 4,11MiB
Durata                                  : 4min 35s
Modo bitrate generale                   : Variabile
Bitrate totale                          : 125 Kbps
Compressore                             : LAME3.99r

Audio
Formato                                 : MPEG Audio
Versione formato                        : Version 1
Profilo formato                         : Layer 3
Modo                                    : Joint stereo
Estensione modo                         : MS Stereo
Durata                                  : 4min 35s
Modalità bitrate                        : Variabile
Bitrate                                 : 128 Kbps
Canali                                  : 2 canali
Frequenza campionamento                 : 44,1 KHz
Modo compressione                       : Con perdita
Dimensione della traccia                : 4,11MiB (100%)
Compressore                             : LAME3.99r
Impostazioni compressione               : -m j -V 4 -q 3 -lowpass 17 --abr 128
so for abr, cbr, and vbr_old q is the same as ever?
__________________
powered by Google Translator

Last edited by Motenai Yoda; 25th May 2014 at 19:02.
Motenai Yoda is offline   Reply With Quote
Old 25th May 2014, 19:27   #1011  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by Motenai Yoda View Post
but -h still set -q 2
Yes, I think so. Even though, to my understanding, setting "-q2" makes zero difference compared to the default.

At least for (new) VBR mode - which is what most users should be using most of the time.

Furthermore, since the default is "-q3" for all RC modes in current LAME, the default value in LameXP is consistent with LAME's default.

Quote:
Originally Posted by Motenai Yoda View Post
0.98 was relased years before this project began.


AFAIK, LAME v3.98 was released on July 4 2008 (changelog), while the first version of LameXP was released around 2004 (and used something like LAME v3.93).

Also I'm not quite sure how this is releated...

Quote:
Originally Posted by Motenai Yoda View Post
so for abr, cbr, and vbr_old q is the same as ever?
Yes, just as described in the documentation:
http://lame.cvs.sourceforge.net/view...etailed.html#q

(Note that there are two separate tables)
__________________
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; 25th May 2014 at 23:33.
LoRd_MuldeR is offline   Reply With Quote
Old 25th May 2014, 23:51   #1012  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 706
Quote:
Originally Posted by LoRd_MuldeR View Post


AFAIK, LAME v3.98 was released on July 4 2008 (changelog), while the first version of LameXP was released around 2004 (and used something like LAME v3.93).

Also I'm not quite sure how this is releated...
1- I'm an idiot.
2- why all this time only with the latest versions there was this change?

Quote:
Originally Posted by LoRd_MuldeR View Post
Yes, just as described in the documentation:
http://lame.cvs.sourceforge.net/view...etailed.html#q

(Note that there are two separate tables)
Those docs is somewhat ambiguous, for vbr_new table depict the various levels, but the table for other modes only describes the various degrees of q, but it's the same q as 3.97 and older...

but if -q 2 doesn't change anything for vbr_new, but does and is still recommended for the other modes, why not set -q 2 instead of -q 3 with high quality?
__________________
powered by Google Translator

Last edited by Motenai Yoda; 25th May 2014 at 23:53.
Motenai Yoda is offline   Reply With Quote
Old 26th May 2014, 00:23   #1013  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by Motenai Yoda View Post
2- why all this time only with the latest versions there was this change?
Well, because originally the LameXP code had been written following LAME's command-line help:

Code:
-q <arg>        <arg> = 0...9.  Default  -q 5
                -q 0:  Highest quality, very slow
                -q 9:  Poor quality, but fast
-h              Same as -q 2.   Recommended.
-f              Same as -q 7.   Fast, ok quality
So, at some point in LAME history, LAME's default apparently was "-q5", though the developers recommended using "-q2" (aka "-h").

Consequently, back at that time, making "-q5" the default of LameXP didn't seem like a good idea, even though it was LAME's default. Therefore, I decided to have a "-q2" setting and make that the default (as recommended).

However when I revisited the LameXP code (and studied the LAME documentation) later, I noticed that the LAME command-line help is actually outdated!

Current LAME versions use "-q3" as default. And they make no difference between "-q0" and "-q4" for the default (new) VBR mode anyway. Hence I decided to make LameXP more consistent with up-to-date LAME.


Quote:
Originally Posted by Motenai Yoda View Post
Those docs is somewhat ambiguous, for vbr_new table depict the various levels, but the table for other modes only describes the various degrees of q, but it's the same q as 3.97 and older...
I think the tables are quite clear. One is for everything except "new" VBR (which includes CBR, ABR and "old" VBR), and one is exclusively for "new" VBR.

(Yes, the table for the "old" modes also summarizes several values in a single row. But from the description it's clear they are not the same, e.g. "decreasing precision of parameters the further from -q 0")


Quote:
Originally Posted by Motenai Yoda View Post
but if -q 2 doesn't change anything for vbr_new, but does and is still recommended for the other modes, why not set -q 2 instead of -q 3 with high quality?
Well, because "-q3" is LAME's default. And so I though that it might be a good idea to make LameXP's default consistent with LAME's default as well as the LAME documentation.

Also I certainly do not want to expose all the possible "-q" values in LameXP - especially because most of these values are actually the same with "new" VBR.

Consequently, I decided to break it down to only four distinct "quality" modes in LameXP: 0 (when speed doesn't matter), 3 (the LAME default setting), 7 (fast setting with "okay" quality) and 9 (when only speed matters).

This decision isn't fixed. But, up to now, nobody has ever complained or made a better suggestion

BTW: You are right that for the "new" VBR mode it doesn't matter whether we use "-q3" or "-q2", but for the other modes I wanted "-q3" to be the default. And if we have "-q3" already, I didn't want to have "-q2" 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; 26th May 2014 at 00:48.
LoRd_MuldeR is offline   Reply With Quote
Old 27th May 2014, 18:38   #1014  |  Link
porcupene
Registered User
 
Join Date: Mar 2012
Posts: 5
error when choosing overwrite

Maybe this needs to be addressed.

I'm doing flac to flac conversion. If I choose "Overwrite existing files" in the advanced options I get an error for each file, the originals are deleted and no files are converted. I just lose the original files.
This does not happen if I chose to save the converted files to a different folder. It seems the program first deletes the originals and then it tries to convert files that are no longer there.
It happens every time.



Version 4.09 final
Win7 64
porcupene is offline   Reply With Quote
Old 27th May 2014, 22:08   #1015  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by porcupene View Post
Maybe this needs to be addressed.

I'm doing flac to flac conversion. If I choose "Overwrite existing files" in the advanced options I get an error for each file, the originals are deleted and no files are converted. I just lose the original files.
This does not happen if I chose to save the converted files to a different folder. It seems the program first deletes the originals and then it tries to convert files that are no longer there.
It happens every time.



Version 4.09 final
Win7 64
Hi, porcupene.

If you run LameXP in "overwrite existing files" mode and the output file actually does exist already, then LameXP will try to delete that file. If successful, the output file can be saved to the location of the old/deleted file. Otherwise it can't. Now, if the file was successfully deleted, but the subsequent conversion fails, there won't be any file left, obviously. But the actual important question here is why your conversion has failed. So please post your log file...
__________________
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 May 2014 at 22:17.
LoRd_MuldeR is offline   Reply With Quote
Old 27th May 2014, 22:43   #1016  |  Link
porcupene
Registered User
 
Join Date: Mar 2012
Posts: 5
Here follows the error output:

Quote:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

Target output file already exists, going to delete existing file:
M:\BMF\1.flac

C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/lxp_flac.exe -d -F -f -o C:\Users\balaban\AppData\Local\Temp\c900e9a58ccecfa7\a40358720d579be0.wav M:\BMF\1.flac

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
1.flac: ERROR while decoding metadata
state = FLAC__STREAM_DECODER_END_OF_STREAM

Exited with code: 0x0001
And for comparison the OK output for the same file once I switch to saving to a different folder.

Quote:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/lxp_flac.exe -d -F -f -o C:\Users\balaban\AppData\Local\Temp\c900e9a58ccecfa7\065b18cc3f56ed67.wav M:\BMF\1.flac

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
done

Exited with code: 0x0000

-------------------------------

C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/lxp_sox.exe --i C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/065b18cc3f56ed67.wav

Input File : 'C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/065b18cc3f56ed67.wav'
Channels : 2
Sample Rate : 44100
Precision : 16-bit
Duration : 00:05:33.69 = 14715876 samples = 25027 CDDA sectors
File Size : 58.9M
Bit Rate : 1.41M
Sample Encoding: 16-bit Signed Integer PCM

Exited with code: 0x0000

-------------------------------

C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/lxp_flac.exe -8 --channel-map=none -T "xxxxxxxxxxxxxxxx" -T "artist=xxxxxxxxxxxxxx" -T "album=xxxxxxxxxxxxxxx" -T genre=Vocal -T "comment=Encoded with LameXP" -T date=1995 -T track=1 -f -o M:\BMF\BMA\1.flac C:\Users\balaban\AppData\Local\Temp\c900e9a58ccecfa7\065b18cc3f56ed67.wav

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
wrote 32676327 bytes, ratio=0.555

Exited with code: 0x0000
So does it delete the flac before converting to a temporary wav file?

Last edited by porcupene; 27th May 2014 at 22:45. Reason: Needed to add a question.
porcupene is offline   Reply With Quote
Old 28th May 2014, 02:25   #1017  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by porcupene View Post
Here follows the error output:

Quote:
C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/lxp_flac.exe -d -F -f -o C:\Users\balaban\AppData\Local\Temp\c900e9a58ccecfa7\a40358720d579be0.wav M:\BMF\1.flac
[...]
1.flac: ERROR while decoding metadata
state = FLAC__STREAM_DECODER_END_OF_STREAM
Exited with code: 0x0001
Quote:
C:/Users/balaban/AppData/Local/Temp/c900e9a58ccecfa7/lxp_flac.exe -d -F -f -o C:\Users\balaban\AppData\Local\Temp\c900e9a58ccecfa7\065b18cc3f56ed67.wav M:\BMF\1.flac
[...]
Exited with code: 0x0000
So your first log clearly shows that FLAC failed in the decoding step. This indicates that you have a broken/unsupported input FLAC file.

Note that the target output file (and therefore the "overwrite" mode) does not effect this step at all! That's because the job didn't even get to the encoding step!

Strangely, in your second log, the 100% identical command has succeeded, apparently. So the input FLAC file must have changed in the meantime...

(Either that, or the phase of the moon )


Quote:
Originally Posted by porcupene View Post
So does it delete the flac before converting to a temporary wav file?
Yes. Even before the encoding job is started.

Be aware that the input and output file are parameters of the encoding job, (passed in the constructor. So they are determined at the moment when the new job is about to be created.

In order to "overwrite", we must delete the existing file first. If, and only if, that succeeded, we can use the (no longer) existing file's path as the output file for the new job.
__________________
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; 28th May 2014 at 02:38.
LoRd_MuldeR is offline   Reply With Quote
Old 28th May 2014, 06:57   #1018  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,452
The reason the second succeeded is because a wav file exists, but it's just a header with zero data. A new empty flac file may or may not exist, either way it signaled some sort of spurious success. That's computers for you. The only way to check would be to decode both and ensure they're the same length, which LameXp never does.

Overall, overwriting the original files seems more dangerous than it's worth. Don't do it unless you're so space limited that you have no choice. (Might be a good idea to call this out as dangerous in the UI, most people won't realize that.)
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 28th May 2014, 13:09   #1019  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,073
Quote:
Originally Posted by foxyshadis View Post
The reason the second succeeded is because a wav file exists, but it's just a header with zero data. A new empty flac file may or may not exist, either way it signaled some sort of spurious success.
Huh?

Note that each conversion job consists of (at least) two phases: The decoding phase and the encoding phase. We are talking about the decoding phase here. In this phase, LameXP will decode the original input file (a FLAC file in this case) to a temporary WAV file. This temporary WAV file will never exist before. LameXP generates a random file name in its TEMP directory for this purpose and even makes sure the file really does not exist yet. The "overwrite existing file" option has absolutely no effect in this phase! It does have an effect only on the final encoding phase (where LameXP encodes from the temporary WAV to the target output file), but we didn't even get to this point, in the case where the job failed.

And indeed, if you look at his two logs, you'll notice that both logs start with the exactly same FLAC decoding command (except for the randomly generated TEMP file name, of course). The "strange" thing is that the identical command has failed in his first log, but apparently has succeeded in the second log. In the first log, FLAC rejected his input file. In the second log it didn't. This can only mean the original input FLAC file has changed in the meantime. Either that, or FLAC has some strange bug that triggers depending on the phase of moon. Or some buggy anti-virus software has interfered with FLAC (wouldn't be the first time). But it's impossible to say from here...

(Just to make it clear: The "overwrite existing file" option does not touch the original input file at all. Instead, it overwrites the target output file, if such file happens to already exist in the selected output directory)

Quote:
Originally Posted by foxyshadis View Post
Overall, overwriting the original files seems more dangerous than it's worth. Don't do it unless you're so space limited that you have no choice.
I perfectly agree with you. But the "overwrite existing file" option has been requested by users. It's not enabled by default. And there's a fat warning, when you select this option.
__________________
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; 28th May 2014 at 16:03.
LoRd_MuldeR is offline   Reply With Quote
Old 29th May 2014, 07:08   #1020  |  Link
porcupene
Registered User
 
Join Date: Mar 2012
Posts: 5
Ok...

First ... if I'm annoying anyone with my silly error I'll stop

If not, here goes:

I use AVG and I disabled it temporarily, nothing changed.

It turns out it's not only FLAC but it happens also with mp3 and ogg (I suspect all the other encoders too). I know it's pointless to convert mp3 to mp3 but I just wanted to check the functionality.

So if I choose to save the files in the same folder and "Overwrite existing files" and do mp3 to mp3 or ogg to ogg conversion this happens:

Quote:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

Target output file already exists, going to delete existing file:
M:\BMF\1.mp3

C:/Users/balaban/AppData/Local/Temp/af3619121cd06397/lxp_lame.exe --nohist -q 0 -V 0 -m s M:\BMF\1.mp3 M:\BMF\1.mp3

Input file and Output file are the same. Abort.

Exited with code: 0xFFFFFFFF
or for ogg:

Quote:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

Target output file already exists, going to delete existing file:
M:\BMF\2.ogg

C:/Users/balaban/AppData/Local/Temp/af3619121cd06397/lxp_oggdec.exe -w C:\Users\balaban\AppData\Local\Temp\af3619121cd06397\fc2d59288aef2cda.wav M:\BMF\2.ogg

OggDec v1.9.7 (libVorbis 1.3.2), Compiled on: Dec 27 2010
Input M:\BMF\2.ogg does not appear to be an Ogg bitstream.
********** Done decoding all input files. **********

Exited with code: 0x0000
And here is the ok output once I choose to save to a different folder:

Quote:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

C:/Users/balaban/AppData/Local/Temp/af3619121cd06397/lxp_lame.exe --nohist -q 0 -V 0 -m s M:\BMF\1.mp3 M:\BMF\BMA\1.mp3

LAME 3.99.5 32bits (http://lame.sf.net)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
polyphase lowpass filter disabled
Encoding M:\BMF\1.mp3 to M:\BMF\BMA\1.mp3
Encoding as 44.1 kHz stereo MPEG-1 Layer III VBR(q=0)
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
Writing LAME Tag...done
ReplayGain: -4.3dB

Exited with code: 0x0000
and for ogg:

Quote:
LameXP v4.09 (Build #1524), compiled on 2014-01-26 at 18:20:04

-------------------------------

C:/Users/balaban/AppData/Local/Temp/af3619121cd06397/lxp_oggdec.exe -w C:\Users\balaban\AppData\Local\Temp\af3619121cd06397\1190288fb69d1bc3.wav M:\BMF\2.ogg

OggDec v1.9.7 (libVorbis 1.3.2), Compiled on: Dec 27 2010
Encoder Version: 0
Serial Number: 18706
Bitstream is 2 channel, 44100Hz
Scale = 1.0000
Decoded length: 14004984 samples = 5:17 mins.
Encoded by: AO; aoTuV [20110424] (based on Xiph.Org's libVorbis)
Decoding: M:\BMF\2.ogg
********** Done decoding all input files. **********

Exited with code: 0x0000

-------------------------------

C:/Users/balaban/AppData/Local/Temp/af3619121cd06397/lxp_oggenc2.exe -q 9 -o M:\BMF\BMA\2.ogg C:\Users\balaban\AppData\Local\Temp\af3619121cd06397\1190288fb69d1bc3.wav

Opening with wav module: WAV file reader
Encoding "C:\Users\balaban\AppData\Local\Temp\af3619121cd06397\1190288fb69d1bc3.wav" to
"M:\BMF\BMA\2.ogg"
at quality 9.00
Done encoding file "M:\BMF\BMA\2.ogg"
File length: 5m 17.0s
Elapsed time: 0m 08.0s
Rate: 39.6967
Average bitrate: 329.9 kb/s

Exited with code: 0x0000
I did read the warning the program gives if I choose "Overwrite existing files" but is says I will loose the original file not both

Far be it from me to criticize this great program which I have used a long time but could it not just first save the wav file to a temporary folder and then and only then check if the target file already exists so it can safely be deleted?
porcupene 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 20:16.


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