Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Search this Thread
Old 01-10-2012, 11:27 PM   #1
LQ Newbie
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
Smile How to stream live video from web cam

Hi everybody...I've been trying to stream live video from web cam connected to my alix board, I could able to capture and stream a video..which is recorded but am unable to continuously buffer and telecast the video..please help me
by the way I used ffmpeg and lighttpd for capturing video and making my board as server respectively
Old 01-10-2012, 11:48 PM   #2
Senior Member
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,645

Rep: Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951
I have a gumstix overo that I use to host a webpage that streams live video (4-5 second lag) from a USB webcam over wifi. Maybe this will help you:

# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
Port 8090

# Address on which the server is bound. Only useful if you have
# several network interfaces.

# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients parameter, since it defines the
# MaxClients maximum limit.
MaxHTTPConnections 2000

# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients 1000

# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth 1000

# Access log file (uses standard Apache log file format)
# '-' is the standard output.
CustomLog -

# Suppress that if you want to launch ffserver as a daemon.

<Feed feed1.ffm>
        File /tmp/feed1.ffm #when remarked, no file is being created and the stream keeps working!!
        FileMaxSize 200K
       # Only allow connections from localhost to the feed.
       ACL allow

# SWF output - great for testing
<Stream test.swf>
        # the source feed
        Feed feed1.ffm
        # the output stream format - SWF = flash
        Format swf
        # this must match the ffmpeg -r argument
        VideoFrameRate 15
        # another quality tweak
        VideoBitRate 200
        # quality ranges - 1-31 (1 = best, 31 = worst)
        VideoQMin 4
        VideoQMax 6
        VideoSize 320x240
        # wecams don't have audio

# FLV output - good for streaming

#<Stream test.flv>
#       # the source feed
#       Feed feed1.ffm
#       # the output stream format - FLV = FLash Video
#       Format flv
#       VideoCodec flv
#       # this must match the ffmpeg -r argument
#       VideoFrameRate 5
#       # another quality tweak
#       VideoBitRate 320
#       # quality ranges - 1-31 (1 = best, 31 = worst)
#       VideoQMin 1
#       VideoQMax 3
#       VideoSize 320x240
#       # wecams don't have audio
#       NoAudio

<Stream stat.html>
        Format status

<Redirect index.html>
        # credits!

Startup script
nohup ffserver &> /home/camera/ffserver.out &
nohup ffmpeg -f video4linux2 -s 320x240 -r 15 -an -y -qscale 5 -i /dev/video0 &> /dev/null &

HTML page
<object align="center" width="376" height="240"><param name="movie" value="">
<embed align="center" src="" width="376" height="240">

Naturally, /dev/video0 is my webcam, is the gumstix IP, and the size and quality of the video have been adjusted to fit on the relatively weak CPU.

Last edited by suicidaleggroll; 01-10-2012 at 11:50 PM.
Old 01-11-2012, 12:06 AM   #3
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 260

Rep: Reputation: 50
For uvcvideo webcams you could also try MJPG-streamer. Compile and start with:
./mjpg_streamer -i -d /dev/video0 -r 640x480 -f 30 -o ./ -p 7000 -w ./www
This has a built in webserver.



serverhow, streaming, webcam

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to stream live mms video theblindhog Linux - Software 3 03-18-2009 07:46 AM
Can use my web cam mic for ekiga but not the video? BigVig Debian 1 02-21-2009 07:35 PM
capture video with web cam wabbalee Linux - General 2 01-14-2009 09:24 PM
how can i broadcast live video from a web cam to a server then to the internet charlotterob Linux - Software 2 12-27-2006 10:47 AM
Creating a live video stream little_penguin Linux - Software 1 08-12-2005 02:57 AM

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration