Skip to main content

Topic: how can i fix a damaged wavpack header? (Read 4364 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
how can i fix a damaged wavpack header?

I'm not sure what tagger created this mess ( I think it was Banshee and it all happened recently).  I have a collection of wavpack files. A large majority of them are reported as being mp3s.  Some tagging programs won't even load them at all, yet they all play just fine.

At first i thought that id3v1 tags had been added to them but i'm not sure that's the case:
Looking at an example with wavunpack -ss
Code: [Select]
wvunpack -ss /home/hometheater/audio/d

WVUNPACK  Hybrid Lossless Audio Decompressor  Linux Version 4.60.1
Copyright (c) 1998 - 2009 Conifer Software.  All Rights Reserved.

file name:         /home/hometheater/audio/dougie_maclean/2000-live_from_two_end
file size:         24828360 bytes
source:            16-bit ints at 44100 Hz
channels:          2 (stereo)
duration:          0:05:38.53
modalities:        lossless, very high, extra-1
compression:       58.42%
ave bitrate:       587 kbps
encoder version:   4
original md5:      64b2983bcb8952b5340d231f343e9c52
file wrapper:      44 byte RIFF header

APEv2 tag items:   14
Title:             She Will Find Me
Artist:            Dougie Maclean
Album:             Live From the Ends of the Earth
Year:              2000
Track:             1/11
Genre:             Scottish Folk
Comment:           Recorded live at the Main Auditorium of the Glasgow Royal Alb
ert Hall during the Celtic Connections Festival in Jult 1998
replaygain_track_gain: +6.71 dB
replaygain_track_peak: 0.390686
replaygain_album_gain: +4.19 dB
replaygain_album_peak: 0.729187
Album Artist:      Dougie Maclean
Lyrics:            95-byte multi-line text string
Grouping:          buffalo

Looking at them with mutagen-inspect shows me:
Code: [Select]
mutagen-inspect /home/hometheater/audio/dougie_maclean/2000-live_from_two_ends_of_the_earth/01-she_will_find_me.wv
-- /home/hometheater/audio/dougie_maclean/2000-live_from_two_ends_of_the_earth/01-she_will_find_me.wv
- MPEG 2.5 layer 2, 80000 bps, 12000 Hz, 2480.09 seconds (sketchy) (audio/mp3)
TIT2=She Will Find Me
COMM=='eng'=Recorded live at the Main Auditorium of the Glasgow Royal Albert Hall during the Celtic Connections Festival in Jult 1998
TPE2=Dougie Maclean
TPE1=Dougie Maclean
TALB=Live From the Ends of the Earth
USLT=[unrepresentable data]
TCON=Scottish Folk

in contrast looking at an uncorrupted wavpack file with mutagen-inspect gives me:
Code: [Select]
mutagen-inspect /home/hometheater/audi
-- /home/hometheater/audio/pagans_mind/2003-celestial_entrance/01-approaching.wv
- WavPack, 168.51 seconds, 44100 Hz (audio/x-wavpack)
Album=Celestial Entrance
Album Artist=Pagan's Mind
Albumartistsort=Pagan's Mind
Artist=Pagan's Mind
Artistsort=Pagan's Mind
CatalogNumber=LMP 0211-046 CD
Composer=Pagan's Mind
Label=Limb Music Products
Lyricist=Pagan's Mind

Powered by LyricWiki (
Mixer=Fredrik Nordström
Producer=Fredrik Nordström / Pagan's Mind
genre=Progressive Metal
replaygain_album_gain=-8.94 dB
replaygain_track_gain=-8.07 dB

Any ideas how i might fix this? I've tried using from apetag-1.12 and it doesn't find any idv3 tags to remove.  My guess is that the headers were borked somehow. Again, they play just fine (for the apps that load them up), but i'd like to be able to work with the tags, and i've recently moved to Ampache which seems to have trouble reading them.

I run linux, but i can run most apps in Wine so any suggestions of apps that may fix this are welcome. I can also code a bit so if someone knows what the steps are to resolve this is i can likely write code or scripts to do it.


  • Last Edit: 16 June, 2011, 08:13:31 PM by BearcatSandor
Music lover and recovering high end audiophile

  • saratoga
  • [*][*][*][*][*]
how can i fix a damaged wavpack header?
Reply #1
I don't know anything about wavpack, but that sounds like an id3v2 rather then id3v1 tag.  Have you tried looking at the file in a hex editor to see if theres an ID3 tag stuck on the front?

how can i fix a damaged wavpack header?
Reply #2

An excellent suggestion as far as looking at it with a hex editor (why didn't i think of that?). Thank you.

It does appear as if there is an id3v2 tag-set at the beginning of these files.  The first characters in the file are "ID3"
Since wavpack files are only supposed to contain APE and id3v1 tags, it's no wonder some apps are getting confused.

Now what?

Screen shot of hex editor with "She Will Find Me" (as referenced above) is here: Screen shot of hex editor

Music lover and recovering high end audiophile

  • tuffy
  • [*][*][*]
how can i fix a damaged wavpack header?
Reply #3
idconvert can strip ID3v2 tags, and typically comes packed with libid3/id3lib.  Something like:
Code: [Select]
% id3convert -s2 file.wv

should do the trick.

how can i fix a damaged wavpack header?
Reply #4
Thanks Tuffy!  I discovered a program called Mp3Tag that can do it as well.  I'll try out your suggestion as i feel i'd have more control  over it in a script anyhow.

Thanks for the help all!

Music lover and recovering high end audiophile