[MPlayer-users] command for know length of video files

Wesley S. wesley at ubuntu.com
Tue Feb 19 01:26:29 CET 2008


2008/2/19, Pierpaolo Gullˆa <airteknology at gmail.com>:
>
> Hi guys ,
>
> I'm creating a script that read length of a series of video files , put
> them in a txt files and send to internet .
>
> My problem it's to know the command for mplayer/mencoder for know
> information about a files , without encoding this files , something like
> this:
>
> mplayer/mencoder  file.mpg   option
>

Try "mplayer -identify file.mpg"

If you use it in a script, use grep/cut on that, like this:
mplayer -identify -ao null -vo null -frames 0 file.mpg | grep ID_LENGTH |
cut -d= -f2

-- 
Wesley Stessens <wesley at ubuntu.com>
Human Knowledge Belongs To The World - Antitrust (2001)
http://wesley.debianbox.be



More information about the MPlayer-users mailing list