Mspookka

所属分类:网络编程
开发工具:Visual C++
文件大小:227KB
下载次数:5
上传日期:2012-10-04 00:02:29
上 传 者imitates
说明:  主要功能:视频的采集、编码、传输;支持持标准的RTSP,RTP/RTCP协议;
(Main functions: video capture, encoding, and transmission support holding standard RTSP, RTP/RTCP protocol )

文件列表:
Mspookka\spook\access_log.c (2930, 2005-01-27)
Mspookka\spook\aclocal.m4 (35468, 2005-02-08)
Mspookka\spook\audio.c (3471, 2004-11-09)
Mspookka\spook\base64_table.h (1211, 2004-06-21)
Mspookka\spook\bswap.h (2732, 2005-02-08)
Mspookka\spook\config.guess (43536, 2004-09-13)
Mspookka\spook\config.h.in (2395, 2005-02-08)
Mspookka\spook\config.sub (31108, 2004-09-13)
Mspookka\spook\configure (187485, 2005-02-08)
Mspookka\spook\configure.ac (10088, 2005-02-08)
Mspookka\spook\conf_parse.c (4962, 2004-06-21)
Mspookka\spook\conf_parse.h (1331, 2004-06-21)
Mspookka\spook\conf_scan.c (39545, 2005-02-08)
Mspookka\spook\conf_scan.l (2446, 2005-01-27)
Mspookka\spook\control.c (3445, 2004-11-07)
Mspookka\spook\conversions.c (7901, 2004-06-21)
Mspookka\spook\conversions.h (1804, 2004-06-21)
Mspookka\spook\COPYING (17992, 2004-06-21)
Mspookka\spook\decoder-mpeg4.c (6889, 2004-11-07)
Mspookka\spook\depcomp (14841, 2004-09-13)
Mspookka\spook\encoder-alaw.c (3681, 2004-11-07)
Mspookka\spook\encoder-jpeg.c (5152, 2005-01-27)
Mspookka\spook\encoder-mp2.c (7249, 2004-11-09)
Mspookka\spook\encoder-mpeg4.c (8638, 2005-01-27)
Mspookka\spook\encoders.h (850, 2005-01-27)
Mspookka\spook\event.c (10216, 2005-01-27)
Mspookka\spook\event.h (2974, 2005-01-27)
Mspookka\spook\filter-framedrop.c (4215, 2005-01-27)
Mspookka\spook\filters.h (813, 2004-06-21)
Mspookka\spook\frame.c (7873, 2005-02-08)
Mspookka\spook\frame.h (3082, 2005-01-27)
Mspookka\spook\global_config.h (2607, 2005-01-27)
Mspookka\spook\http-auth.c (8249, 2004-12-10)
Mspookka\spook\http.c (9654, 2004-12-06)
Mspookka\spook\input-dc1394.c (7088, 2005-01-27)
Mspookka\spook\input-oss.c (5902, 2004-12-06)
Mspookka\spook\input-v4l.c (16624, 2005-01-27)
Mspookka\spook\input-v4l2.c (15193, 2005-02-08)
Mspookka\spook\input-vdig.c (8091, 2005-01-27)
Mspookka\spook\inputs.h (876, 2004-09-13)
... ...

Spook Live Video Streamer ========================= * About Spook Spook is a daemon for capturing, processing, encoding, and distributing live video and audio streams. It can be used for webcams, video surveillance, live television/video programming distribution, webcasts, and even make-shift video conferencing. Video input can be fed from Video4Linux(1/2) devices and Firewire IIDC cameras, and audio input can be fed from OSS devices or ALSA devices via the OSS compatibility layer. Supported video encoders are MPEG4, via XviD, and JPEG, via JPEGlib. The only compressed audio format supported currently is MP2 (MPEG1 layer 2) via a built-in encoder. MPEG4 and MP2 RTP streams are available via RTSP and JPEG stills are available via HTTP. * License and warranty 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 * Prerequisites You may need several libraries to compile Spook, depending on the modules you want to use: * XviD 1.0.X This should be a recent enough version of XviD that it uses the dev-api-4 interface. The old 0.9.x tree won't cut it. I use 1.0.0_rc2 but any later version should work as well. If you're running on a PowerPC architecture, you need at least 1.0.0_rc4. * libdc1394 This is used to control Firewire IIDC cameras under Linux. I've used versions 0.9.1 and 0.9.3. If you're using a kernel older than 2.4.23, use version 0.9.2. Otherwise, use the latest version. * jpeg-6b You really should already have this, but apparently some distributions don't install this by default if you don't install X. See if your distribution has a package called "jpeg" or "jpeg6b" or "jpeglib" before installing from source. You will need to have your kernel sources installed and available if you want to use: * The Video4Linux2 input module. * Special support for the V4L1 PWC driver (for "Phillips USB Webcam", which includes a number of Logitech webcams). Note: Spook doesn't need X. There's no GUI, so there's no need for X libraries. However, libdc1394 chokes when it tries to compile the example applications, so you might have to edit the Makefile to get it to finish the build. Now that you have the necessary libraries installed, it would be a good idea to make sure your video source works: If you have a Firewire cam on Linux, I recommend testing with Coriander from . If Coriander can't talk to the camera, neither can Spook. (Note: Recent versions of Coriander require the latest libdc1394. If you have a libdc1394 older than 0.9.3, try Coriander 0.33.) If you plan to use a frame grabber, XAWTV will probably work fine. If you have a USB webcam, I don't know what program you might use, but try to test it with something before trying Spook. * Compiling Spook Spook uses Autoconf and Automake to generate the Makefiles. Run the `configure` script in the source tree to determine which libraries you have available. When configure finishes, it will list the modules that will be compiled. If a module that you need is disabled, make sure you have the necessary libraries installed. You can force the issue by using a --enable flag to configure; for example: `configure --enable-input-dc1394` Then when configure encounters any dependencies missing for that module, it will abort and print a message that will hopefully tell you what is missing. If your Linux kernel sources are installed somewhere other than /usr/src/linux, pass the "--with-kernel-source=/usr/local/somewhere" option to the configure script. The kernel source tree is necessary for V4L2 and the PWC-specific V4L functions, but if you don't need either of these, Spook will build fine without the kernel tree. After everything is configured to your satisfaction, run `make` to do the build. (You can do a `make install`, but it's not recommended.) * Configuring Spook The configuration file for Spook is named spook.conf, and at the moment it is read from the current directory. Eventually spook.conf will move to a standard system directory, but since Spook doesn't yet daemonize itself, I recommend running Spook out of the source directory. spook.conf is divided into global options and block declarations. The global options set parameters such as the TCP port number for incoming connections. The block declarations define inputs, filters, encoders, and outputs. In brief, each block defines a specific function that should be performed on a video stream, and the stream input(s) and output(s) for that function. The "Input" for each block must match the "Output" from a previous block. Frame grabbers and audio capture devices will have no "Input" because they get media from the hardware, and RTSP and HTTP outputs will have no "Output" because they send media over the network to clients. The spook.conf.dist file contains well-commented examples of all supported modules. Outputs are shown for a single RTSP video(+audio) network stream and a JPEG snapshot stream served via HTTP. There are several possible ways to configure Video4Linux frame grabbers. * If you are running kernel 2.6 and your frame grabber supports compressed video formats (MJPEG/MPEG), use the V4L2 module. * If you are running kernel 2.6 and your frame grabber driver is written for V4L2 (including BTTV), use the V4L2 module. * Otherwise, use the V4L module. There are two example V4L configurations in the spook.conf file. One is for frame grabber cards with analog video inputs which should be simple to configure. The other is for USB webcams which are more of a challenge. Spook needs to know the frame rate of the input to configure the MPEG4 encoder, but there is no standard method for configuring the frame rate of USB webcams. Currently, the V4L module will attempt to detect and configure Philips webcams that use the pwc driver (including many Logitech cams), but if all else fails try using the "FrameRate auto;" directive and Spook will attempt to guess the framerate of the device. This will take a few seconds and isn't very accurate, but it should work well enough to get you going. For OSS audio, Spook expects the mixer device to be set up in advance. This means aumix or similar should be used to select the correct input port and set the levels. * Running Spook Spook accepts three optional flags: -c specifies the path to the config file -f starts Spook with verbose logging -D starts Spook with full debug logging turned on The default config file location is "./spook.conf", so if you run Spook from the build directory this option is unnecessary. The -D and -f flags will cause additional log information to be printed; -f is good for tracking down configuration and client problems, and -D is really only useful for developers. If (when) you report bugs, please send the last few dozen lines of output from running Spook with the -D flag. * Viewing video from Spook After all that work, it's time to verify that everything works correctly. For this section, I'll assume that you're using the example spook.conf and you're running Spook on a host with the IP address 192.168.123.45. HTTP is easy. Point a web browser at . You should see a still image captured from the camera within the last five seconds. If this doesn't work, something serious is wrong and you should fix it before proceeding with the MPEG4 testing. Check the output to your terminal to see if the DC1394 or V4L(2) module was able to connect to the camera and start the video transfer. RTP is a bit harder to get working right. First of all, you should start by trying to view the stream from a system on the local network with no firewalls or NATs in the way. If you can, try to view the stream from the system running Spook, as this will rule out any network connectivity issues. You basically have three options for client software, depending on your platform: VLC, MPlayer or Apple QuickTime Player. On both Linux and Win32, VLC is the player most compatible with all the features of Spook. You may have to compile it from source against the Live.com libraries, however, as the VLC binary releases for some platforms don't have RTSP support. VLC lives at: . On Linux, MPlayer can be compiled against the Live.com streaming libraries as described here: . However, MPlayer can ONLY play streams with no audio! If you have a video-only stream, you should be able to execute `mplayer rtsp://192.168.123.45:7070/` to play the stream. Older versions of MPlayer might need the "-fps 30" option to specify the framerate. If there are firewalls or NATs between the player and the server, use the "-rtsp-stream-over-tcp" to force the media over the TCP session. On Win32 or Mac, use Apple Quicktime to play the stream. If there are firewalls or NATs between the player and the server, you might have to change the "Transport Settings" to force the use of "HTTP" for streaming. Select "Open URL" from the menubar and type "rtsp://192.168.123.45:7070/". QuickTime should initiate the RTSP session and begin buffering the stream. Note that QuickTime always uses a three-second buffer, which is annoying with a live stream, and I can't find a way to disable it. * Future work Obviously, there's a lot to be done to improve Spook. Other than fixing the obvious deficiencies and limitations discussed earlier, here are the features I'm working on, roughly by priority: * Revamped configuration and better error handling * Better authentication and access control * Relay agent for RTP streams * Simple image filters like cropping, rotation and mirroring * Multicast RTP * Other "novelty" output types, like VNC and aalib If you want to receive information about Spook updates, please visit the Freshmeat page for Spook at and use the "Subscribe to new releases" feature. * Contact Spook is written and maintained by Nathan Lutchansky. Send suggestions, bug reports and patches to . The Spook webpage at where updated releases and documentation may be found. Nathan Lutchansky 2005-02-07

近期下载者

相关文件


收藏者