[MPlayer-users] Movie Duration

Bastiaan Nelissen bastiaan.nelissen at mac.com
Tue Jun 19 12:10:33 CEST 2007


The thing is i want to do this in my (ssh) console, this means no video output, text only.
so 'o' is not an option.
 

On Tuesday, June 19, 2007, at 11:31AM, "Alexander Roalter" <alex at roalter.it> wrote:
>info at danielerossi.net wrote:
>> 
>> 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)
>
>Although I think pressing the 'o' button for the OSD a few times (until 
>00:31:23/01:28:44 or somethink like it appears) is the best solution, 
>you can get the length of the video with the -identify parameter and 
>grepping for ID_LENGTH. It returns the length in seconds of the video.
>
>In contrast to the current playtime, which is not always reliable (as in 
>DVDs it often resets once during playback), I did never find the total 
>runtime wrong yet.
>
>-- 
>cheers,
>Alex
>_______________________________________________
>MPlayer-users mailing list
>MPlayer-users at mplayerhq.hu
>http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>
>



More information about the MPlayer-users mailing list