Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: FLAC encode partial sample error on verify (Read 5893 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FLAC encode partial sample error on verify

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.

FLAC encode partial sample error on verify

Reply #1
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

FLAC encode partial sample error on verify

Reply #2
What does "align on sector boundaries" do?


FLAC encode partial sample error on verify

Reply #4
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.

FLAC encode partial sample error on verify

Reply #5
Quote
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
[a href="index.php?act=findpost&pid=367641"][{POST_SNAPBACK}][/a]


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.)

FLAC encode partial sample error on verify

Reply #6
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

FLAC encode partial sample error on verify

Reply #7
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?

FLAC encode partial sample error on verify

Reply #8
PM sent with link to test file.  Looking forward to your reply.

FLAC encode partial sample error on verify

Reply #9
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

FLAC encode partial sample error on verify

Reply #10
Quote
answer: the original SHN was created from a truncated WAV file.
[a href="index.php?act=findpost&pid=368356"][{POST_SNAPBACK}][/a]


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.

FLAC encode partial sample error on verify

Reply #11
sorry, I don't really know, it's never happened to me.