How To Install python-hachoir-metadata on Debian 10

Learn how to install python-hachoir-metadata on Debian 10 with this tutorial. python-hachoir-metadata is Program to extract metadata using Hachoir library

Introduction

In this tutorial we learn how to install python-hachoir-metadata on Debian 10.

What is python-hachoir-metadata

python-hachoir-metadata is:

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
  • 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 really more information than libextractor for example. RIFF parser is really good for example, it can extract creation date, software used to generate the file, etc. But hachoir-metadata can not guess information. 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 information
  • –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.

There are three methods to install python-hachoir-metadata on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-hachoir-metadata Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-hachoir-metadata using apt-get by running the following command:

sudo apt-get -y install python-hachoir-metadata

Install python-hachoir-metadata Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-hachoir-metadata using apt by running the following command:

sudo apt -y install python-hachoir-metadata

Install python-hachoir-metadata Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-hachoir-metadata using aptitude by running the following command:

sudo aptitude -y install python-hachoir-metadata

How To Uninstall python-hachoir-metadata on Debian 10

To uninstall only the python-hachoir-metadata package we can use the following command:

sudo apt-get remove python-hachoir-metadata

Uninstall python-hachoir-metadata And Its Dependencies

To uninstall python-hachoir-metadata and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove python-hachoir-metadata

Remove python-hachoir-metadata Configurations and Data

To remove python-hachoir-metadata configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge python-hachoir-metadata

Remove python-hachoir-metadata configuration, data, and all of its dependencies

We can use the following command to remove python-hachoir-metadata configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-hachoir-metadata

Dependencies

python-hachoir-metadata have the following dependencies:

References

Summary

In this tutorial we learn how to install python-hachoir-metadata package on Debian 10 using different package management tools: apt, apt-get and aptitude.