Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 42

Thread: How to setup a webcam server using webcam-server (Includes daemon script)

  1. #21
    Join Date
    Apr 2009
    Location
    Saitama, Japan
    Beans
    132
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    I am also having issue with the setup. I get a black screen when connecting via the web.

    I am running ubuntu 10.4 server edition. How can I check if my webcam is working on the server? I've read the line in the OP where you can use two different apps to test, but I am using a server ubuntu and not a client.

  2. #22
    Join Date
    Nov 2010
    Beans
    1

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Hi All. Thanks for the tutorial. I had a problem with the init script.. the -f flag of the pkill command wasn't killing the webcam-server process, even though it was removing the lock file. I knocked another one up which I'll paste below. Works for me on ubuntu 9.10


    Code:
    #!/bin/sh
    
    SERVER_NAME=webcam-server
    SERVER_BIN=/usr/bin/webcam-server
    LOCK_FILE=/var/lock/$SERVER_NAME
    RTRN=0
    OPTIONS='-v -g 320x240 -p 8888'
    
    start() {
    
        if [ -f $LOCK_FILE ] ; then
            echo "$SERVER_NAME appears to be running"
            return
        fi
    
        echo "Starting webcam streamer: $SERVER_NAME."
        export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
        nohup $SERVER_BIN $OPTIONS > /dev/null 2>/dev/null &
        RTRN=$?
    
        if [ $RTRN -eq 0 ]; then
            touch $LOCK_FILE
        else
            echo "Error starting $SERVER_NAME: returned $RTRN"
    
        fi
    }
    
    stop() {
        if [ ! -f $LOCK_FILE ]; then
           echo "$SERVER_NAME is not running"
           return
        fi
    
        echo "Stopping webcam streamer: $SERVER_NAME."
        pkill -f "$SERVER_BIN" 
        RTRN=$?
    
        if [ $RTRN -eq 0 ]; then
            rm -f $LOCK_FILE
        else
            echo "Error stopping $SERVER_NAME: returned $RTRN"
        fi
    }
    
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    RTRN=1
    esac
    
    exit $RTRN

  3. #23
    Join Date
    Jan 2009
    Location
    South Carolina
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Thank you, this works great! I built an app in REAL Studio that refreshes it with an HTML Socket (whatever it's called), and now I have a nice little security system.

  4. #24
    Join Date
    Mar 2007
    Location
    Earth
    Beans
    44
    Distro
    Xubuntu 10.04 Lucid Lynx

    Question Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Hello All

    I was wondering if anybody has ever been able to successfully get webcam-server to work? I have been trying for a while now, and I just cannot get it to work for me.

    I am running XUbuntu 10.04 on a Dell PowerEdge T110. I am using a Logitech C250 Webcam. First, I tried Cheese, and that worked great, so I know my webcam is supported. Next, I installed webcam-server using apt-get, no problems there either. I have been reading information on how to get this set up in several locations:

    Code:
    http://hacktivision.com/index.php/2009/06/16/setting-up-an-ubuntu-webcam-server?blog=2
    http://webcamserver.sourceforge.net/
    http://ubuntuforums.org/showthread.php?t=1194630
    I can successfully point my browser to http://localhost:8888 and see myself on the page. The issue comes with accessing the cam from an html document. I copied all of the files from usr/share/doc/webcam-server/applet/ to /var/www/webcam/ , but there is no success. Whenever I attempt to view it from localhost, I get an Apache error message stating:

    Code:
    [Sat Apr 23 19:23:16 2011] [error] [client 127.0.0.1] File does not exist: /var/www/webcam/WebCamApplet.class, referer: http://127.0.0.1/var/www/webcam/webcam.html
    And, when I attempt to access the page from another computer, all I get is the init.jpg file, no Apache error either.

    This is becoming really frustrating, so I was hoping somebody out there actually got this to work, and could help me out. Any and all advice will be greatly appreciated.

    Thanks for reading, and have a great day.

  5. #25
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Quote Originally Posted by NoSalt View Post
    First, I tried Cheese, and that worked great, so I know my webcam is supported.
    Actually, I have learned that Cheese accepts direct input from the webcam, whereas webcam-server works through video4linux2 which may or may not support your camera.

    Check to see if your camera works in a video4linux capable program rather than in Cheese. VLC uses video4linux2 as does camorama.

    This may not be your problem, but it's worth investigating.

    Also keep in mind that the webcam-server project appears to be dead and hasn't received any updates to the code since around 2004.
    Last edited by dmizer; April 24th, 2011 at 01:14 AM.

  6. #26
    Join Date
    Mar 2007
    Location
    Earth
    Beans
    44
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    dmizer

    Yes, my camera works through VLC. I went to Media -> Open Capture Device, I entered "/dev/video0" for my video device name, and it works great.

  7. #27
    Join Date
    Mar 2007
    Location
    Earth
    Beans
    44
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Just checking in ... anybody have any ideas for me?

    Thanks

  8. #28
    Join Date
    Dec 2007
    Beans
    11

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Hi, just picked up this thread trying to solve my problem with webcam-server. Im running XFCE on Ubuntu 10.04. When I run the script above it seems to work but the localhost link just hangs on loading screen, if I remove 'export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so' I get unable to connect through browser.

    If I run webcam-server -d /dev/video0 -p 8888 I get the following:
    ioctl (VIDIOCGCAP): Invalid argument
    ioctl (VIDIOCSPICT): Invalid argument
    error setting video device parameters, using defaults
    ioctl (VIDIOCGCAP): Invalid argument
    ioctl (VIDIOCSPICT): Invalid argument
    not a valid video device? quitting.

    I can run VLC server using vlc v412:///dev/video0 which works fine, also Cheese works fine.

    Any thoughts?

  9. #29
    Join Date
    Apr 2009
    Location
    Portugal
    Beans
    15
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    Brilliant tutorial... worked like a charm with my Ubuntu 10.10!

    I'm just trying to customize the html and conf to my needs... if I have any doubts, I'll be posting here

    Thanks!!!!

  10. #30
    Join Date
    Apr 2009
    Location
    Portugal
    Beans
    15
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to setup a webcam server using webcam-server (Includes daemon script)

    I'm having trouble in port forwarding to the web...

    In the webcam-server config file, I have "-p 9999" set, and in the index.html file in Apache (yes, I replaced the index content with the webcam.html one) I have set "<param name=URL value="http://localhost:9999">"

    So...
    . if I open my web browser in http://localhost/ I can see my webcam feed
    . if I open my web browser in http://localhost:9977/ I can see a static image
    ... but no matter what I do, I can't port forward this feed. I tell my browser that my machine IP with port 9999 is to be open at port 9999, and when I try to open via my public IP (e.g. http:// 12.34.56.78:9977) all I get is the static image.

    I've even replaced the "localhost" in the index.html with my IP address but I get the same problem... no matter what I do, I can't see my feed outside my network... what am I doing wrong? Help, please...

    Thanks!!

    EDIT: I disabled my firewall to let any incoming traffic to my PC, so the problem isn't there.
    Last edited by mo7ard; July 20th, 2011 at 12:00 AM. Reason: add info

Page 3 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •