[MPlayer-users] Slave mode: set_property time_pos syntax?
Phil Rhodes
phil_rhodes at rocketmail.com
Fri Jul 27 17:18:43 CEST 2007
Hi,
I'm in the process of writing what you can consider to be a frontend for
mplayer, using it in slave mode. Actually it's a bit more than that, since
it does MIDI and RS232 device control as well, but for the sake of this
discussion it's probably safe to treat it as a straightforward slave-mode
frontend. OS is XP Pro and I am using the MPlayer Sherpya-SVN-r23169-4.1.2
binaries. Control is via windows scripting host, with the mplayer process
created using WScript.Shell::Exec(). I'm sending and receiving via the
returned Process object's StdIn and StdOut methods. My commandline looks
like this:
c:/mplayer/mplayer.exe -slave -idle -osdlevel 0 -colorkey 000000 -adapter
2 -fixed-vo -vf eq -channels 6 -af
pan=4:1:0:0:0:0:1:0:0:0:0:0:0.5:0:0:0:0.5:0:0:1:0:0.2:0.2:0.2:0.2
As part of my use of slave commands, most of which work fine, I'm attempting
to give my users the option to skip part of the file by sending a
"set_property time_position x" command to mplayer just after I "load
filename.avi". Although I'm sending a lot of get_time_position updates at
the time, all of which work fine, when I send the set_property command,
absolutely nothing appears to happen. Here's a snippet of logging produced
by my frontend, where "sent" is what I'm sending to mplayer, and "read" is
what I'm getting back:
Fri Jul 27 13:03:57 UTC+0100 2007 : Sent: get_time_pos
Fri Jul 27 13:03:57 UTC+0100 2007 : Read: ANS_TIME_POSITION=6.1
Fri Jul 27 13:03:58 UTC+0100 2007 : Sent: set_property time_pos 30
Fri Jul 27 13:03:58 UTC+0100 2007 : Sent: get_time_pos
Fri Jul 27 13:03:58 UTC+0100 2007 : Read: ANS_TIME_POSITION=6.3
...no joy. I'd expect to see the reported time position leap to 30 (and the
playback as well, of course). I suspected that this might be due to my using
compressed files with large gaps between keyframes, on the assumption that
mplayer might not be able to seek to a keyframe that's nearer thirty seconds
than I am already. So, I tried it with an uncompressed AVI, every frame
therefore being a keyframe, but the behaviour didn't change.
Am I using incorrect syntax or something? I've put the full log of
everything I sent and received here:
www.1159productions.com/test182/session.log
Any pointers gratefully received.
Phil
More information about the MPlayer-users
mailing list