I am developing an Android application in which I want to publish as well as stream a video...
What I want is:
My app records a video and that video
You can easily do it via Vitamio Lib. Vitamio can play 720p/1080p HD, mp4, mkv, m4v, mov, flv, avi, rmvb, rm, ts, tp and many other video formats in Android and iOS. Almost all popular streaming protocols are supported by Vitamio, including HLS (m3u8), MMS, RTSP, RTMP, and HTTP.
Download Vitamio Bundle from here.
And a demo from here.
A tutorial from here.
If you don't have any other options, you can use spydroid-ipcamera, which is an open source project. It's an alternative for your requirements. I have checked it and it provides live video treaming.
I am using Adobe AIR to play RTMP and it's awesome. I found the answer here; see the code:
function init_RTMP():void
{
streamID = "RT_2";
videoURL = "rtmp://fms5.visionip.tv/live/RT_2";
vid = new Video();
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onConnectionStatus);
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
nc.connect(videoURL);
}
private function onConnectionStatus(e:NetStatusEvent):void
{
if (e.info.code == "NetConnection.Connect.Success")
{
trace("Creating NetStream");
netStreamObj = new NetStream(nc);
metaListener = new Object();
metaListener.onMetaData = received_Meta;
netStreamObj.client = metaListener;
netStreamObj.play(streamID);
vid.attachNetStream(netStreamObj);
addChild(vid);
}
}