[MPlayer-users] command for know length of video files
Wesley S.
wesley at ubuntu.com
Tue Feb 19 01:27:42 CET 2008
2008/2/19, Wesley S. <wesley at ubuntu.com>:
>
> 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
>
I forgot to mention, the output will be in seconds, so you will probably
want to convert that to hours:minutes:seconds somehow.
Good luck,
--
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