Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install hachoir-metadata

How to install hachoir-metadata

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install hachoir-metadata
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.3.3 Available View build log
1.3.1 Failed View build log
1.2.1 Available View build log
1.2 Available View build log
Windows (64-bit)
1.3.3 Available View build log
1.3.1 Failed View build log
1.2.1 Available View build log
1.2 Available View build log
Mac OS X (10.5+)
1.3.3 Available View build log
1.3.1 Failed View build log
1.2.1 Available View build log
1.2 Available View build log
Linux (32-bit)
1.3.3 Available View build log
1.3.1 Failed View build log
1.2.1 Available View build log
1.2 Available View build log
Linux (64-bit)
1.3.3 Available View build log
1.3.1 Failed View build log
1.2.1 Available View build log
1.2 Available View build log
 
License
GNU GPL v2
Lastest release
version 1.3.3 on Jan 5th, 2011

hachoir-metadata extracts metadata from multimedia files: music, picture, video, but also archives. It supports most common file formats:

  • Archives: bzip2, gzip, zip, tar
  • Audio: MPEG audio ("MP3"), WAV, Sun/NeXT audio, Ogg/Vorbis (OGG), MIDI, AIFF, AIFC, Real audio (RA)
  • Image: BMP, CUR, EMF, ICO, GIF, JPEG, PCX, PNG, TGA, TIFF, WMF, XCF
  • Misc: Torrent
  • Program: EXE
  • Video: ASF format (WMV video), AVI, Matroska (MKV), Quicktime (MOV), Ogg/Theora, Real media (RM)

It tries to give as much information as possible. For some file formats, it gives more information than libextractor for example, such as the RIFF parser, which can extract creation date, software used to generate the file, etc. But hachoir-metadata cannot guess informations. The most complex operation is just to compute duration of a music using frame size and file size.

hachoir-metadata has three modes:

  • classic mode: extract metadata, you can use --level=LEVEL to limit quantity of information to display (and not to extract)
  • --type: show on one line the file format and most important informations
  • --mime: just display file MIME type

The command 'hachoir-metadata --mime' works like 'file --mime', and 'hachoir-metadata --type' like 'file'. But today file command supports more file formats then hachoir-metadata.

Website: http://bitbucket.org/haypo/hachoir/wiki/hachoir-metadata

Example

Example on AVI video (RIFF file format):

$ hachoir-metadata pacte_des_gnous.avi
Common:
- Duration: 4 min 25 sec
- Comment: Has audio/video index (248.9 KB)
- MIME type: video/x-msvideo
- Endian: Little endian
Video stream:
- Image width: 600
- Image height: 480
- Bits/pixel: 24
- Compression: DivX v4 (fourcc:"divx")
- Frame rate: 30.0
Audio stream:
- Channel: stereo
- Sample rate: 22.1 KHz
- Compression: MPEG Layer 3

Modes --mime and --type

Option --mime ask to just display file MIME type (works like UNIX "file --mime" program):

$ hachoir-metadata --mime logo-Kubuntu.png sheep_on_drugs.mp3 wormux_32x32_16c.ico
logo-Kubuntu.png: image/png
sheep_on_drugs.mp3: audio/mpeg
wormux_32x32_16c.ico: image/x-ico

Option --file display short description of file type (works like UNIX "file" program):

$ hachoir-metadata --type logo-Kubuntu.png sheep_on_drugs.mp3 wormux_32x32_16c.ico
logo-Kubuntu.png: PNG picture: 331x90x8 (alpha layer)
sheep_on_drugs.mp3: MPEG v1 layer III, 128.0 Kbit/sec, 44.1 KHz, Joint stereo
wormux_32x32_16c.ico: Microsoft Windows icon: 16x16x32

Similar projects

A lot of other libraries are written to read and/or write metadata in MP3 music and/or EXIF photo.

hachoir-metadata 1.3.3 (2010-07-26)

  • Support WebM video (update Matroska extractor)
  • Matroska parser extracts audio bits per sample

hachoir-metadata 1.3.2 (2010-02-04)

  • Include hachoir_metadata/qt/dialog_ui.py in MANIFEST.in
  • setup.py ignores pyuic4 error if dialog_ui.py is present
  • setup.py installs hachoir_metadata.qt module

hachoir-metadata 1.3.1 (2010-01-28)

  • setup.py compiles dialog.ui to dialog_ui.py and install hachoir-metadata-qt. Create --disable-qt option to skip hachoir-metadata-qt installation.
  • Create a MANIFEST.in file to include extra files like ChangeLog, AUTHORS, gnome and kde subdirectories, test_doc.py, etc.

hachoir-metadata 1.3 (2010-01-20)

  • Create hachoir-metadata-qt: a graphical interface (Qt toolkit) to display files metadata
  • Create ISO9660 extractor
  • Hide Hachoir warnings by default (use --verbose to show them)
  • hachoir-metadata program: create --force-parser option to choose the parser

hachoir-metadata 1.2.1 (2008-10-16)

  • Using --raw, strings are not normalized (don't strip trailing space, new line, nul byte, etc.)
  • Extract much more informations from Microsoft Office documents (.doc, .xsl, .pps, etc.)
  • Improve OLE2 (Word) extractor
  • Fix ASF extractor for hachoir-parser 1.2.1

hachoir-metadata 1.2 (2008-09-03)

  • Create --maxlen option for hachoir-metadata program: --maxlen=0 disable the arbitrary string length limit
  • Create FLAC metadata extractor
  • Create hachoir_metadata.config, especially MAX_STR_LENGTH option (maximum string length)
  • GIF image may contains multiple comments

hachoir-metadata 1.1 (2008-04-01)

  • More extractors are more stable and fault tolerant
  • Create basic Gtk+ GUI: hachoir-metadata-gtk
  • Catch error on data conversion
  • Read width and height DPI for most image formats
  • JPEG (EXIF): read GPS informations
  • Each data item can has its own "setter"
  • Add more ID3 keys (TCOP, TDAT, TRDA, TORY, TIT1)
  • Create datetime filter supporting timezone
  • Add "meters", "pixels", "DPI" suffix for human display
  • Create SWF extractor
  • RIFF: read also informations from headers field, compute audio compression rate
  • MOV: read width and height
  • ASF: read album artist

hachoir-metadata 1.0.1 (???)

  • Only use hachoir_core.profiler with --profiler command line option so 'profiler' Python module is now optional
  • Set shebang to "#!/usr/bin/python"

hachoir-metadata 1.0 (2007-07-11)

  • Real audio: read number of channel, bit rate, sample rate and compute compression rate
  • JPEG: Read user commment
  • Windows ANI: Read frame rate
  • Use Language from hachoir_core to store language from ID3 and MKV
  • OLE2 and FLV: Extractors are now fault tolerant

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:5

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.