?? readme
字號:
camserv - A streaming camera server.Copyright (C) 1999-2002 Jon Travis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.-------------------------------------------------------------Now that all that stuff is out of the way. Welcome to one of my babyprojects -- a streaming webcam server. The idea behind this project is toallow as many people as possible (with all kinds of different cameras andplatforms) to be able to stream their webcam pictures on the web. ==============What you need:==============1) If you want to run the camera server program: You must either be running on a Linux system with a supported Video4Linux device (and have the correct kernel setup) See: http://roadrunner.swansea.linux.org.uk/v4l.shtml Or you must be running on FreeBSD with a bttv card installed. (NetBSD, and BSDi 4.0 have also been reported to work well) You can also use the video_basic module for pretty much any UNIX, however this module is mostly for demonstration of how to port video drivers. In addition you will need a rather recent version of the libjpeg library. Most Redhat distributions should be fine.2) If you only want to function as a relay: This should be able to compile on most unices, with solely this package.==============Setup:==============1) To use the camserv software: o Configure and build the system. You should be able to type ./configure in the toplevel camserv directory, and have it build just fine. o Next type `make install`. If you did not use any flags to the configure program, it should default to installing everything in /usr/local/bin, /usr/local/lib, and /usr/local/share. If not, it will install where you told it to. -- Important notes: Installed in /usr/local/lib are the filters and the video server libraries that the camserv uses. Installed in /usr/local/bin is the camera server binary Installed in /usr/local/share is the default camserv.cfg configuration file. o Setup a web page to reference the camera. Any web page should work fine. You will need to add an image reference of the form: <IMG SRC=http://machinename.com:9192> or alternatively <IMG SRC=http://machinename.com:9192/singleframe> (to only give out 1 frame, and then disconnect the client) where machinename.com is the address of the machine running the camserv software. If you change the port number in the camserv config file, you must also change this HTML tag. o Alternatively you may use the included 'javascript.txt' file which gives a simple example of how to use JavaScript to make pseudo-streaming JPG stream for IE users. Netscape users will be able to handle the real, non-javascript streamer however (and should use this). o Edit the camera configuration file. By default this is installed in /usr/local/share/camserv.cfg. You can either edit this file, or copy it to a location you prefer. There are reasonable defaults there, but if you changed the default installation directories in the configure script, you will need to modify paths. o run camserv. I do NOT suggest you run this as root! Instead, chown the /dev/video0 device, or whichever device you plan on using, to your user name. Without any arguments, camserv will use the camserv.cfg that was installed in /usr/local/share. If you use an argument it will use that one instead. o Load the web page with the <IMG> tag that you created earlier into your web browser. You should see the image as seen by your camera.2) To use the relay software: o Locate the port number of the remote camera server or other relay which you wish to connect to. (Also the IP) o Setup a web page similar to the camserv with an HTML tag such as: <IMG SRC=http://machinename.com:9192> where machinename.com is the machine runing the relay and 9192 is the localport you wish to use on the relay. o run `relay localport REMOTEIP REMOTEPORT`. o Load the web page with the <IMG> tag you created, to test it out. The remote camserv program must be running for all of this to work -- if it does, you will see the image as seen by camserv.============Important information about relays============The relay program is a little utility to offload your camera server! Thiscan be handy if: - You want to service a LOT of people - You have a wimpy connection to the internet - You camera server is being masqueraded by another machine.The traditional webcams on the internet have the following configuration:Client0 --------- \Client1 ----------+---- (your poor 28.8 link) [Your webserver ] /Client2 ---------With the relay, you can offload your poor link to some other machine witha fast connection. Such as the following:Client0 --- \Client1 ----+--- (beasty fat pipe ) [University] ---- (28.8) -> [ Your home ] /Client2 ---This will allow you to service all of the clients that you want by reallyonly sending out 1 clients worth of packets!NOTE: Relays can also be attached to other relays. Note that the latency between the snapped picture and the time it arrives on the remote machine will grow a lot with each relay you add. You can add as many relays as you want onto any camserv.WARNING: If the camserv is set to braodcast at maximum frames per second, this will probably saturate small connections. It would be a wise thing to TWEAK the max frames per second that you send to your relays. This will not flood your connection and the relays so badly, and will give you a much smoother, consistent picture.============Modification============Examine the camserv.cfg configuration file to make any changes you feel like. It should be fairly explanitory.===================================MAIN PROGRAM INFORMATION && OPTIONS===================================The camserv.cfg file is used to configure the way camserv behaves. If certain options are not specified, then camserv will warn you before using itsdefault values. Here are the currently supported camserv fixed sectionsand options. Note: These sections must be in camserv.cfg for it to functionproperly.------------------------------socket: The socket section is for providing information about how connection making && managing should be done. Variables listen_port = The socket # that the camserv program listens on. max_frames = Max frames to send to a client before disconnecting them. 0 disables this functionality max_bytes = Max # of bytes to send to a client before disconnecting them. 0 disables this functionality max_seconds = Max # of seconds to allow a client connection before disconnecting them. 0 disables this functionality.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -