Skip to content

Latest commit

 

History

History

mediadims

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

mediadims

Get audio/video duration or video width/height of a file with mediainfo.

Examples

Get duration in seconds (floating point) of an audio or video file

% mediadims duration somefile.mp3
142.30

Get dimensions of a video file

% mediadims width somefile.avi
1280
% mediadims height somefile.avi
720
% mediadims wxh somefile.avi
1280x720

Why merely wrap mediainfo?

All the heavy work of parsing audio/video files is done thanks to mediainfo which is very powerful. Unfortunately, its command-line interface is awkward (to say the least), so a wrapper is useful to make it more convenient. Hence mediadims.

Requirements