[MPlayer-users] exact length of a dvd title for mencoder bitrate calculations

Fabio Papa f.papa at mcmspa.it
Fri Aug 22 14:12:37 CEST 2003


On Friday 22 August 2003 12:11, Dominik Szczerba wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hey that's a nice trick. Takes time though, but it seems most reliable.
> BTW. this way the status line gives WRONG results TOO, exactly as during
Nope. Pay attention: I wrote -vo dummy, not -vo null as you did. My way the 
video gets completely ignored, so strange behaviour of some DVD disks, for 
example The matrix, gets out of the way, and you always get the right lenght.

> movie playback. But you inspired me to the following solution:
>
> mplayer -ao pcm -vo null
> expr `ls -l audiodump.wav | awk '{print $5}'` / 192000
>
> which gives me the duration in seconds (assuming stereo audio) - which I
> hope (havent encoded the movie yet) is finally correct (in agreement
> with neither movie OSD nor movie/dumped_audio status line).
>
> thanks a lot
> Dominik
>
> Fabio Papa wrote:
> >[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> >
> >On Thursday 21 August 2003 14:20, Dominik Szczerba wrote:
> >>[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> >>Hi,
> >>
> >>How do I get precise length of a dvd title? OSD gives wrong values
> >>(compatible with -ss, but wrong by a few minutes), numbers I see in the
> >>terminal dont help me either. How can I get the duration in secs - or
> >>frames that I could divide by fps?
> >
> >I use this trick: I extract an audio track with -ao pcm (specify also -vo
> >dummy, I you want it fast). This way, on the mplayer status line you'll
> > see an incrementing time. At the end of the process, you have the total
> > playing time.
> >
> >>thanks a lot!
> >>Domi

-- 
Fabio Papa
Engineering division
Machining Centers Manufacturing S.p.A.
viale F. e G. Celaschi 19 - Vigolzone (PC) Italy





More information about the MPlayer-users mailing list