[MPlayer-users] Streaming to mplayer with php, how that ?
Kevin DeKorte
kdekorte at gmail.com
Sat Oct 3 18:32:04 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/03/09 09:29, Cedric Malitte wrote:
> 2009/10/3 Oliver Seitz <info at vtnd.de>
>
>>
>>> User action -> input triggers -> php process -> send video to mplayer
>>>
>>> If no action, plays randomly some "waiting" videos.
>>
>> I've done it this way:
>>
>> User action -> php process -> tell mplayer which file (or stream) to play
>>
>> Why do you have to stream it to mplayer?
>>
>> Greets,
>> Kiste
>>
>
> I thought streaming would be easier because I do not want to close and
> reopen mplayer, but I might misunderstand how mplayer works.I tested mplayer
> to stay opened and load a file, but I'm unable to catch when mplayer is done
> playing the curent video.
Current mplayers emit an ID_EXIT=EOF or something similar when mplayer
exits. You need to use the -identify option to see it.
Another option would be to use gnome-mplayer and just leave it running
and send it a dbus command it have it open a file.
To send command to ALL running gnome-mplayers
dbus-send --type=signal / com.gnome.mplayer.Play
string:'http://www.hotmail.com/playfile.asx'
When you know the pid of gnome-mplayer specified
dbus-send --type=signal /pid/[pid] com.gnome.mplayer.Play
string:'http://www.hotmail.com/playfile.asx'
When --window is specified to gnome-mplayer (for embeddeding)
dbus-send --type=signal /window/[windowid] com.gnome.mplayer.Play
string:'http://www.hotmail.com/playfile.asx'
When --controlid is specified to gnome-mplayer
dbus-send --type=signal /control/[controlid] com.gnome.mplayer.Play
string:'http://www.hotmail.com/playfile.asx'
There are many other options that just "Play" as well, such as "Add",
"Pause", "Stop", "FastForward", "Reverse", "Seek"
you can start gnome-mplayer like this
gnome-mplayer --window=-1 --controlid=1234
And it will remain hidden until a video is played, so that you can send
it music files to play in the background.
It does more things as well.
>
> As you already did it, and reinventing the wheel is useless...
> Any clue or code to share ? ;)
>
> Greets,
> Cedric
Hope that is helpful,
Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkrHfIMACgkQ6w2kMH0L1dH+XQCePer0pYnspFss9DzvugeSYlBS
ZG4AoIGBzvfmY2WrGMEawL8ZgOKwzQwh
=I9kq
-----END PGP SIGNATURE-----
More information about the MPlayer-users
mailing list