Archives de catégorie : ubuntu

Testing Hachoir, an open source metadata parser

Reading linuxfr.org, I found a new software, written in Python (it can then run on all -almost- platforms), that can extract very precious data from your files : metadata.
For example, running hachoir on an avi movie will tell you which container, video codec, audio codec, etc.. were used; the length, the framerate, etc… of the movie.
So, now that you want to test it, how can you install it on your (linux in this example) computer ?
Well, it depends on your distribution…
On Kubuntu (or Ubuntu), or Debian Sarge, I couldn’t install it, because of dependency problems, but if you want to give it a try, just add these 2 lines in your /etc/apt/sources.list :

deb http://plumbear.free.fr/debian etch main
deb-src http://plumbear.free.fr/debian etch main

, and :
#apt-get update
#apt-get upgrade
#apt-get install hachoir-parser hachoir-metadata

If it doesn’t work, don’t worry, you can install easily it using … easy_install !
#apt-get install easy_install
Almost done !
Juste type in:

#easy_install hachoir-parser
#easy_install hachoir-metadata

Easy isn’t it ?
To use it, it’s also very simple :

$ hachoir-metadata a_video_file.avi
Common:
– Duration: 42 min 10 sec
– Producer: VirtualDub
– Comment: Has audio/video index (2.5 MB)
– MIME type: video/x-msvideo
– Endian: Little endian
Video stream:
– Image width: 624
– Image height: 352
– Bits/pixel: 12
– Compression: XviD MPEG-4 (fourcc: »xvid »)
– Frame rate: 23.976023976
Audio stream:
– Channel: stereo
– Sample rate: 48.0 KHz
– Compression: MPEG Layer 3

Well, I guess this file is a real video file !

To know more about this great software, just check this website out :
Hachoir official website, and feel free to contact the author, I can testify he will answer your questions !