Get audio/video duration or video width/height of a file with mediainfo.
% mediadims duration somefile.mp3
142.30
% mediadims width somefile.avi
1280
% mediadims height somefile.avi
720
% mediadims wxh somefile.avi
1280x720
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
.
- python3
- mediainfo command-line tool