Palantira multichannel interactive streaming solution | |||||||||||
|
Frequently asked questions
Why does the video stream look jerky in Mozilla/Netscape? The video stream from the server should always be embedded in a HTML page (see How can I embed the video stream in my web page?). Pointing the browser directly at it (that is, entering the server's address in the location bar) is very likely to give poor results. Why does the captured picture look corrupted?
First, try some other video capture application (e.g. xawtv) to make sure that
your device is properly working and the correct driver is loaded. VideoNorm NTSCor VideoNorm SECAMto the global section of your configuration file. Note that the VideoNorm directive was implemented in version 2.4.1 of the server; all previous versions forced the video norm to PAL. If you are running a pre-2.4.1 server, please upgrade (or fix the code in video.c by hand). Then check that the right video device and channel are selected (-d/-c command line options or VideoDevice/Channel configuration directives). If you are capturing from the TV tuner, check that it's properly tuned to an existing station (TunerFreq configuration directive). What should I know about the pwc driver?
When it was maintained by Nemosoft, this driver used to have a
closed-source companion driver called pwcx, which enabled support for
compressed capture modes.
Being distributed in binary-only form due to license issues, it was not
included in the Linux kernel source tree, and not all distributions included it
in compiled form either. Why does the captured picture look so small? Are you using the pwc driver? If so, you probably need to insert an additional module called pwcx or upgrade the driver. See here for a discussion of the issues with this driver. The server dies with "Fatal error: SWIN: No such file or directory". What can I do?
Your camera is most likely using the pwc driver.
The recommended fix is to upgrade pwc to the latest version. The server dies with "Cannot open video device /dev/video0: Cannot allocate memory". What can I do? If you are using the pwc driver, upgrade it. How can I embed the video stream in my web page?
<img src="http://SERVER:PORT/" alt="[Live stream]">where SERVER and PORT are the host name and port of your Palantir server (the default port number is 3000; it can be changed through the -p command line option or the TCPPort configuration directive). How can I embed the Java client in my web page?
For the applet to work, it must be downloaded from the same server running
Palantir. This means that you will have to run a web server in addition to
Palantir on that machine. <applet codebase="http://SERVER/PATH_TO_JAVA_CLASSES" code="pclient.class" width="430" height="340"> <param name="port" value="PORT"> </applet>You need to supply the <param name="port" value="PORT">line only if your Palantir server is not running on the default port (3000). Can I use the Java applet as a stand-alone client?
Sure. You need to embed it in a HTML wrapper and load the wrapper in the Java
appletviewer. <param name="server" value="palantir.santinoli.com"> <param name="port" value="14334">then launch the appletviewer: appletviewer index.html How can I control my QuickCam Sphere/Orbit webcam?
First, make sure the version of the pwc driver in use is at least 8.12. If this
is not the case, please upgrade it (you can download the source from the current maintainer's site or find
a precompiled package from your favourite distro's repository). Device { Carrier Internal 5 Direction readwrite Name "Pan" Hint "Camera pan" Range -7000 7000 Notifier client Visual Slider_X } Device { Carrier Internal 6 Direction readwrite Name "Tilt" Hint "Camera tilt" Range -3000 2500 Notifier client Visual Slider_Y }5 and 6 are the addresses of the pan and tilt devices, respectively. Defining the associated controls as Slider_X and Slider_Y rather than plain Slider causes them to be displayed along the video frame and not on a separated window. Please refer to the palantir.conf manual page for further details. How can I grab single frames for archival purposes?
The simpest way is to run curl, either
locally (on the server) or on a remote client: curl 'http://SERVER:PORT/?mode=single' -s -o snap.jpgThe above line saves a snapshot to the file snap.jpg. (The "-s" option makes curl run in "silent mode", i.e. prevents it from displaying the download progress meter or error messages). As a more elaborate example, the following shell script takes a snapshot approximately every 5 seconds. Frames are stored as 0.jpg, 1.jpg, 2.jpg etc. #!/bin/bash # Palantir timed capture script (suitable for FFmpeg) n=0 while true ; do curl 'http://SERVER:PORT/?mode=single' -s -o $n.jpg n=$(($n+1)) sleep 5 doneAlternatively, you can name frames according to the time (HHMMSS) they were captured: #!/bin/bash while true ; do curl 'http://SERVER:PORT/?mode=single' -s -o `date +%H%M%S`.jpg sleep 5 doneWith FFmpeg it is trivial to make a MPEG file out of the captured frames. Assuming they were named 0.jpg, 1.jpg etc., the following line creates a movie in which snapshots are played back at a rate of 10 per second: ffmpeg -r 10 -i %d.jpg movie.mpgMPlayer/MEncoder (which rely on the FFmpeg libraries) can be used, too. However, they expect the sequential frame names to be zero-padded, as in 0000.jpg, 0001.jpg, etc.; in order to produce the correct filenames, the above shell script has to be slightly modified: #!/bin/bash # Palantir timed capture script (suitable for MPlayer/MEncoder) n=0 while true ; do curl 'http://SERVER:PORT/?mode=single' -s -o `printf %04d $n`.jpg n=$(($n+1)) sleep 5 doneThe following line creates an MPEG4 movie in which snapshots are played back at a rate of 10 per second: mencoder "mf://????.jpg" -mf fps=10 -o movie.mpg -ovc lavc The following line combines the captured frames into an animated GIF named output.gif. Note that the intended playback speed (in this example, 5 frames per second) has to be specified both as a -mf fps=... and as a gif89a:... parameter: mplayer "mf://????.jpg" -mf fps=5 -vo gif89a:5:output.gif Can I limit the output frame rate?
Unfortunately, at the moment the transmitted frame rate cannot be directly
limited. Why do I get weird errors when compiling the server from source? I'm using Mandrake 9.x/SuSE 9.x. This is probably a side effect of some recent distributions' support for both video4linux and video4linux2. Until a more elegant solution is found, you might try to disable the videodev2.h file inclusion by amending the file /usr/include/linux/videodev.h. For example, on Mandrake turn the #if 1at line 7 into #if 0and on SuSE, comment or delete lines 7 and 8: #define HAVE_V4L2 1 #include <linux/videodev2.h>This is unlikely to have side effects on the compilation of other programs (unless - of course - they require the video4linux2 interface). For safety, you can undo the modifications to videodev.h after compiling Palantir. Why do I get the error "gsm.h: No such file or directory" when compiling the server from source? Your source code is obsolete. Starting with Palantir 2.5.1, the source code for the GSM library is included with the Palantir source, and problems related to incomplete installations of the GSM library should be gone forever. |