[MPlayer-users] Movie Duration

info at danielerossi.net info at danielerossi.net
Tue Jun 19 11:15:33 CEST 2007



Bastiaan Nelissen wrote:
> I cant find a way to print the movie duration to my screen with mplayer.
> like:
> Title              Time:
> movie.mp4  01:28:33
>
> is this possible, if so, how?
> _______________________________________________
>
>   
(for windows, should be similar in unix)


mplayer "yourfile.ext" 2>&1 | findstr "VIDEO AUDIO format Stream"
or in short :
mplayer "yourfile.ext" 2>&1 | findstr "VIDEO AUDIO"
but you have to stop the application.
(if you use -vo null -ao null you get only video stream information)

output is:

VIDEO:  [RV40]  320x240  24bpp  20.000 fps    0.0 kbps ( 0.0 kbyte/s)
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)


or try ffmpeg:
ffmpeg -i "yourfile.ext" 2>&1 | findstr "Duration Stream"

output is:
  Duration: 01:22:51.1, start: 0.000000, bitrate: 226 kb/s
  Stream #0.0: Video: RV40 / 0x30345652, 320x240, 126 kb/s, 12.00 fps(r)
  Stream #0.1: Audio: aac, 44100 Hz, stereo, 96 kb/s

and you don't need to stop the application..

-d




More information about the MPlayer-users mailing list