This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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
Release History

Release History

1.3.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hachoir_metadata-1.3.3-py2.4.egg (96.3 kB) Copy SHA256 Checksum SHA256 2.4 Egg Jul 26, 2010
hachoir_metadata-1.3.3-py2.5.egg (94.8 kB) Copy SHA256 Checksum SHA256 2.5 Egg Jul 26, 2010
hachoir_metadata-1.3.3-py2.6.egg (94.7 kB) Copy SHA256 Checksum SHA256 2.6 Egg Jul 26, 2010
hachoir-metadata-1.3.3.tar.gz (52.3 kB) Copy SHA256 Checksum SHA256 Source Jul 26, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting