Flash / H.264 Video Recorder
The goal of this project is to create a system that can connect to a live video stream and record it to a file and/or rebroadcast it.
Here are the assumptions:
1) THe source of the live video stream is a PC running Adobe Flash Media Encoder 2.5. There will be multiple of these streams.
2) The video stream from each encoder machine is being pushed to a server running Adobe Flash Media Server 3.0. The protocol is rtmp. We will assume the video is being encoded using the H.264 video codec, not the On2.
3) The Flash Media Server machine is publishing video streams in the following format: rtmp://video.server.com/live/<stream name> where <stream name> is something like encoder1, encoder2, encoder3, etc.
4) The Flash Media Server is publishing these streams continuously 24/7/365. The streams may not be interrupted for any reason.
The proposed architecture:
1) The underlying OS will be Windows 2003 Server.
2) For cost reasons and desire to be non-proprietary, we will standardize on Wowza Media Server 1.5.
3) We will have the following functionality.
a) SYSTEM will connect to above Adobe brand FMS 3 stream as client.
b) It will have three modes: rebroadcast, capture and rebroadcast plus capture
c) From a command line, we will be able to call the program, as follows:
i) rebroadcast
fmscapture --source rtmp://<ip>/live/<streamname> --rebroadcast rtmp://<ip>/live/<streamname> --duration <time_in_seconds>
ii) capture
fmscapture --source rtmp://<ip>/live/<streamname> --outputfile <path to file> --duration <time_in_seconds>
iii) capture and rebroadcast
fmscapture --source rtmp://<ip>/live/<streamname> --rebroadcast rtmp://newip/newstream --outputfile <path to file> --duration <time_in_seconds>
4) Important Feature
The fmscapture program needs to exit immediately. It should spawn another process that performs the work. The reason is so that if it is called by a Web Scripting environment it does not need to occupy a worker thread for potentially hours.