[MPlayer-users] Slave mode - detecting end of file.

Oliver Seitz info at vtnd.de
Mon Feb 28 11:29:52 CET 2011


> I have been googling around for a while trying to figure out how I can
> detect when a song has finished playing on an instance of mplayer in
> (idle) slave mode.

How about checking stdout? While playing, you'll get an output every 0.1 
seconds or so, if there is no data for more than 0.2 seconds, the file 
has ended.

Or, in the output is both the position and the duration:

A: 299.2 (04:59.2) of 299.0 (04:59.0)  1.5%

If both is the same, the file should be over.

Greets,
Kiste


More information about the MPlayer-users mailing list