[MPlayer-users] mplayer resume playback script

Steve Dibb steve at wonkabar.org
Wed Jul 26 19:07:06 CEST 2006


Hi all,

I've written a tiny php shell script[1] that acts as a wrapper to 
mplayer, and saves the playback position of a media file.  When you 
start it up again, it will resume playback where you left off.

The only dependencies are PHP 4.3 or above with CLI access.  Running the 
program is just a matter of starting up the file and then passing your 
mplayer arguments:

php mplayer-resume.php foo.mkv -vo xv

If a playback position file exists for 'foo.mkv', it will seek ahead.  
To get a playback position file, you need to setup either LIRC or a 
keyboard event to send 'get_time_pos'.  See the docs included in the 
file for instructions on setting that up. :)

If someone can test this for me, I'd appreciate it.  I don't have PHP4 
installed on any of my boxes, so I can't test it with that, though it 
should work fine.  Works great with PHP5.

Drop me a line with any bugs, etc. :)

Thanks

Steve

1. http://wonkabar.org/bend/browser/mplayer-resume.php?format=txt



More information about the MPlayer-users mailing list