Skip to main content
Topic: Convert FLAC to mp3 errors (Read 6937 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Convert FLAC to mp3 errors

Windows 7 64-bit.
Quad-core processor (Core i5-750).
Foobar2000 v1.0.
Online Troubleshooter shows no problematic components.
Installed components:
Code: [Select]
Core (2010-01-09 11:47:00)
    foobar2000 core 1.0
foo_albumlist.dll (2010-01-09 11:44:46)
    Album List 4.4
foo_cdda.dll (2010-01-09 11:44:42)
    CD Audio Decoder 3.0
foo_converter.dll (2010-01-09 11:44:32)
    Converter 1.4
foo_fileops.dll (2010-01-09 11:43:32)
    File Operations 2.1.2
foo_freedb2.dll (2010-01-09 11:43:34)
    freedb Tagger 0.6.2
foo_input_std.dll (2010-01-09 11:44:24)
    Standard Input Array 1.0
foo_rgscan.dll (2010-01-09 11:44:24)
    ReplayGain Scanner 2.0.9
foo_ui_std.dll (2010-01-09 11:44:52)
    Default User Interface 0.9.5

Converting a set of FLAC files to mp3 results in errors, such as the following:

Code: [Select]
Source: "source1.flac"
  An error occurred while finalizing the encoding process (Sharing violation) : "output1.mp3"
  Conversion failed: Sharing violation

Source: "source2.flac"
  An error occurred while finalizing the encoding process (The file is corrupted) : "output2.mp3"
  Conversion failed: The file is corrupted

I can verify that all source files are good by testing with FLAC.  All the mp3 output files appear to get written and are playable.  Not all files produce errors.

The errors are different on every conversion run against the same set of files: different number of errors, different files producing errors, different error messages for each file.

Conversion is done using Foobar's standard setting for MP3 (LAME), V2, fast.  Exactly the same errors occur when using a custom setting such as 'lame.exe -S --noreplaygain --preset standard - %d'.

Restricting the Foobar process to a single core did not solve the problem.  If anything the number of errors seems to be higher using only a single core to serialize the conversion.

Any help would be appreciated.

Convert FLAC to mp3 errors

Reply #1
Is there an embedded as well as an external cuesheet? If yes, search for that in this forum, you will find an answer.

Convert FLAC to mp3 errors

Reply #2
Thanks for the reply.

There is no cue sheet at all, either embedded or external.  I am just selecting a set of files from my Foobar music library and running a convert on the selection.


Convert FLAC to mp3 errors

Reply #4
The symptoms certainly look similar there.  My destination folder is not in Foobar's library though.  I have also tested it with both source and destination outside the Foobar libary with the same errors.

The thread that one links to looks interesting as I have seen the destination partition marked as dirty and scanned at startup.  This disk works flawlessly for all other applications though, including transcoding multi-gigabyte video files, so a disk problem seems extremely unlikely.

Convert FLAC to mp3 errors

Reply #5
Same problem here.

If I convert again the flac file with the error it seems to work! I don't know why!


Convert FLAC to mp3 errors

Reply #6
I have seen a couple of other threads reporting what sound like the same problem, but so far no solutions.  Since this is one of the primary reasons I use Foobar, I would really like to see it fixed.  If somebody can talk me through what diagnostics are required, I am happy to collect information to help find a fix.  Anyone?

Convert FLAC to mp3 errors

Reply #7
Well "The file is corrupted" message is used for filesystem errors, there is not much chance that a puny user-level application like foobar2000 could cause them:
ERROR_CRC - Data error (cyclic redundancy check).
ERROR_FILE_CORRUPT - The file or directory is corrupted and unreadable.
ERROR_DISK_CORRUPT - The disk structure is corrupted and unreadable.

Is it a local/remote, internal/external, harddisk/SSD drive?
Is the computer overclocked?
Do you use any antivirus software?
Or rootkits?
Full-quoting makes you scroll past the same junk over and over.

Convert FLAC to mp3 errors

Reply #8
Well "The file is corrupted" message is used for filesystem errors, there is not much chance that a puny user-level application like foobar2000 could cause them:
ERROR_CRC - Data error (cyclic redundancy check).
ERROR_FILE_CORRUPT - The file or directory is corrupted and unreadable.
ERROR_DISK_CORRUPT - The disk structure is corrupted and unreadable.

Is it a local/remote, internal/external, harddisk/SSD drive?
Is the computer overclocked?
Do you use any antivirus software?
Or rootkits?

The target drive is an internal hard-disk.  In a couple of years of usage no other application or usage has produced any kind of error on this disk.  The only thing that has exhibited any kind of error is the conversion from flac to mp3 in recent versions of foobar on Windows 7 64-bit.

The processor is not overclocked.  I do use antivirus software.  The machine has been virus scanned recently and is clean.

Convert FLAC to mp3 errors

Reply #9
An update on this problem...

I just tried a few FLAC to mp3 album conversions to various targets:
  • Internal hard-disk
  • Internal SSD
  • Network drive

These conversions produced no errors.

I am still using exactly the same version of Foobar as before, when I was seeing problems.  The only things that have changed on this system are:
  • All Windows 7 patches released since I reported the problem applied.
  • Anti-virus switched from Kaspersky to Microsoft Security Essentials.

Could this have been a Windows 7 bug or anti-virus problem?  I will post again if the problem recurs.

Convert FLAC to mp3 errors

Reply #10
Well I've done some more searching and unfortunately, this is a known bug in Windows 7 NTFS driver, which surfaces when two or more applications try to access one file at once in a certain way (see here or here for details).
Quote
In previous versions of Windows, if two applications, such as a virus scanner and Subversion, were to attempt to access the same file, one would get an "Access Denied" error, which that application could then notice and use to retry the access later. Windows 7, in contrast, emits a "File Corrupted" error in this same scenario.
In your case, it's probably the MSE, which is still scanning the file when fb2k is going to rename it. I think there is a loop for retrying after a short delay, but only when the rename operation fails with some known errors, definitely not after something as severe as the filesystem-level "File corrupted" error. Well, severe, at least in its normal occurrence...

Good news is that Microsoft officially accepts this as a bug and will release a patch for it eventually.
Full-quoting makes you scroll past the same junk over and over.

Convert FLAC to mp3 errors

Reply #11
That's really useful information, thanks.  In my case it seems the culprit must have been Kaspersky anti-virus, since conversion is working OK now that I am using MSE instead.

Convert FLAC to mp3 errors

Reply #12
I am having this exact same problem, I use Kaspersky IS 2010 but disableing file and program protection doesn't seem to help a whole lot, I still get Sharing violation errors.
Im using foobar 0.9.6.9 and converting to an internal drive with this lame switch setup:
"-V 0 --vbr-new --add-id3v2 --ignore-tag-errors --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d"

Convert FLAC to mp3 errors

Reply #13
Quote
Im using foobar 0.9.6.9 and converting to an internal drive with this lame switch setup:
"-V 0 --vbr-new --add-id3v2 --ignore-tag-errors --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d"

BTW, this settings are probably for EAC, not for foobar2000.

Convert FLAC to mp3 errors

Reply #14
Yirkha,

So, in short, and in layman's terms, what's the recommended way of preventing this bug from being tripped in Win7?

Thanks so much for figuring this out.

a.k.a.

Convert FLAC to mp3 errors

Reply #15
There is no way to avoid it 100%, I'm afraid.
Off the top of my head, you could try to do the following to lessen the probability of simultaneous conflicting access to one file:
* Disable background antivirus/malware scanners (edit: temporarily! of course)
* Make sure you don't have the target folder opened in an Explorer window or elsewhere
* Don't convert to a place inside foobar2000's watched Media Library folders (or any similar concept of other programs, like media managers, file sharers, etc.)
Full-quoting makes you scroll past the same junk over and over.

Convert FLAC to mp3 errors

Reply #16
The problem still persists, the only way I can get it to work is converting it again and again until there is no more errors.

Convert FLAC to mp3 errors

Reply #17
I am seeing the same issue on Windows 7 Home Premium 64-bit with foobar2000 1.1.5.
Basically when I convert a flac album to mp3 I will get one or more files with the following error message for example:

Source: "D:\Users\peter\Music\Lossless\Warren Zevon\Life'll Kill Ya\1-12 Don't Let Us Get Sick.flac"
  An error occurred while finalizing the encoding process (The file is corrupted) : "D:\Users\peter\Desktop\12 Don't Let Us Get Sick.mp3"
  Conversion failed: The file is corrupted


I then have to reconvert the offending files (sometime several times) until I get no errors. I have found that pausing my Kaspersky Internet Security 2011 seems to stop the issue from occurring. KIS2011 can then be resumed once the conversion is complete. A bug fix from MS would be nice though.

Convert FLAC to mp3 errors

Reply #18
According to this the bug has been fixed, and is including in SP1 for Windows 7. I've downloaded and installed SP1 and so far have been unable to replicate the issue - I have been converting a flac album to mp3 with Kaspersky Internet Security 2011 running and have gotten no file corrupted error messages.

 
SimplePortal 1.0.0 RC1 © 2008-2019