Wavdumper

Author: Kristian Ovaska (kristian.ovaska@helsinki.fi)
WWW: http://www.cs.helsinki.fi/u/hkovaska/wavdumper/
License: GNU General Public License
Version: 0.5 (2003-11-13)

Wavdumper prints detailed information on the headers and structure of a WAV file. It is written in Python and has been tested on Python 2.2 and 2.3.

Recognized chunk types: cue, data, disp, fact, fmt, junk, labl, ltxt, list, note, pad, plst, smpl

Wavdumper does not read actual sound data; it is for inspecting headers only. For programmers, try the wave module in the standard Python library instead.

Usage

From command line:
> wavdumper.py file1.wav ... fileN.wav
or
> wavdumper.py *.wav

As a Python module:
>>> import wavdumper
>>> wav = wavdumper.Wav('filename.wav')
>>> wav.printInfo()
or
>>> wav.printInfo(outfile) # file-like object

Notes

Todo

Example output

> wavdumper.py test1.wav

File: test1.wav (1910 bytes)
Chunk at pos 20: id = "fmt ", length = 16 bytes
  Format Chunk
  Data format: Uncompressed PCM
  Channels: 1
  Sample rate: 8800 Hz
  Average bytes per sec: 17600
  Block align (bytes): 2
  Bits per sample: 16
Chunk at pos 44: id = "data", length = 1760 bytes
  1760 bytes sample data
  880 samples
  0.100 seconds
Chunk at pos 1812: id = "smpl", length = 60 bytes
  Sampler Chunk
  Manufacturer: 0
  Product: 0
  MIDI note (60=middle-C): 69 (A-5) +- 0.0%
  Sample loop
    Loop ID: 0
    Type: forward
    Range: 0 - 879
    Repeat: infinity
Chunk at pos 1880: id = "LIST", length = 30 bytes
  List Chunk, id = "INFO"
  Chunk at pos 1892: id = "INAM", length = 17 bytes
    Name: 440 Hz sine wave

References

Contain overlapping information.


Page updated: 2003-11-13
Kristian Ovaska