red5 as3 rtmp 直播流(从 xuggle 发送)订阅者示例?
我按照 red5 wiki http://red5wiki.com/wiki/Live_streaming 从 xuggle ffmpeg 发送 rtmp 流。
fmpeg -i test.flv -acodec copy -vcodec copy -f flv -re rtmp://127.0.0.1:1935/oflaDemo/streams/liveStream
我的舞台上有两个实例。一个视频类实例,我在成功的网络连接后将流附加到该实例,以及一个 FVLplayback 实例,我将 rtmp url 作为其源。
我无法订阅该流。一些相关的代码位。
private var rtmpURL:String = "rtmp://127.0.0.1:1935/oflaDemo"; // connection url
myplayer.isLive=true; // flvplayback instance on stage
myplayer.autoPlay=true;
myplayer.source='rtmp://127.0.0.1:1935/oflaDemo/liveStream';
// video class instance
var video:Video = new Video ;
video.attachNetStream(stream);
stream.play("liveStream");
addChild(video);
这里出了什么问题?
Iam sending an rtmp stream from xuggle ffmpeg following the red5 wiki http://red5wiki.com/wiki/Live_streaming .
fmpeg -i test.flv -acodec copy -vcodec copy -f flv -re rtmp://127.0.0.1:1935/oflaDemo/streams/liveStream
I have two instances on my stage. a video class instance to which i am attaching the stream after a successful net connect, and an FVLplayback instance to which i am giving the rtmp url as its source.
I am unable to subscribe to the stream. some relevant code bits.
private var rtmpURL:String = "rtmp://127.0.0.1:1935/oflaDemo"; // connection url
myplayer.isLive=true; // flvplayback instance on stage
myplayer.autoPlay=true;
myplayer.source='rtmp://127.0.0.1:1935/oflaDemo/liveStream';
// video class instance
var video:Video = new Video ;
video.attachNetStream(stream);
stream.play("liveStream");
addChild(video);
what is wrong here ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在实际的 red 5 版本 rc1 Windows 安装程序上,修复后上述代码可以正常工作。 http://wiki.red5.org/wiki/1_0_RC1
issue was with the actual red 5 version rc1 windows installer, the above code works just fine when that is fixed. http://wiki.red5.org/wiki/1_0_RC1