[MPlayer-users] Re: Display File Encoding

Drake Guan drake.guan at gmail.com
Tue Feb 14 06:14:34 CET 2006


Lionel Morrison <lmorrison <at> hmsystems.net> writes:

> 
> I new to mplayer/mencoder and I'm intrested if their is any way to 
> simply output the video/audio encoding method for a particular file
> 
> For example the sample rate, bit rate and type of audio file (rm, aac, 
> ogg etc)
> Same for video. encoder, frame rate, key frames etc etc etc
> 
> Or if their is some other linux based command line utility that someone 
> can recommend.
> 
> Thanks
> Lionel
> lmorrison <at> hmsystems.net
> 

you can utilize this script acompanied from mplayer ;)


script: midentify
---------------------------------------------------------------
#!/bin/sh
#
# This is a wrapper around the -identify functionality.
# It is supposed to escape the output properly, so it can be easily
# used in shellscripts by 'eval'ing the output of this script.
#
# Written by Tobias Diedrich <ranma+mplayer at tdiedrich.de>
# Licensed under GNU GPL.

if [ -z "$1" ]; then
        echo "Usage: midentify <file> [<file> ...]"
        exit 1
fi

mplayer -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
        sed -ne '/^ID_/ {
                          s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p
                        }'
-----------------------------------------------------------------

usage:
midentify ooxx.avi


or you can use transcode's tcprobe 
usage:
tcprobe -i ooxx.avi





More information about the MPlayer-users mailing list