homepage Welcome to WebmasterWorld Guest from 54.227.12.4
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / WebmasterWorld / Web Video Creation and Optimization
Forum Library, Charter, Moderators: travelin cat

Web Video Creation and Optimization Forum

    
IP Cameras
Streaming to the web
gaouzief




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

Hello,

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

Camera Output is MP4 over http

 

Samizdata




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

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.

jtara




msg:3514771
 10:05 pm on Nov 27, 2007 (gmt 0)

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.

Demaestro




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

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]

gaouzief




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

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

jtara




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Web Video Creation and Optimization
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved