PDA

View Full Version : Error when encoding wav. to flac. with Traders' Little Helper


migrantwing
2008-08-09, 04:22 PM
I have just received some new material (wav. format) and set about encoding to flac. with Traders' Little Helper so I could put them up on TTD at some point over the weekend. Everything was going well until I noticed a few of the files come up with the error 'Truncated files or otherwise corrupt'

Anyone know what is the cause and how to go about sorting this annoying little problem out?

Many thanks in advance

Five
2008-08-09, 04:31 PM
is the original wav material multiple files or one big long wav?

migrantwing
2008-08-09, 04:41 PM
Hey Five,

There are 7 or 8 individual wav. files. I have never had this problem before. 2 out of the 4 shows I have received (from the same trader) encoded, checked and verified perfectly today and then I ran into this problem with the final 2

Five
2008-08-09, 05:19 PM
first thing I would do is make a temp wav joining the last three tracks and have a close look at the seams, and of course listen to see if anything is amiss. be sure to keep a backup of the original wavs, of course.

if you don't have a wav editor audacity.sourceforge.net is good.

roann
2008-08-10, 05:08 AM
I have just received some new material (wav. format) and set about encoding to flac. with Traders' Little Helper so I could put them up on TTD at some point over the weekend. Everything was going well until I noticed a few of the files come up with the error 'Truncated files or otherwise corrupt'

Anyone know what is the cause and how to go about sorting this annoying little problem out?

Many thanks in advanceTLH uses shntool.exe for checking and flac.exe for encoding wav to flac format. Both are extremeley reliable programs, so the files are corrupt. File corruption can take place always and everywhere ;-) ... most of the time it happens when burning/ripping files to/from silver or when the disc oldens or is being "mistreated".

I'm afraid there's nothing you can do to fix it (in terms of getting back the original clean wav data) but get a fresh copy (assuming the original data is not corrupt). If there's no clean copy around you can try to fix it yourself if possible (see Five's post above). Sometimes shntool/TLH provides a bit more of information of what's wrong with a file. Try Analysis > Show audio file details in info mode (warning: lots of data for each file, so try it with only one file first to see whether there is some information that might help).

Robert

migrantwing
2008-08-10, 06:03 AM
Thanks Five and Roann,

I analysed the files in info mode via TLH as you suggested and it came up with this report for one of the 'bad' files:

shntool 3.0.4
Copyright (C) 2000-2007 Jason Jordan <[email protected]>

-------------------------------------------------------------------------------
File name: 367-08-poisongirl.wav
Handled by: wav format module
Length: 3:24.13
WAVE format: 0x0001 (Microsoft PCM)
Channels: 2
Bits/sample: 16
Samples/sec: 44100
Average bytes/sec: 176400
Rate (calculated): 176400
Block align: 4
Header size: 44 bytes
Data size: 36016434 bytes
Chunk size: 36016470 bytes
Total size (chunk size + 8): 36016478 bytes
Actual file size: 36016478
File is compressed: no
Compression ratio: 1.0000
CD-quality properties:
CD quality: yes
Cut on sector boundary: no
Sector misalignment: 258 bytes
Long enough to be burned: yes
WAVE properties:
Non-canonical header: no
Extra RIFF chunks: no
Possible problems:
File contains ID3v2 tag: no
Data chunk block-aligned: no
Inconsistent header: no
File probably truncated: no
Junk appended to file: no
Odd data size has pad byte: n/a

I will attempt what Five suggested and then if there is no 'fix' then I'll have to do what you suggest Robert, and get another copy. Hopefully, it will be 'clean'

Thanks again

Lloydy

roann
2008-08-10, 06:39 AM
...
File name: 367-08-poisongirl.wav
Handled by: wav format module
Length: 3:24.13
WAVE format: 0x0001 (Microsoft PCM)
Channels: 2
Bits/sample: 16
Samples/sec: 44100
Average bytes/sec: 176400
Rate (calculated): 176400
Block align: 4
Header size: 44 bytes
Data size: 36016434 bytes
Chunk size: 36016470 bytes
Total size (chunk size + 8): 36016478 bytes
Actual file size: 36016478
File is compressed: no
Compression ratio: 1.0000
CD-quality properties:
CD quality: yes
Cut on sector boundary: no
Sector misalignment: 258 bytes
Long enough to be burned: yes
WAVE properties:
Non-canonical header: no
Extra RIFF chunks: no
Possible problems:
File contains ID3v2 tag: no
Data chunk block-aligned: no
Inconsistent header: no
File probably truncated: no
Junk appended to file: no
Odd data size has pad byte: n/a
...Bad luck, there's no information indicating problems.

Lloydy, if there's enough power on your side for an extra upload, can you please send me the smallest of the "bad" wav files in .zip, .rar or .7z format, either via email (my address see About dialog of TLH) or via a filesharing service?

Robert

migrantwing
2008-08-10, 08:39 AM
Here you go, Robert

http://www.sharebig.com/share.php?id=s13iwtjoosjuqmKsV

I looked at the original files and checked the SBE's and it seems that the problems lie there

What do you suggest. Shift backwards, forwards or round?

Once again, thanks for TLH. It's a fascinating lil thing :clap:

roann
2008-08-10, 10:39 AM
... I looked at the original files and checked the SBE's and it seems that the problems lie there ...SBEs do not have any influence on the encoding process because the term SBE only tells that there will be a micro-gap if you use the wav data to burn an audio CD.

... What do you suggest. Shift backwards, forwards or round?It doesn't matter in almost all cases, backward is the shntool default.

Here you go, Robert ...Thanks very much for providing the sample file! If you use the orginal flac.exe the encoder will work up to 99% before quitting with this error message:

367-08-poisongirl.wav: 99% complete, ratio=0,518367-08-poisongirl.wav: ERROR: got partial sample

It means that the WAV data is truncated and not even at a sample boundary (e.g. the subchunk's length is not a multiple of 4 (16-bit stereo data)).

It's hard to tell how this happened. One reason may be that the file has been truncated from a cutoff during FTP. Another one may be that in the file's lineage there is a faulty compression to shn format (Shorten doesn't do much error checking). Other possible reasons I listed in my previous post.

There is a workaround that skips the partial sample (though I cannot tell you whether data is already lost / you'll loose data, or whether the partial sample is doing nothing at the end of the file so it can be skipped): Open the wav file in an audio editor and save it without changing it. This will take off the extra bytes and will allow the file to be converted to flac format.

Robert

migrantwing
2008-08-10, 11:17 AM
You are most welcome

Thank you for the in depth reply and detail. A few things make a LOT more sense now

Enjoy your weekend, Robert

Lloydy :)