Question

I have a mpg file in my system and i want to publish it into the Red5 server so that i can broadcast it over my network.After some research work i was not able to find a solution for it ,did anyone of you guys have tried this .I mean publishing file from local system to red5 server.Can anyone guide me to a proper direction possible please.I am using Flash CS3 and AS3.

Was it helpful?

Solution

@Vipin Your best bet is going to be using something like ffmpeg for ease of programming, quality, and transcoding speed, and if you want a nice API something like xuggler looks like a good approach, and though I've never used it, I've read lots of good things about it from people doing stuff exactly like what it sounds like you're trying to do. I have successfully used ffmpeg to do something similar to what you want from a Ruby backend recently, and have no reason to believe it'll be any less easy or usable for you to do this in Java. To use runtime.exec() to execute ffmpeg, try this. If you do either of them, there shouldn't be any reason that FLV isn't an option, as I know for sure that ffmpeg does this. It's a little older post, but this post covers how to set up a command line exec call to ffmpeg for going mpg -> flv like you want, though I imagine if you use xuggler, this is built in to the API a little more. Another SO answer that covers both of these approaches is here.

OTHER TIPS

You can use the FileReference.browse() to get a dialog/system pop-up to choose a file. You listen for the SELECT event on it (this means the user chose a file), then you can call upload on it. You'll need a server side script of some sort that accepts the file and saves it to a location the Red5 server is pointing to to serve it's files (PHP, Java, whatever should do).

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#browse()

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#upload()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top