[MPlayer-users] internet camera

Ariel asmplayer at dsgml.com
Sun Sep 23 17:01:40 CEST 2007


On Fri, 21 Sep 2007, Jerry Geis wrote:

> I have an internet camera with a limit of 4 connects.
> mplayer plays the camera fine. However I wish to provide more than 4
> connections for viewing.

> What kind of command line do I need for mplayer to connect to the
> camera, and then provide that
> feed to other connections? I'm only looking at about 10 connections so I
> hope mplayer can do it.

Try creating a fifo (the mkfifo command), then run mplayer -dumpstream 
into that fifo.

Next you'll need some way of duplicating the data in the fifo.

You'll probably need to write some kind of program to accept network 
connections. It reads the fifo once, and then copies the data to anyone 
who connects to it.

Pre-written programs you should check into are netkit and tee (with tee 
you can duplicate data, but you need to watch out what happens when no 
one reads from the fifo - it will stop the writer (mplayer) and that's a 
problem).

Or you can forget the fifo and just write a file and let people read from 
it, but that will take up diskspace. You'll need to rotate the file 
periodically.

I'm sure there are tons of programs out there that can act as media 
servers. You can point them at the fifo, or a file.

 	-Ariel



More information about the MPlayer-users mailing list