Become a Site Supporter and Never see Ads again!

Author Topic: Homegrown WAVE header repair utility  (Read 44827 times)

0 Members and 1 Guest are viewing this topic.

Offline scottE

  • Trade Count: (0)
  • Taperssection Newbie
  • *
  • Posts: 3
Re: Homegrown WAVE header repair utility
« Reply #60 on: July 30, 2009, 05:13:07 PM »
Many thanks for this tool !

It fixed the file that was unplayable after the batteries on the R-09 ran empty halfway a  concert!
SP-BMC-12
SP-SPSB-6

Offline fmaderjr

  • Trade Count: (15)
  • Taperssection All-Star
  • ****
  • Posts: 1937
Re: Homegrown WAVE header repair utility
« Reply #61 on: August 27, 2009, 05:32:30 PM »
Many thanks for this tool !
It fixed the file that was unplayable after the batteries on the R-09 ran empty halfway a  concert!

For the R-09 you should be able to fix this kind of problem much easier than this. Just use the repair tool on p. 70 of the manual. The R-09HR has this function also. Just a couple of clicks and you'r done. Worked for me when I dropped my R-09 at the end of a set.
AT853's (all caps)/CM-300 Franken Naks (CP-1,2,3)/JBMod Nak 700's (CP-701,702) > Tascam DR-680
Or Sonic Studios DSM-6 > M10

Offline it-goes-to-eleven

  • Trade Count: (57)
  • Needs to get out more...
  • *****
  • Posts: 6698
Re: Homegrown WAVE header repair utility
« Reply #62 on: August 28, 2009, 03:17:39 PM »
Many thanks for this tool !
It fixed the file that was unplayable after the batteries on the R-09 ran empty halfway a  concert!

For the R-09 you should be able to fix this kind of problem much easier than this. Just use the repair tool on p. 70 of the manual. The R-09HR has this function also. Just a couple of clicks and you'r done. Worked for me when I dropped my R-09 at the end of a set.

Rule #0 of successful data recovery is to preserve the original media before attempting any repair.

New product - Get your NEUMANN active mounting bars
Active microphone mounting bars for Schoeps and AKG, and Naiant AKG, ready to ship

Offline optimisticpessimist

  • Trade Count: (0)
  • Taperssection Newbie
  • *
  • Posts: 27
  • Gender: Male
Re: Homegrown WAVE header repair utility
« Reply #63 on: September 07, 2009, 02:31:27 PM »
I've used this tool successfully several times, but what are my options when I have a file that won't play or open in any software that I've tried (WMP, Musicmatch Jukebox, Foobar, Wavelab, CD Wave Editor) and this tool returns back an error message reading "Failed to read header from input file."

EDIT:  Resolved after looking at a couple of other threads related to corrupt files.  Changed the file extension to .raw and opened it with Wavelab.  I'm just not sure why the file had no header at all.  It was recorded with an R-09, just like the other files I've had to recover.
« Last Edit: September 07, 2009, 06:42:46 PM by optimisticpessimist »

Offline Brian Skalinder

  • Complaint Dept.
  • Trade Count: (27)
  • Needs to get out more...
  • *****
  • Posts: 18665
  • Gender: Male
Re: Homegrown WAVE header repair utility
« Reply #64 on: September 07, 2009, 02:35:12 PM »
what are my options

There might be some other suggestions in the sticky at the top of the Computer-Related Help forum under the Data Recovery and/or Corrupt or 0 byte File sections.

Offline scarletfire1

  • Trade Count: (4)
  • Taperssection Regular
  • **
  • Posts: 84
  • Gender: Male
Re: Homegrown WAVE header repair utility
« Reply #65 on: March 17, 2010, 11:37:15 PM »
I just wanted to say thanks for this. It saved a second set for me.
-Mike
Neumann KM 184s / AKG SE 300 B ck91, ck93 / ADK A51/ SP C4  > R-4 Busman Mod -or- UA-5 (Oade T+, BM2p+) > H120
CA-11 cards, omnis > CA Ugly > H-120

Offline scb

  • Eli Manning should die of gonorrhea and rot in hell. Would you like a cookie, son?
  • Trade Count: (10)
  • Needs to get out more...
  • *****
  • Posts: 8515
  • Gender: Male
Re: Homegrown WAVE header repair utility
« Reply #66 on: March 18, 2010, 07:28:36 AM »
doesn't shntool also fix headers?


Offline it-goes-to-eleven

  • Trade Count: (57)
  • Needs to get out more...
  • *****
  • Posts: 6698
Re: Homegrown WAVE header repair utility
« Reply #67 on: March 18, 2010, 01:29:36 PM »
doesn't shntool also fix headers?

Please feel free to start a new thread about other tools that can repair headers ;)


New product - Get your NEUMANN active mounting bars
Active microphone mounting bars for Schoeps and AKG, and Naiant AKG, ready to ship

Offline Massive Dynamic

  • Trade Count: (21)
  • Taperssection All-Star
  • ****
  • Posts: 1115
  • Gender: Male
  • 20 years of the best in apocalyptic gothic metal
Re: Homegrown WAVE header repair utility
« Reply #68 on: March 27, 2010, 04:06:48 AM »
doesn't shntool also fix headers?

Please feel free to start a new thread about other tools that can repair headers ;)

Using shntool, I get this info on a 1.31GB file from a 661 that didn't shut down properly.

file name:                    /Users/xxxxx/Desktop/wd004.wav
handled by:                   wav format module
length:                       0:00.000
WAVE format:                  0x0001 (Microsoft PCM)
channels:                     2
bits/sample:                  24
samples/sec:                  44100
average bytes/sec:            264600
rate (calculated):            264600
block align:                  6
header size:                  910 bytes
data size:                    0 bytes
chunk size:                   1401743216 bytes
total size (chunk size + 8 ):  1401743224 bytes
actual file size:             1401743224
file is compressed:           no
compression ratio:            1.0000
CD-quality properties:
  CD quality:                 no
  cut on sector boundary:     n/a
  sector misalignment:        n/a
  long enough to be burned:   n/a
WAVE properties:
  non-canonical header:       yes
  extra RIFF chunks:          yes (1401742314 bytes)
Possible problems:
  file contains ID3v2 tag:    no
  data chunk block-aligned:   yes
  inconsistent header:        no
  file probably truncated:    no
  junk appended to file:      no
  odd data size has pad byte: n/a

Is pigiron's utility going to be of any use on this file? Haven't had any luck trying all the various posted solutions on my G5 Mac. TIA

EDIT: I was able to open as raw in Audacity, and there is music under a thick layer of hiss. Is there a way to know how much offset to use?
« Last Edit: March 27, 2010, 11:25:16 AM by CliveStaples »
Naiant X-X > SP-SPSB-1 > M10

Offline it-goes-to-eleven

  • Trade Count: (57)
  • Needs to get out more...
  • *****
  • Posts: 6698
Re: Homegrown WAVE header repair utility
« Reply #69 on: March 27, 2010, 01:43:59 PM »
PI's utility does simple header repair that is basically the same as reading the file as raw..

There is no trivial way to know how much offset to use.  When you get it right, your music should appear with normal waveforms and everything should sound fine.

Your description of music behind thick hiss is unexpected.  If you're stuck, you could start a new thread and post a sample from the start of the file.

New product - Get your NEUMANN active mounting bars
Active microphone mounting bars for Schoeps and AKG, and Naiant AKG, ready to ship

Offline tarunsingh81

  • Trade Count: (0)
  • Taperssection Newbie
  • *
  • Posts: 1
Re: Homegrown WAVE header repair utility
« Reply #70 on: May 19, 2010, 11:53:36 AM »
WOW MAN ... WOW ... this utility saved a critical wave for me ... can never thank you enough ... keep up the good work ...

AWESOME ...

Offline martygene

  • Trade Count: (0)
  • Taperssection Newbie
  • *
  • Posts: 19
Re: Homegrown WAVE header repair utility
« Reply #71 on: May 19, 2010, 04:25:13 PM »
i've had luck with using CDWave to open problem wav files and then saving them from that program and then they open fine in soundforge or audacity or media player.

Offline 108 Ohms

  • Eat A Peach
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 8814
  • Gender: Male
  • Waiting on the next cladogenetic event...
    • Oceana North America
Re: Homegrown WAVE header repair utility
« Reply #72 on: May 20, 2010, 06:07:34 AM »
Don't forget PhotoRec for lost file recovery.
It's easy, it works, and it's free.
http://www.cgsecurity.org/wiki/PhotoRec
http://www.cgsecurity.org/wiki/PhotoRec_Data_Carving
"Peace is for everyone"
        - Norah Jones


Offline MAGZine

  • Trade Count: (0)
  • Taperssection Newbie
  • *
  • Posts: 1
Re: Homegrown WAVE header repair utility
« Reply #73 on: July 18, 2010, 11:48:46 PM »
I saw that a few folks are getting corrupted headers in their wave files and having a struggle with the existing utilities trying to fix the problem. So I cobbled together a wave header repair utility this last weekend that may help... 'cause I hate to see good music go to waste ;D

But it's a butt ugly command line program... if you want pretty, try next door.

Since it's mostly "universal" C coding, I was able to get it to compile on both Linux and Winders... don't own a Mac, sorry.

Beat the hell out of it and it seems to be working, but I'd be surprised if there wasn't some bugs still down in the cracks... so for sure, only use it on a backup copy.

Here's a sample output where it successfully repaired a wave file that had nothing but zeroes in the entire header and a partially truncated audio data sample (about as bad as it get's)...

# ./fixwav junk.wav

Existing header data. Look for the words 'RIFF', 'WAVE', 'fmt',
or 'data' to see if this is even a somewhat valid WAVE header:

00000000:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000010:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000020:  00 00 00 00 00 00 00 00 00 00 00 00             ............

Exit the program now? [y/n] n
The total file size is 32617577 bytes
Chunk Size of 0 at offset 4 is incorrect... repairing
Chunk Format at offset 8 is incorrect... repairing
Subchunk1 ID at offset 12 is incorrect... repairing
Subchunk1 Size at offset 16 is incorrect... repairing
Subchunk1 Format at offset 20 is incorrect... repairing
Is the file recorded in 0 channels?  [y/n] n
Enter number of channels... 1=Mono, 2=Stereo, etc: 2
Is the number of samples per second = 0?  [y/n] n
Enter number of samples per second: 44100
Is the number of bits per sample = 0?  [y/n] n
Enter number of bits per sample: 16
Subchunk1 Format at offset 24 is incorrect... repairing
Subchunk1 Bytes Per Sample at offset 32 is incorrect... repairing
Subchunk2 ID at offset 36 is incorrect... repairing
Subchunk2 Size at offset 40 is incorrect... repairing
Found incorrect number of audio samples. This means that either
   the new WAVE header data is incorrect, or the audio samples
   in the existing file were clobbered. Do you wish to add silent
   audio samples to the end of the file?
   WARNING: this will modify the existing file. [y/n] y

Header repair is required!
   Overwrite the existing file? [y/n] y

File repair successful

As you see, you need to know a little about the file... the number of bits, the samples per second, and the number of mics... while that might stump a n00b, I don't think you'll have any problem.

One caveat... it assumes you're feeding it a "normal" wave file... i.e. only a single data "Subchunk"... if it ain't such an animal... or if it simply has junk data appended to it (there's some dumb ass programs that add ID3 tags like that), it's gonna hose up.

anyway, they're attached below... enjoy... and remember... you got it free  ;D

God I love you.

Thanks. I definitely owe you a beer.

Offline SmokinJoe

  • Trade Count: (63)
  • Needs to get out more...
  • *****
  • Posts: 4183
  • Gender: Male
  • "75 and sunny"... life is so much simpler.
    • uploads to archive.org
Re: Homegrown WAVE header repair utility
« Reply #74 on: July 20, 2010, 07:49:15 PM »
I wish I'd seen this a while ago.   I just did this the hard way.  Wheeler's MT locked up and I basically wrote custom code to do the same.  I remember that there was 256 bytes of nothing, then the data started.  I created a valid 24/48 wave file of an appropriate size, copied the 44 byte header from that, and they copied the rest of Wheeler's data, starting after discarding the first 256 bytes.

I gotta bookmark this thread!
Mics: Gefell M200's & M210's / ADK-TL / AT853's / DPA4061's
Pres: V3 / ST9100
Decks: Oade Concert Mod R4Pro / R09 / R05
Big Rig: split snake > Focusrite & Presonus Pres > ADAT > Alesis HD-24 > Protools 11
Daughter's rig:  AT4050ST > Busman Hybrid R4
Photo: Nikon D700's, 2.8 Zooms, and Zeiss primes
Playback: Raspberry Pi > Modi2 Uber > Magni2 > HD650

 

RSS | Mobile
Page created in 0.219 seconds with 36 queries.
© 2002-2017 Taperssection.com
Powered by SMF
Website Design by Foxtrot Media, Inc., a Baltimore Website Company