[MPlayer-users] Getting info from mplayer for semi-automatic encoding script

Neilen brick at adept.co.za
Thu Jun 5 08:37:35 CEST 2003


Hi

I hope to write a kind of advanced semi-automatic encoding script, that
will allow close to optimal quality (en/trans)coding to be done with as
little human intervention as possible. I even have some crazy
quality-feedback ideas :) 

Right now, I need to get the time length of a movie file. When I use
mplayer -identify on avi files, the ID_LENGTH field seems to give me the
expected result.  

On DVDs, however, the value is always too low. It does seem to be
proportional to the movie length, however. If on a given DVD I say
(using the latest mplayer 0.9 release)

mplayer -identify dvd://3, I get (snipping everything before the ID_*
fields)

ID_FILENAME=DVD title 3
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=8000000
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=1.3333
ID_AUDIO_CODEC=a52
ID_AUDIO_FORMAT=8192
ID_AUDIO_BITRATE=384000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=4559

The real length of the DVD is, however, on the order of 6000s.

I have also noticed that the -ss command makes the same mistake when it
is used to seek to a start position in a DVD. ie. seeking to -ss 4550
will put me near the end of the movie, but the playing time shown is
about 6010s...

How can this discrepancy be resolved?

Thanks
Neilen




More information about the MPlayer-users mailing list