pokepoke
Feb 26 2006, 17:48
Hi all,
Got some SHN files full of SBEs recently, did the standard decode to WAV, encode to FLAC cleanup, and during the verify on some of the files, got the following error:
ERROR: got partial sample
There's no discernible error in FLAC playback, but I was wondering what this might mean?
I'm using FLAC Front End 1.7.1 etree edition and FLAC 1.1.2a for the encoding.
Thanks in advance...
EDIT: the files in question still show sector boundary errors. And I forgot to say I use the align on sector boundaries option, at level 8.
jcoalson
Feb 26 2006, 21:23
it means the WAV is truncated, and not even at a sample boundary. e.g. if it's 16-bit stereo data, the subchunk's length is not a multiple of 4.
could be that the SHN files are truncated too. shorten doesn't have much error detection so it's hard to say.
Josh
Cartman_Sr
Feb 26 2006, 21:47
What does "align on sector boundaries" do?
jcoalson
Feb 26 2006, 22:18
Cartman_Sr
Feb 26 2006, 22:47
Oh. I'm a bonehead for not reading that part. Anyways, I really like the FLAC format. I'm still learning how to use everything. Thanks Josh.
pokepoke
Feb 27 2006, 11:43
QUOTE(jcoalson @ Feb 26 2006, 10:23 PM)
it means the WAV is truncated, and not even at a sample boundary. e.g. if it's 16-bit stereo data, the subchunk's length is not a multiple of 4.
could be that the SHN files are truncated too. shorten doesn't have much error detection so it's hard to say.
Josh
Wow, from Mr. FLAC himself! I am flattered by your attention, sir, and a big fan of your work.
The SHN files were indeed dubiously produced. I was able to encode, decode, and reencode successfully, so I guess this means that the FLAC files dropped the bad subchunks? Interesting that it seems to be an either-or, to align on the boundaries or to drop the bad subchunk. Or am I misreading that?
Thanks very much for the reply. (I couldn't find much on this error in this forum, or even on the internets.)
jcoalson
Feb 27 2006, 13:43
thanks.
hmm... there is supposed to be only 1 'data' subchunk in a WAV file, which contains all the audio. assuming that, then upon hitting an unaligned (i.e. length mod 4 != 0) subchunk, flac should error out and not produce a file.
if it gets a 'data' subchunk that ends earlier than the WAV header says it should, flac will give a different warning ("WARNING: unexpected EOF; expected %u samples, got %u samples") and keep the flac output.
so I'm not sure exactly what's going on; if there is a place you can host one of the bad SHN files I can take a look.
Josh
pokepoke
Feb 27 2006, 16:20
Well, in each case it got to 100% of the FLAC creation, then gave the message. And the decoding itself got rid of the SHNs. Let me see if the guy who torrented them originally can help out.
One more thing--shntool found problems on the original files that correspond to the message "audio data is not block-[a]ligned", not on exactly the same tracks that caused FLAC problems, but perhaps significant?
pokepoke
Mar 1 2006, 09:55
PM sent with link to test file. Looking forward to your reply.
jcoalson
Mar 1 2006, 12:47
answer: the original SHN was created from a truncated WAV file. the reason:
1. "shorten -x test.shn 1.wav" yields no errors and a WAV file with the right headers but truncated data subchunk
2. if I chop the last byte off test.shn and try to decode than, shorten complains about premature EOF
3. "shorten 1.wav 1.shn" causes no error and 1.shn is identical to test.shn
Josh
pokepoke
Mar 1 2006, 14:57
QUOTE(jcoalson @ Mar 1 2006, 01:47 PM)
answer: the original SHN was created from a truncated WAV file.
Can you explain to me how a truncated WAV file gets truncated? Or point me somewhere where I can learn about it? The file's creator is curious to know where he might have gone wrong.
I really appreciate your help.
jcoalson
Mar 2 2006, 12:21
sorry, I don't really know, it's never happened to me.
kjoonlee
Mar 2 2006, 12:47
There can be many reasons, the first of which comes to mind is "incomplete download."
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.