If you want to extract info from multimedia formats like WebM, Matroska and others you have a variety of tools to choose from.
MediaInfo
MediaInfo is a project dedicated to providing a tool that displays the most relevant technical and tag meta data for video and audio files in a unified way for the plethora of formats out there. It is in the repositories as of 12.04 and can be installed via the mediainfo
package.
Example output looks like this:
$ mediainfo big-buck-bunny_trailer.webm
General
Unique ID : 94077224337973666327274415816295077565 (0x46C69D45A185A9294D3D0A2F750056BD)
Complete name : big-buck-bunny_trailer.webm
Format : WebM
Format version : Version 1
File size : 2.06 MiB
Duration : 32s 480ms
Overall bit rate mode : Variable
Overall bit rate : 533 Kbps
Encoded date : UTC 2010-05-20 08:21:12
Writing application : Sorenson Squeeze
Writing library : http://sourceforge.net/projects/yamka
Video
ID : 1
Format : VP8
Codec ID : V_VP8
Duration : 32s 480ms
Bit rate : 439 Kbps
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.076
Stream size : 1.70 MiB (82%)
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 32s 480ms
Bit rate mode : Variable
Bit rate : 64.0 Kbps
Channel(s) : 1 channel
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 254 KiB (12%)
Writing library : libVorbis (Everywhere) (20100325 (Everywhere))
Language : English
Default : Yes
Forced : No
Exiftool
Exiftool from the libimage-exiftool-perl
package knows a lot of formats, too. Additionally it can write meta data and provides a lot of information about the file similar to mediainfo. For more information see the exiftool manpage.
Example output looks like this:
$ exiftool big-buck-bunny_trailer.webm
ExifTool Version Number : 8.60
File Name : big-buck-bunny_trailer.webm
Directory : .
File Size : 2.1 MB
File Modification Date/Time : 2012:09:17 20:46:02+02:00
File Permissions : rw-rw-r--
File Type : WEBM
MIME Type : video/webm
EBML Version : 1
EBML Read Version : 1
Doc Type : webm
Doc Type Version : 1
Doc Type Read Version : 1
Timecode Scale : 1 ms
Duration : 0:00:32
Date/Time Original : 2010:05:20 08:21:12Z
Muxing App : http://sourceforge.net/projects/yamka
Writing App : Sorenson Squeeze
Video Frame Rate : 25
Video Codec ID : V_VP8
Video Codec Name : VP8
Image Width : 640
Image Height : 360
Track Number : 2
Track Type : Audio
Track Timecode Scale : 1
Audio Codec ID : A_VORBIS
Audio Codec Name : Vorbis
Audio Sample Rate : 44100
Image Size : 640x360
Mkvtoolnix
Specific to Matroska formats, like WebM, you can use mkvmerge -i
or mkvinfo
from the mkvtoolnix
package or other tools for manipulating and creating Matroska files.
Example output looks like this:
$ mkvmerge -i big-buck-bunny_trailer.webm
File 'big-buck-bunny_trailer.webm': container: Matroska
Track ID 0: video (V_VP8)
Track ID 1: audio (A_VORBIS)
$ mkvinfo big-buck-bunny_trailer.webm
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: webm
|+ (Unknown element: EBMLVoid; ID: 0xec size: 4)
|+ Doc type version: 1
|+ Doc type read version: 1
+ Segment, size 2165127
|+ Seek head (subentries will be skipped)
|+ Segment information
| + Segment UID: 0x46 0xc6 0x9d 0x45 0xa1 0x85 0xa9 0x29 0x4d 0x3d 0x0a 0x2f 0x75 0x00 0x56 0xbd
| + Timecode scale: 1000000
| + Duration: 32.480s (00:00:32.480)
| + Date: Thu May 20 08:21:12 2010 UTC
| + Muxing application: http://sourceforge.net/projects/yamka
| + Writing application: Sorenson Squeeze
|+ Segment tracks
| + A track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 3383112130
| + Track type: video
| + Default duration: 40.000ms (25.000 frames/fields per second for a video track)
| + Timecode scale: 1
| + Codec ID: V_VP8
| + Codec name: VP8
| + Video track
| + Pixel width: 640
| + Pixel height: 360
| + A track
| + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
| + Track UID: 1552874170
| + Track type: audio
| + Timecode scale: 1
| + Codec ID: A_VORBIS
| + CodecPrivate, length 3097
| + Codec name: Vorbis
| + Audio track
| + Sampling frequency: 44100
|+ Cues (subentries will be skipped)
|+ Cluster
Libav/FFmpeg
At last there is avprobe
from the libav-tools
package, by the Libav project who forked FFmpeg.
Example output looks like this:
$ avprobe big-buck-bunny_trailer.webm
avprobe version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2007-2012 the Libav developers
built on Jun 12 2012 16:52:09 with gcc 4.6.3
[matroska,webm @ 0x19119a0] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'big-buck-bunny_trailer.webm':
Duration: 00:00:32.48, start: 0.000000, bitrate: N/A
Stream #0.0(eng): Video: vp8, yuv420p, 640x360, PAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Stream #0.1(eng): Audio: vorbis, 44100 Hz, mono, s16 (default)
But I agree, it would be useful if file
showed some information about the video. Please make a feature request in the appropriate channels (which are not on askubuntu).