js#vista.png msort nsort
js#vista.png msort nsort
this is actually quite simple and I went with this solution because the documentation for the Camera is total crud. Anyway you have to have OpenRTSP and ffmpeg installed:
# apt-get install livemedia-utils ffmpeg
then get ffserver configured:
rm /etc/ffserver.conf nano ffserver.conf
add the following:
# 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. BindAddress 0.0.0.0 # 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 /var/log/ffserver.log # Suppress that if you want to launch ffserver as a daemon. NoDaemon ################################################################## # Definition of the live feeds. Each live feed contains one video # and/or audio sequence coming from an ffmpeg encoder or another # ffserver. This sequence may be encoded simultaneously with several # codecs at several resolutions. <Feed feed1.ffm> # You must use 'ffmpeg' to send a live feed to ffserver. In this # example, you can type: # # ffmpeg http://localhost:8090/feed1.ffm # ffserver can also do time shifting. It means that it can stream any # previously recorded live stream. The request should contain: # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify # a path where the feed is stored on disk. You also specify the # maximum size of the feed, where zero means unlimited. Default: # File=/tmp/feed_name.ffm FileMaxSize=5M File /tmp/feed1.ffm FileMaxSize 1024K # You could specify # ReadOnlyFile /saved/specialvideo.ffm # This marks the file as readonly and it will not be deleted or updated. # Specify launch in order to start ffmpeg automatically. # First ffmpeg must be defined with an appropriate path if needed, # after that options can follow, but avoid adding the http:// field #Launch ffmpeg # Only allow connections from localhost to the feed. ACL allow 127.0.0.1 </Feed> ################################################################## # Now you can define each stream which will be generated from the # original audio and video stream. Each format has a filename (here # 'test1.mpg'). FFServer will send this stream when answering a # request containing this filename. <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 5 # another quality tweak VideoBitRate 320 # quality ranges - 1-31 (1 = best, 31 = worst) VideoQMin 1 VideoQMax 3 VideoSize 640x480 # wecams don't have audio NoAudio </Stream> # Flash <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 640x480 # wecams don't have audio NoAudio </Stream> # ASF compatible #<Stream test.asf> #Feed feed1.ffm #Format asf #VideoFrameRate 15 #VideoSize 352x240 #VideoBitRate 256 #VideoBufferSize 40 #VideoGopSize 30 #AudioBitRate 64 #StartSendOnKey #</Stream> ################################################################## # Special streams # Server status <Stream stat.html> Format status # Only allow local people to get the status ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico </Stream> # Redirect index.html to the appropriate site <Redirect index.html> URL http://www.ffmpeg.org/ </Redirect>
startup ffserver:
ffserver -f /etc/ffserver.conf &
Once ffserver is running you are ready to pull the stream from the camera and push it through ffserver:
openRTSP -v -d 180 -t rtsp://1.2.3.4:7070/ | ffmpeg -i - -f flv -an http://localhost:8090/feed1.ffm
if you are just wanting to capture to a file for later processing/viewing:
openRTSP -v -d 180 -t rtsp://10.11.80.200:7070/ | ffmpeg -i - -y -f flv -an test.flv