[MPlayer-users] Display File Encoding

The Wanderer inverseparadox at comcast.net
Sun Feb 12 04:15:56 CET 2006


n0dalus wrote:

> On 2/12/06, Lionel Morrison <lmorrison at hmsystems.net> wrote:
> 
>> 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.
> 
> The `file` utility that comes with most distributions can detect most
>  of this info (at least for known file types).

For me, it doesn't provide any such information for MPEG files - just
the container format and the fact that it is a system stream. It provies
some of the information for AVI files, but not all of it.

> You can also use mplayer with -identify and a few options to stop it
> from playing anything (-frames 0 -vo null -ao null).

The '-vo null' and '-ao null' options should not be necessary, since
'-frames 0' should prevent MPlayer from playing anything regardless.

> Check out the midentify script in the TOOLS directory of the mplayer
> source; it gives easily parseable information about files as well (it
> uses -identify then cleans it up a bit).

Or just 'mplayer -identify -frames 0 | grep ^ID_', which produces less
parseable output but can be rather more convenient for times when you
just want to read the information yourself rather than have a program
parse it.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.




More information about the MPlayer-users mailing list