Help fix a corrupted .wma file
May 30, 2012 8:14 PM   Subscribe

Can you help me repair this corrupted .wma file?

I had the same problem with my voice recorder earlier, but I can't figure out how to fix it. (I tried messaging pocams too.) I tried importing it into various audio editing programs, but it won't open. It just gives me "header errors".
posted by roaring beast to Media & Arts (7 answers total)
What is the bit and sampling rate? It helps to know what it’s supposed to be if you’re trying to fix it.
posted by bongo_x at 10:08 PM on May 30, 2012

Can you post a good file made from your recorder with the same settings? Even 10 seconds worth. say "Hi Metafilter" or record something from TV.
posted by caclwmr4 at 10:36 PM on May 30, 2012

I tried what was tried previously. Recovered about 6:30min of some religious recording. But I'm guessing there's more and I only got that much because my reference file was 6:30min. Don't know what to do next though.

PS: maybe it's time to buy a recorder that doesn't eat audio files...
posted by sbutler at 10:43 PM on May 30, 2012

I can't get the file right now (Google Docs is blocking it because of too many downloads) but sbutler, you're on the right track. When I replaced the header before, I ran into the same problem you did. I ended up running a WMA repair tool on it, and after that it would play fully in VLC, although the end time wasn't displayed correctly.

I'll try to track down the exact repair tool I used tomorrow, but in the meantime, if you try any kind of WMA repair utility on the file with the fixed header, that may get it to play.
posted by pocams at 12:08 AM on May 31, 2012

Here's the file if someone else wants to try their hand: fixed.wma. Command I used to generate it (using the reference file pocams found earlier) on OS X/Linux:
cp WS_10001.WMA fixed.wma
dd if=WS_10004.WMA of=fixed.wma conv=notrunc bs=1 count=16384

posted by sbutler at 12:14 AM on May 31, 2012 [1 favorite]

I tried the same header-replacing trick using the 69-minute concert from the same place as before and I can play the first 45 minutes of it in Winamp and VLC, although seeking is a little dicey. Repaired file is here. Is that the whole recording?

Since I'm on Windows, I used Python and the following commands:
>>> original = open('WS_10001.wma', 'rb').read()
>>> goodfile = open('WS_10006.wma', 'rb').read()
>>> fixed = goodfile[:16384] + original[16384:]
>>> open('fixed.wma', 'wb').write(fixed)

posted by pocams at 8:22 AM on May 31, 2012

Thanks everyone for the help, pocams got it. Working great now. I'm definitely replacing the recorder for good now.
posted by roaring beast at 10:48 AM on May 31, 2012

« Older Help my 16-year-old sell his skateboarding booklet...   |   iPadeando Newer »
This thread is closed to new comments.