Rockbox Technical Forums

Support and General Use => Recording => Topic started by: kuba on November 18, 2005, 08:51:44 AM

Title: my utility for fixing corrupted wave headers
Post by: kuba on November 18, 2005, 08:51:44 AM
Since my ihp120 on rockbox often freezes during recording, I have to recover the recorded wave files. I made a tiny program in C to easier this work (fixing corrupted riff-wave headers). I'm putting it here in case someone finds it useful.

zip archive (http://www.fi.muni.cz/~xvanek4/repair/repair.zip) includes:
repair.bat ...win/dos batch (you have to change filename/filesize before using it)
repair.c ...source code (sorry for the clumsiness, it's been a long time since I last programmed in C)
repair.exe ...win/dos executable

usage:
use it on files you get using "chkdsk /f <x:>"
"repair <filename> <filesize>"
Title: Re: my utility for fixing corrupted wave headers
Post by: Weazel on November 18, 2005, 09:10:25 AM
nice heh, for just in case. hope this tool won't be nessercary with next rockbox updates.
Title: Re: my utility for fixing corrupted wave headers
Post by: kuba on November 18, 2005, 09:14:20 AM
nice heh, for just in case. hope this tool won't be nessercary with next rockbox updates.

Yep, I hope so.
Title: Re: my utility for fixing corrupted wave headers
Post by: whatboutbob on April 30, 2006, 07:38:55 AM
Old post, but worth reviving for those testing optical recording.

In my experience this repairs corrupted headers very nicely...vive Kuba! :-)
Title: Re: my utility for fixing corrupted wave headers
Post by: mborus on May 06, 2006, 01:03:34 PM
Quote
Old post, but worth reviving for those testing optical recording.

In my experience this repairs corrupted headers very nicely...vive Kuba! :-)

That's true. I missed it the first time around and today, when a 3GB digital recording ran out of disk space it was very useful.


Title: Re: my utility for fixing corrupted wave headers
Post by: mistercj on February 28, 2007, 05:41:22 AM
Hi there,

I have a similar problem; The battery died on my h120 during recording, so I was left with a corrupt file. But the two differences for me are: I was recording in AIFF format, and I use a Mac instead of a PC.

The file does show up in my h120, but if I try to play it, Rockbox freezes. It also shows up on my Mac, and will not play or display any file size data.

Does anyone know how I could repair the AIFF headers? Is kuba's header-repair utility an option for me, despite the platform/format difference?

Thanks!
Title: Re: my utility for fixing corrupted wave headers
Post by: petur on March 01, 2007, 01:59:41 AM
You can always try to import the file as raw data in a sound editor
Title: Re: my utility for fixing corrupted wave headers
Post by: mistercj on March 01, 2007, 03:58:29 AM
You can always try to import the file as raw data in a sound editor

Thanks for the idea Petur! I had already tried importing the file in a bunch of programs, but after a web search for "raw audio mac" I found & installed Audacity. It has an option called "Import raw data" which worked like a charm!

Cheers,
cj
Title: Re: my utility for fixing corrupted wave headers
Post by: Villarelo on March 31, 2007, 03:53:41 PM
Hi.
  I have a problem with one of my wav files recorded with H120. I was recording for like half an hour and pressed the rec button to split it, after that Iriver begin a new file as usual. Few seconds later I hit the stop button to finish the recording but the device got stuck. Browsing the Iriver disk I can see that there is only one file but can't be played  :'(. I tried to fix the file using the kuba's wav header application but it didn't work. I also tried to read it as raw data in Audition but it fails too.
  Anyone have pass for this before?, can someone give me some tips to read the file?

P.D. The file size is 250MB aprox.
Title: Re: my utility for fixing corrupted wave headers
Post by: petur on March 31, 2007, 05:01:37 PM
maybe first do a chkdsk /f (replace with your favorite disk checl/repair tool)  first... what error do you get when trying to import in audacity as raw data. AFAIK, it should import *any* file... so maybe the disk is a bit corrupted
Title: Re: my utility for fixing corrupted wave headers
Post by: Villarelo on March 31, 2007, 06:16:32 PM
Thanks for your tip petur, I made the chkdsk in the unit and show no errors or recovery files.
After that I made a raw import on Audacity and voila! The file only have a clip at the beginning which is probably the cause of the wav corruption. Thank you very much!  ;D
Title: Re: my utility for fixing corrupted wave headers
Post by: petur on April 01, 2007, 04:18:50 AM
The file only have a clip at the beginning which is probably the cause of the wav corruption.
No, that 'clip' you hear is the WAV header that's being played because you did a raw input.