I am working on the multicast application. In the server-side actionscript, when creating the netstream with groupspec, like:
ns = new NetStream(streamContext.netConnection, streamContext.groupspec);
It seems like the netConnection need to be set with rtmfp protocol, since I got the following when I connect via rtmp.
Multicast NetConnection Status: NetConnection.Connect.Success, Source stream: livestream
MULTICAST PUBLISH ERROR: Failed to construct multicast NetStream. Error: Error Failed to execute method (NetConnection protocol must be rtmfp if groupspec parameter is present). Reported Error : ., Source stream: livestream
Is there a way that we can connect to a pure rtmp source at the upstream and do rtmfp multicast at the downstream only?
just create a netStream from your netGroup then attach your Stream unicast object
and publish it through the group.
ns = new NetStream(ncGroup);
Not sure of ActionScript scenario, but it worked for me by copying stream with ffmpeg.
ffmpeg -f live_flv -i rtmp://server/live/upstream -codec copy -f flv rtmp://localhost/multicast/livestream?fms.multicast.type=3&fms.multicast.groupspec=<...>
Oh. 2012... Haha.