[MPlayer-users] File length

Corey Hickey bugfood-ml at fatooh.org
Wed Oct 29 23:48:15 CET 2003


Mario Ohnewald wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hello!
> How do i find out the file length of a file?
> 
> Cheers, Mario
> 

Do you mean the playing duration? You can add -identify and look at
ID_LENGTH. This won't work for all types of files; AVI is fine, and I
don't know what else.

If you don't want the video to play at all:
$ mplayer somefile.avi -nosound -vo null -frames 0 -identify

In a script or something:
mplayer somefile.avi -nosound -vo null -frames 0 -identify 2>/dev/null \
| grep ID_LENTH | cut -d"=" -f2

-Corey



More information about the MPlayer-users mailing list