[MPlayer-users] Movie Duration

Giacomo Comes comes at naic.edu
Tue Jun 19 15:44:03 CEST 2007


On Tue, Jun 19, 2007 at 07:07:41AM -0400, The Wanderer wrote:
> Alexander Roalter wrote:
> 
> > info at danielerossi.net wrote:
> 
> > 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.
> 
> I've seen it happen - I remember files with a claimed length of 17
> minutes which were significantly shorter (~3 minutes), and files with a
> claimed length of 10 minutes which were significantly longer. (These are
> OSD display numbers.) This almost certainly depends on the information
> in the container.
 
The only reliable way I have found so far is:

mencoder source.video -ovc copy -nosound -o /dev/null -quiet 2>/dev/null | awk '/^Video stream:/{print $10+$10/$12}'

It is not the fastest way, but if gives the exact duration all the times.

Ciao
Giacomo

> ...if I run across those files again, it might be worth providing them
> as samples in case the detection can be fixed.
> 
> -- 
>        The Wanderer



More information about the MPlayer-users mailing list