简体   繁体   中英

Integrate Red5 Server in existing Java application

In my Java Application, I need to create an RTMP (or RTSP) livestream server and feed raw RGB image data to it.

I'd like to use the Red5 Server project , as it is available via Maven and the Apache 2.0 license fits my needs.
However, I haven't found any introduction tutorials on how to start and feed a livestream server from within a standalone Java Application. I have already added the dependency to my project, and can access all of Red5's classes.

Can you point me to any resources that help me getting started? The task I'm trying to accomplish seems pretty basic to me.

With Red5 you have the control to handle the "input" in any means you want, from a servlet that accepts octet-streams, to pretty much anything else you can think up. So if your input is RGB data, implement something that accepts your byte arrays (like a servlet) and then convert it into one of the Flash supported video codecs, such as h.264; you can use ffmpeg or jcodec to do this. Lastly, you'll want to package the now encoded data into FLV format, that's more difficult, but there are non-red5 examples of how to do this on the net, google for it. Once you have it in the FLV format, create a broadcast stream and dispatch the VideoData to it. Sounds simple right? Its not, but if you are a proficient in Java and / or C/C++, you should be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM