A media server is required for capturing video from Flash but none of them seem to have any documentation available (not even API docs or other source code comments). I would prefer crtmpserver because my application is written in C++ and it needs to receive and process the captured data in real time. However, Red5 is clearly a lot more mature and better known project so I do consider that an option too. Adobe FMS is too expensive and might be difficult to integrate with my application as Adobe never mentions such use case.
As far as I can tell, one has to write an "application" for the media server (they don't ship with anything usable) and that will then have to forward the data for actual processing. What sort of data can an application expect from the media server, is it going to be a plain FLV stream or is there something more to it (bandwidth negotiations etc)?
Coding the Flash side is not an issue, there are plenty of examples for that (even if they don't tell how the media server URL should be constructed).
The actual question: how does the server side work (high level view) and is there anything to get one started with the live capture functionality?
A couple years back I was working on an e-learning project that allowed the students to record an answer (audio only in my case) and the professor could listen to it and grade the student.
We considered Adobe FMS, Wowza Media Server (http://www.wowzamedia.com) and Red5. In the end Red5 was chosen because it was the only free open source options which was stable enough to be used in this project, even though it lacked much documentation.
How it worked was I ended up modifying one of the packaged examples to suit my need and had the server running on Mac OS 10.4.? Red5 basically grabbed the audio stream and saved the file to a directory on the machine. I had to then update the database to point to the audio file for the professor to be able to play it. Note, I did not do any live modification or re-broadcasting of the stream; in case that's part of the scope of your project.
Anyway, Red5 didn't have much of a community at the time so I wasn't able to contribute what I had learned to their documentation but it seems like they're more active now and if you do choose to go with Red5 I would ask that you become involved in the project and help document it.
You could take a look if haxevideo might be suitable for your development.
Media servers typically do just that - serve media. Are you trying to consume streaming video in a flash application? If so, either of the servers you mentioned should be suitable for that.
If you are, however, trying to capture and publish streaming video from flash, aside from webcam streams, AFAIK there's no great way to do it.
For real-time publishing of webcam streams and other basic interaction, you may want to check out the Adobe LiveCycle collab service (codename Cocomo).
We are now using crtmpserver. A few notes: Flash needs to connect to rtmp://server:1935/appname (where appname is the application to use - these are configured on server side). Even if there are multiple parts in the URL (separated by slashes), the entire combination is considered the appname (even though there appears to be an exception for playback, permitting the flv filename to be put there).
Recording happens by connecting to "flvplayback" application and then publishing by "somename" (with "record" or "append"), making the server write to (relative to CWD) applications/flvplayback/mediaFolder/somename.flv
You cannot change the application name but it might look nicer to use one of the aliases of flvplayback in the URL (that doesn't affect the folder where the files go). One of the default aliases is "live", so you may use "rtmp://server:1935/live" as the URL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With