Welcome to WebmasterWorld Guest from 23.20.37.222

Forum Moderators: open

Message Too Old, No Replies

IP Cameras

Streaming to the web

     
7:44 pm on Nov 27, 2007 (gmt 0)

10+ Year Member



Hello,

Any experience with streaming IP Camera videos to the web through a streaming server?

Camera Output is MP4 over http

8:39 pm on Nov 27, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I have used Darwin Streaming Server to broadcast from a live cam, with the stream embedded in a webpage for QuickTime Player - it's a free and cross-platform solution.
10:05 pm on Nov 27, 2007 (gmt 0)

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 5+ Year Member



I've played around with grabbing a motion-jpeg stream from a Canon IP camera (with a small C++ program), running it through ffmpeg to convert to FLV, and send it off to an ffserver. The webcam is then viewed through an embedded flash movie player.

It tends to hang-up after a while. I suspect ffserver as the culprit.

With an MPEG4 source, this might go a bit better. The MPEG4 data stream is much lower bandwidth than motion JPEG. Assuming you're going to present it at 320x240 and the source is 640x480, the conversion should have little if any degradation.

The upcoming MPEG4 support in FLV (not there yet, but I think in beta?) will make this a natural combination. You will still have to do some conversion to get the MPEG4 stream into the FLV container, but there will be little CPU overhead compared to transcoding.

10:28 pm on Nov 27, 2007 (gmt 0)

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Darwin streamer is really slick IMO... worth a try for sure. Pretty easy to use.

[edited by: Demaestro at 10:29 pm (utc) on Nov. 27, 2007]

10:16 am on Nov 28, 2007 (gmt 0)

10+ Year Member



jtara

was ffmpeg transcoding "live" to "live" or using some intermediate file? and is it possible to have multiple instances of ffmpeg running simultaneously (different cams)

Thanks

5:26 pm on Nov 28, 2007 (gmt 0)

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 5+ Year Member



was ffmpeg transcoding "live" to "live" or using some intermediate file?

"live" to "live". Piped from my Ruby (sorry, I said it was C++ earlier) capture program to ffmpeg. ffmpeg has built-in support to send output to ffserver.

Note, however, that ffserver itself does use a temporary file for buffering. You have control over where the file lives through ffserver.conf, though, so you could arrange to store it in a tmpfs (RAM) filesystem.

Of course, this was on Linux - won't work on Windows due to the lack of real piping. The "-i -" parameter tells ffmpeg to take the input stream from STDIN.

./vbc50cap.rb ffmpeg -an -r 15 -f mjpeg -i - -s cif -r 15 -g 15 -aic -umv -me full -vstats [localhost:809...]
0/feed1.ffm

ffserver.conf:
--------------

Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
NoDaemon

<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
</Feed>

# 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 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don't have audio
NoAudio
</Stream>

You certainly can have multiple copies of ffmpeg running, and ffserver supports multiple streams.

Of course, if you are scaling and/or transcoding, you will be limited at some point by CPU power.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month