[MPlayer-users] MPlayer Total Length in Slave Mode

Dominic Driver dominic.driver at paragon.co.nz
Thu Dec 3 20:35:38 CET 2009


Hi Guys,

MPlayer SVN-r28605-4.3.2
Kernel 2.6.28.6 Vanilla

I've got an in-depth question here, so bear with me whilst I explain it.

I'm capturing MPEG2 data using a PVR150 card. I can capture up to 'n' *.mpg files.

Without remuxing the files, I use DVD Author to create an authored DVD format using the *.mpg files. All the *.mpg files are authored to be in the same DVD Title. This whole process works correctly, and there are no problems at all with the resulting DVD format. It can be burned to disc and played back in all kinds of DVD players as expected.

However, I'm also using MPlayer to playback the authored files/Burned DVD using slave mode.

As a work around for adjusting the playback speed both forwards and backwards, I cyclically "seek" forwards/backwards by 2/4/8/16/32 seconds every second (it's a rudimentary method, but satisfactory. I know I could use the speed_mult command to set the speed, but I can't do this when reverse-playing).

To make sure I don't try and skip past the end of the movie, I do a check before seeking to see if the (current position + seek position > title length) and act on that accordingly.

This check is carried out by doing:
1) get_property time_pos - This gets the current time position
2) get_time_length - This gets the total title length
3) perform calculation

However, the response to 2) above seems to give me the total length of the original mpeg file which is currently playing, even though it's supposedly been amalgamated into the DVD-style movie title.

My question is: How do I get the ACTUAL TOTAL title length of the DVD title currently playing? Can it be done in MPlayer, or is there something I have to do when authoring?

Also, I'm open to suggestions on how to improve my rudimentary FastFwd and Rewind implementation.

Any thoughts?

-- 
Dominic Driver



More information about the MPlayer-users mailing list