[MPlayer-users] help! (Mplayer -identify gives wrong video length)

Alexander Roalter alex at roalter.it
Thu Nov 22 12:16:55 CET 2007


Ognjen Bezanov wrote:
> Hello Everyone!
> 
> I'm having an issue with mplayer -identify. When I try to get the length 
> of a MPEG from a DVD track  (dumped with mplayer dvd://1 -dumpstream 
> -dumpfile etc...) It gives me the wrong value. It says the movie file is 
> 3h:59m long, even though if I watch it, the movie finishes after 1h and 
> 42mins.
> 
> The command I type to get the info is:
> 
> mplayer -identify -endpos 0 /path/to/file  2>&1 | grep -i length
> 
> (I also tried "mplayer -identify -frames 0 /path/to/file  2>&1 | grep -i 
> length" as someone recommended on the list)
> 
> Both of these give  me ID_LENGTH=14369.74. Also when I play the file and 
> select the time on the OSD, it tells me 3h 59mins remaining, but if I 
> fast forward the movie ends at 1h 42min.
> 
> Am I doing something wrong? How can I get the actual length of the video 
> file?
> 
> Thanks!

3:59 is quite suspiciously looking. AFAIK the length via -identify is 
not obtained by looking at the entire file, but trusting what's written 
in the headers. If I chop a mpeg at 1MB, -identify still should display 
the same length as before. So it's safe to assume the authoring of the 
DVD track was not done well.

Just to make sure: the movie finishes regularly at 1:42, not that it is 
cut off at that point with 2:28 still to go?

-- 
cheers,
Alex



More information about the MPlayer-users mailing list