Finally I get to contribute a HOWTO.
I've seen this requested often, mainly because I was looking for an equivalent myself. If you're familiar with Gspot, it's a Windows-only program that spits out information on an AVI you feed it: codec, bitrate, audio quality, resolution, etc. Now, with some clever grep work of mplayer's output, you can do a decent job of getting these details, but how about a tool written specifically for the job that does it BETTER than Gspot? That's what I finally found with MediaInfo.
It's a GPL windows/linux program. Windows version has a GUI, and on Linux we bypass that distraction and just get our goodies with a CLI version. It supports a ton of formats. It's so good, when you put an AVI through it that's been downloaded from Google Video, it says "Google Video / Hack of AVI". Your information will look like this once you use the prog:
Code:
General #0
Complete name : /home/userundefine/video001.avi
Format : AVI
Format/Info : Audio Video Interleave
Format/Family : RIFF
File size : 137 MiB
PlayTime : 29mn 14s
Bit rate : 645 Kbps
Video #0
Codec : DivX 5
Codec/Family : MPEG-4
Codec settings/Packe : Yes
Codec settings/BVOP : Yes
Codec settings/QPel : No
Codec settings/GMC : 0
Codec settings/Matri : Default
PlayTime : 29mn 14s
Bit rate : 408 Kbps
Width : 512 pixels
Height : 384 pixels
Aspect ratio : 4/3
Frame rate : 25.000 fps
Resolution : 8 bits
Chroma : 4:2:0
Interlacement : Progressive
Bits/(Pixel*Frame) : 0.083
Writing library : DivX503b2207p
Audio #0
Codec : MPEG-1 Audio layer 2
Bit rate : 224 Kbps
Bit rate mode : CBR
Channel(s) : 2 channels
Sampling rate : 44 KHz
Resolution : 16 bits
Title : Audio Stream
Writing library : Xing (new)
Coherency/PlayTime : 2398
This program will compile on x64 and is officially supported (see post 6), but we won't be getting into that here.
Now, let's do it. The simplest way to do it is to use the pre-compiled binary for i386 because MediaInfo has a lot of dependencies. However, if you really do want to compile from source, there is a nice script to grab all the necessary dependencies for you and compile them. We won't cover that here, though.
Step 1: download
Code:
wget http://superb-west.dl.sourceforge.net/sourceforge/mediainfo/MediaInfo_0.7.4.7_CLI_Linux_i386.tar.bz2
Step 2: extract
Code:
tar xjvf MediaInfo_0.7.4.7_CLI_Linux_i386.tar.bz2
Step 3: put MediaInfo in your PATH
Code:
sudo mv MediaInfo_CLI_GNU/MediaInfo /usr/local/bin/
Step 4: usage
This is the first version released for Linux. There aren't many options for the CLI because, according to the author, there's less interest. So generate some interest!
It's a great little program. Some issues noted for this first Linux release in the readme that aren't working properly:
- Filename with non-american letters (other than A-Z, a-z)
- Matroska, FLAC, APE, MonkeyAudio and old Sound format parsers are disabled*
* seems to be a nonissue now according to the programmer, see post 6.
Hope you enjoyed this short howto.
Bookmarks