red5使用actionscript播放oflademo视频

发布于 2024-12-21 18:07:37 字数 717 浏览 4 评论 0原文

你好我有以下问题, 我使用 red5 录制视频,如下所示:

nc = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
ns = new NetStream(nc); 
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish( "file1", "record" );

视频存储在 C:\Program Files (x86)\Red5\webapps\oflaDemo\streams

当我尝试播放相同的视频时,我这样做:

nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = nsClient;
video = new Video(myVid.width,myVid.height);
video.attachNetStream(ns);
video.smoothing=true;
myVid.addChild(video);
ns.play("http://localhost:5080/oflaDemo/file1.flv");

但它抛出错误#2044:未处理的 NetStatusEvent:。 level=error,code=NetStream.Play.StreamNotFound

有什么想法吗???

Hello i have the following problem,
I record a video using red5 like this:

nc = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
ns = new NetStream(nc); 
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish( "file1", "record" );

and the video is stored in
C:\Program Files (x86)\Red5\webapps\oflaDemo\streams

while when i try to play the same video i do:

nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = nsClient;
video = new Video(myVid.width,myVid.height);
video.attachNetStream(ns);
video.smoothing=true;
myVid.addChild(video);
ns.play("http://localhost:5080/oflaDemo/file1.flv");

but it throws Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound

any ideas???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

欲拥i 2024-12-28 18:07:37

请将 ns.play("http://localhost:5080/oflaDemo/file1.flv"); 更改为 ns.play("rtmp://localhost:5080/oflaDemo/file1 .flv"); 希望对您有用

Please change ns.play("http://localhost:5080/oflaDemo/file1.flv"); to ns.play("rtmp://localhost:5080/oflaDemo/file1.flv"); hope it useful with you

故事灯 2024-12-28 18:07:37

我解决了如何播放视频的问题:

<s:VideoPlayer id="myVid" visible="true" width="100%" height="100%" mediaPlayerStateChange="myVid_mediaPlayerStateChangeHandler(event)">
 <s:source>
   <s:DynamicStreamingVideoSource host="{mediaServerUrl}" streamType="recorded">
      <s:DynamicStreamingVideoItem streamName="{videoFolder}/{filename}"/>
   </s:DynamicStreamingVideoSource>
 </s:source>
</s:VideoPlayer>

I solved the problem on how to play the video with:

<s:VideoPlayer id="myVid" visible="true" width="100%" height="100%" mediaPlayerStateChange="myVid_mediaPlayerStateChangeHandler(event)">
 <s:source>
   <s:DynamicStreamingVideoSource host="{mediaServerUrl}" streamType="recorded">
      <s:DynamicStreamingVideoItem streamName="{videoFolder}/{filename}"/>
   </s:DynamicStreamingVideoSource>
 </s:source>
</s:VideoPlayer>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文