用没有简单的rtmpios rtmp 播放器器

&&&&最简单的Flash流媒体示例程序
最简单的Flash流媒体示例程序
本工程包含如下基于Flash技术的流媒体的例子:
simplest_as3_rtmp_player:
最简单的RTMP播放器(基于ActionScript)
simplest_as3_rtmp_streamer:
最简单的RTMP推流器(基于ActionScript)
rtmp_sample_player_adobe:
从Adobe Flash Media Sever提取出来的测试播放器
rtmp_sample_player_wowza:
从Wowza服务器中提取出来的测试播放器
rtmp_sample_player_flowplayer: 基于FlowPlayer的RTMP/HTTP播放器(添加RTMP plugin)
rtmp_sample_player_videojs:
基于VideoJS的RTMP/HTTP播放器
rtmp_sample_player_jwplayer:
基于JWplayer的RTMP/HTTP播放器
hls_sample_player_flowplayer:
基于FlowPlayer的HLS播放器(添加HLS plugin)
hls_video_player_html5:
基于HTML5的HLS/HTTP播放器
activex_vlc_player:
基于VLC的ActiveX控件的播放器
注意:某些播放器直接打开html页面是不能工作的,需要把播放器放到Web服务器上。
(例如Apache或者Nginx)
若举报审核通过,可奖励20下载分
被举报人:
leixiaohua1020
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
VIP下载&&免积分60元/年(1200次)
您可能还需要
开发技术下载排行后使用快捷导航没有帐号?
只需一步,快速开始
查看: 9187|回复: 9
怎样用http协议而不是用rtmp协议做的flash播放器,急
UID438389在线时间 小时积分26帖子离线17078 天注册时间
新手上路, 积分 26, 距离下一级还需 24 积分
我看网上用的播放协议也都是Http。按说FMS/Red5作为流媒体服务器,是专门做过优化的。但为何这些网站都没采用RTMP的协议呢。
怎样用http播放协议做flash播放器呢?
请知道的指教一二,或者发一个实例,非常感激!!!
UID58592在线时间 小时积分16800帖子离线17078 天注册时间
由播放器加載指定位置的flv文件而不是由服務端開一個rtmp的flv流。
文件的讀取用http就足夠了。音樂視頻這樣的東西我也比較偏向用http
UID438389在线时间 小时积分26帖子离线17078 天注册时间
新手上路, 积分 26, 距离下一级还需 24 积分
谢谢,能不能说的详细一点
enc0717&&这位朋友能不能说的详细一点呢。
怎样在用http协议做一个flv视频播放器?地址是由其他网页传来的。
如果不用FMS服务器,改怎样连接呢?
UID438389在线时间 小时积分26帖子离线17078 天注册时间
新手上路, 积分 26, 距离下一级还需 24 积分
回复 #2 enc0717 的帖子
enc0717&&这位朋友能不能说的详细一点呢。
怎样在用http协议做一个flv视频播放器?而且地址是由其他网页传来的。
如果不用FMS服务器,改怎样连接呢,具体改怎样做呢?
UID438389在线时间 小时积分26帖子离线17078 天注册时间
新手上路, 积分 26, 距离下一级还需 24 积分
怎样用http协议而不是用rtmp协议做flash视频播放器!
各位大哥、大姐 帮帮忙吧!
请指教一二或者发一些这方面的实例,谢谢了
UID58592在线时间 小时积分16800帖子离线17078 天注册时间
為什么自己不愿意多利用一下搜索引擎?
我希望我指明方向給你,然后你具體的實踐,直接給代碼你 直接給結果,
容易讓你喪失自己解決問題的能力。
Recipe 16.1. Loading and Playing Back Video
You want to load and playback progressive download Flash video.
Use a NetStream object to load and playback the video and use a Video object to display the video.
Discussion
ActionScript 3.0 requires several classes working together to load and playback Flash video. You must use a NetStream object to load the video and
however, the NetStream class is only concerned with moving data, it doesn't know how to render the data as a video. For that you have to use a Video object. The Video object allows you to pass it a NetStream object, which then uses the NetStream data to render the video to the screen.
The NetStream constructor requires that you pass it a NetConnection object. The NetConnection object determines the origin of the data that the NetStream object handles. When the Flash video streams from a Flash Communication Server or Flash Media Server, the NetConnection object points to the server. However, for progressive download video content the NetConnection object uses a null connection string. The following code constructs a NetConnection object and initializes it for use with progressive download video. Note that the code assumes you've imported the flash.net.NetConnection class:
var videoConnection:NetConnection = new NetConnection(&&);
videoConnection.connect(null);
Once you've constructed a NetConnection object and called the connect( ) method with a null value, construct the NetStream object, and then pass the NetStream constructor a reference to the NetConnection object. The following code constructs a NetStream object (assuming you've imported flash.net.NetStream):
var videoStream:NetStream = new NetStream(videoConnection);
Once you've constructed the NetStream object, add a Video object, and associate the NetStream with the Video.
The flash.media.Video class is a display object, which means that you have to add it to the display list once constructed. The following code constructs a new Video object and then adds it to the display list:
var video:Video = new Video(&&);
addChild(video);
You can associate a NetStream object with a Video object by using the Video object's attachNetStream( ) method, passing a reference to the NetStream object as a parameter to the method:
video.attachNetStream(videoStream);
After you attached the NetStream object to the Video object, any video data controlled by the NetStream object gets rendered by the Video object.
Everything discussed up to this point is necessary to initialize all the requisite objects and associations. However, nothing so far actually tells the Flash Player to load the video and start playbackboth of which are accomplished with one simple method call. The NetStream class defines a play( ) method that loads and starts the Flash video playback as specified by the parameter passed to it. The parameter can be a relative or absolute URL. The following tells the Flash Player to load and start the playback of a Flash video called example.flv that's in the same directory as the calling .swf:
videoStream.play(&example.flv&);
If the .flv file is in the same domain as the calling .swf, then the play( ) call isn't subject to Flash Player security. However, if the FLV is in a different domain, then a security policy file is required to allow the calling SWF to load and playback the FLV.
Flash video playback starts automatically as soon as enough has buffered. You can control buffering and monitor loading, both of which are discussed in Recipe 16.7.
If the FLV file has metadata embedded within it (and most encoders do embed metadata) you'll also have to handle the metadata event as described in Recipe 16.4. Additionally, if the FLV contains cue points, you'll have to handle the cue point events as described in Recipe 16.8. If the FLV contains metadata and/or cue points and you don't handle the events, Flash Player throws errors.
UID438389在线时间 小时积分26帖子离线17078 天注册时间
新手上路, 积分 26, 距离下一级还需 24 积分
回复 #6 enc0717 的帖子
你这种方法是行不通的 ,你以为播放一个本地的已经知道名称的flv文件我会不知道怎么做,我早就做过了。flv文件是随时变化的,是由其他页面传来的一个值而不是在本地,不是固定的。所以你以上所说的It is no use&&。
UID138188在线时间 小时积分21099帖子离线17078 天注册时间
可以在插入 swf 的同时传递参数.
另外, 楼主说话不要大脑不经思考
而且你是来请求帮助的, 而不是来获取帮助, 谢谢
UID438389在线时间 小时积分26帖子离线17078 天注册时间
新手上路, 积分 26, 距离下一级还需 24 积分
回复 #6 enc0717 的帖子
可能我说话不太好听,不好意思。我只是一个flash 初学者。
我觉得这个论坛的用处不太大,讨论问题也不及时不能有效的解决问题,我决定退出了,886,各位
UID326143在线时间 小时积分5帖子离线17078 天注册时间
新手上路, 积分 5, 距离下一级还需 45 积分
这样能提高才怪
Powered by70029人阅读
Flash相关(7)
=====================================================Flash流媒体文章列表:===================================================== 本文继续上一篇文章,记录一些基于Flash的流媒体处理的例子。本文记录一些基于Flash技术的网页播放器。基于Flash的网页播放器相比于其他网页播放器来说最大的优势就是“免插件安装”了,这一点可以很大的提高用户的体验质量。早些时候网络视频(尤其是直播)一般都使用ActiveX控件作为视频播放器,而这些控件并不普及,所以终端用户必须下载相关的插件才能收看节目,因而对很多不熟悉电脑的用户造成了很大的障碍。直到Flash网页播放器的出现,这一障碍才得到了解决。本文将会记录几个常用的网页播放器,方便以后开发测试使用。 本文记录以下几种常用的网页播放器:rtmp_sample_player_adobe: 从Adobe Flash Media Sever提取出来的测试播放器rtmp_sample_player_wowza: 从Wowza服务器中提取出来的测试播放器rtmp_sample_player_flowplayer: 基于FlowPlayer的RTMP/HTTP播放器(添加RTMP plugin)rtmp_sample_player_videojs: 基于VideoJS的RTMP/HTTP播放器rtmp_sample_player_jwplayer: 基于JWplayer的RTMP/HTTP播放器hls_sample_player_flowplayer: 基于FlowPlayer的HLS播放器(添加HLS plugin)hls_video_player_html5: 基于HTML5的HLS/HTTP播放器activex_vlc_player: 基于VLC的ActiveX控件的播放器RTMP Sample Player Adobe&RTMP Sample Player Adobe是从Adobe Flash Media Sever提取出来的测试播放器,平时测试使用非常方便,把测试的RTMP地址粘贴到下方的“Stream URL”里面,单击右侧红色的“Play Stream”就可以播放流媒体了。RTMP Sample Player Adobe的截图如下所示。&RTMP Sample Player Wowza&RTMP Sample Player Wowza是从Wowza Streaming Engine中提取出来的测试播放器,平时测试使用也比较方便,将RTMP地址贴到对应的输入框中,单击“start”就可以播放流媒体了。RTMP Sample Player Wowza的截图如下所示。RTMP Sample Player Flowplayer&FlowPlayer官网:注:FlowPlayer有两个版本:HTML5版本和Flash版本,本文中使用的是Flash版本。RTMP Sample Player Flowplayer是基于FlowPlayer的网页播放器。其中包含两个播放器:Sample Player Flowplayer:HTTP点播网页播放器RTMP Sample Player Flowplayer:RTMP网页播放器FlowPlayer原生支持HTTP点播,通过RTMP Plugin扩展之后支持RTMP。Sample Player Flowplayer是支持HTTP点播的网页播放器,代码如下所示。&html&
&script type=&text/javascript& src=&flowplayer-3.2.8.min.js&&&/script&
&title&Sample Player FlowPlayer&/title&
&h1&Sample Player FlowPlayer&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&!-- this A tag is where your Flowplayer will be placed. it can be anywhere --&
href=&http://video-/oceans-clip.mp4&
style=&display:width:520height:330px&
id=&player&&
&!-- this will install flowplayer inside previous A- tag. --&
flowplayer(&player&, &flowplayer-3.2.8.swf&);
&/html&播放器的效果如下图所示,图中正在播放的视频文件的URL为http://video-/oceans-clip.mp4RTMP Sample Player Flowplayer是经过RTMP Plugin扩展之后的网页播放器,代码如下所示。&!DOCTYPE html&
&script type=&text/javascript& src=&flowplayer-3.2.8.min.js&&&/script&
&title&RTMP Sample Player FlowPlayer&/title&
&h1&RTMP Sample Player FlowPlayer&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&!-- this A tag is where your Flowplayer will be placed. it can be anywhere --&
style=&display:width:520height:330px&
id=&player&&
&!-- this will install flowplayer inside previous A- tag. --&
flowplayer(&player&, &flowplayer-3.2.8.swf&,{
url: 'hks',
provider: 'rtmp',
live: true,
plugins: {
url: 'flowplayer.rtmp-3.2.8.swf',
netConnectionUrl: 'rtmp://live.hkstv./live'
Sample RTMP URL (Live) is &rtmp://live.hkstv./live/hks&
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为rtmp://live.hkstv./live/hksRTMP Sample Player VideoJSVideo.js官网:注:Video.js是一个基于JavaScript的HTML5视频播放器,本身是开源的。RTMP Sample Player VideoJS是基于Video.js的RTMP播放器。其中包含两个播放器:Sample Player VideoJS:HTTP点播网页播放器RTMP Sample Player VideoJS:RTMP网页播放器Sample Player VideoJS是支持HTTP点播的网页播放器,代码如下所示。&!DOCTYPE html&
&title&Sample Player Videojs&/title&
&!-- Chang URLs to wherever Video.js files will be hosted --&
&link href=&video-js.css& rel=&stylesheet& type=&text/css&&
&!-- video.js must be in the &head& for older IEs to work. --&
&script src=&video.js&&&/script&
&!-- Unless using the CDN hosted version, update the URL to the Flash SWF --&
videojs.options.flash.swf = &video-js.swf&;
&h1&Sample Player Videojs&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&video id=&example_video_1& class=&video-js vjs-default-skin& controls preload=&none& width=&640& height=&264&
poster=&http://video-/oceans-clip.png&
data-setup=&{}&&
&source src=&http://video-/oceans-clip.mp4& type='video/mp4' /&
&source src=&http://video-/oceans-clip.webm& type='video/webm' /&
&source src=&http://video-/oceans-clip.ogv& type='video/ogg' /&
&track kind=&captions& src=&demo.captions.vtt& srclang=&en& label=&English&&&/track&
&track kind=&subtitles& src=&demo.captions.vtt& srclang=&en& label=&English&&&/track&
&p class=&vjs-no-js&&To view this video please enable JavaScript, and consider upgrading to a web browser that &a href=&/html5-video-support/& target=&_blank&&supports HTML5 video&/a&&/p&
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为http://video-/oceans-clip.mp4&RTMP Sample Player VideoJS是支持RTMP的网页播放器,代码如下所示。&!DOCTYPE html&
&title&RTMP Sample Player Videojs&/title&
&!-- Chang URLs to wherever Video.js files will be hosted --&
&link href=&video-js.css& rel=&stylesheet& type=&text/css&&
&!-- video.js must be in the &head& for older IEs to work. --&
&script src=&video.js&&&/script&
&!-- Unless using the CDN hosted version, update the URL to the Flash SWF --&
videojs.options.flash.swf = &video-js.swf&;
&h1&RTMP Sample Player Videojs&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&video id=&example_video_1& class=&video-js vjs-default-skin& controls preload=&none& width=&640& height=&480& data-setup=&{}&&
&source src=&rtmp:///livepkgr/264& type=&rtmp/flv&/&
&p class=&vjs-no-js&&To view this video please enable JavaScript, and consider upgrading to a web browser that &a href=&/html5-video-support/& target=&_blank&&supports HTML5 video&/a&&/p&
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为rtmp:///livepkgr/264&RTMP Sample Player JWPlayer&JW Player官网:注:最新版的JW Player似乎不能免费使用RTMP播放功能了,这里使用的是旧版的JW PlayerRTMP Sample Player JWPlayer是基于JW Player的RTMP播放器。其中包含两个播放器:Sample Player JWPlayer:HTTP点播网页播放器RTMP Sample Player JWPlayer:RTMP网页播放器Sample Player JWPlayer是支持HTTP点播的网页播放器,代码如下所示。&!DOCTYPE html&
&html xmlns=&http://www.w3.org/1999/xhtml&&
&title&Sample Player JWPlayer&/title&
&script type='text/javascript' src='jwplayer.js'&&/script&
&h1&Sample Player JWPlayer&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&div id='mediaspace'&This text will be replaced&/div&
&script type='text/javascript'&
jwplayer('mediaspace').setup({
'flashplayer': 'player.swf',
'file': 'sintel.mp4',
'controlbar': 'bottom',
'width': '640',
'height': '360'
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为本地的sintel.mp4&RTMP Sample Player JWPlayer是支持RTMP的网页播放器,代码如下所示。&!DOCTYPE html&
&html xmlns=&http://www.w3.org/1999/xhtml&&
&title&RTMP Sample Player JWPlayer&/title&
&script type='text/javascript' src='jwplayer.js'&&/script&
&h1&RTMP Sample Player JWPlayer&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&div id='mediaspace'&This text will be replaced&/div&
&script type='text/javascript'&
jwplayer('mediaspace').setup({
'flashplayer': 'player.swf',
'file': 'flv',
'streamer': 'rtmp:///live',
'controlbar': 'bottom',
'width': '640',
'height': '360'
Sample RTMP URL (Live) is &rtmp:///live/flv&
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为rtmp:///live/flvHLS Sample Player FlowplayerHLS Sample Player Flowplayer是增加了HLS Plugin扩展之后的FlowPlayer。增加了HLS Plugin之后,FlowPlayer增加了对HLS的支持。代码如下所示。&!DOCTYPE HTML&
&title&HLS Sample Player Flowplayer&/title&
&script type=&text/javascript& src=&flowplayer-3.2.12.min.js&&&/script&
&script type=&text/javascript& src=&flowplayer.ipad-3.2.12.min.js&&&/script&
&h1&HLS Sample Player Flowplayer&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&!-- player container--&
&a style=&display: width: 660 height: 350& id=&flashls_vod&&
&!-- Flowplayer installation and configuration --&
&script type=&text/javascript&&
flowplayer(&flashls_vod&, &flowplayer.swf&, {
// configure the required plugins
plugins: {
flashls: {
url: 'flashlsFlowPlayer.swf',
url: &http://stream.flowplayer.org/drive.m3u8&,
//url: &/iphone/samples/bipbop/bipbopall.m3u8&,
//live: true,
urlResolvers: &flashls&,
provider: &flashls&
}).ipad();
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为http://stream.flowplayer.org/drive.m3u8HLS Video Player Html5&HTML5 Video标签参考:.cn/html5/html5_video.aspHLS Video Player Html5是使用了HTML5的&Video&标签的网页播放器(实际上就是一张网页)。源代码如下所示。&!DOCTYPE HTML&
&title&Video Player Html5&/title&
&h1&Video Player Html5&/h1&
&p&Lei Xiaohua&br/&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&video src=&sintel.mp4& controls=&controls&&
your browser does not support the video tag
&/html&在这里需要注意,&video&标签需要浏览器支持HTML。如果浏览器不支持HTML5的话,打开网页会显示如下信息。&如果浏览器支持HTML5,打开网页的效果如下图所示。图中正在播放的视频的URL为sintel.mp4ActiveX VLC PlayerActiveX VLC Player与上述的网页播放器有很大的不同,主要用于对比。ActiveX VLC Player是基于ActiveX控件的播放器。基于ActiveX控件意味着只有IE支持该网页播放器,而且要求本机必须首先安装VLC。由于有几乎“万能”的VLC Media Player做后盾,该网页播放器的性能是相当强的:不仅支持上文中提到的各种播放器支持的HTTP、RTMP、HLS,而且支持MMS、RTSP以及UDP这些协议(VLC Media Player支持的协议它都支持)。ActiveX VLC Player源代码如下所示。&!DOCTYPE HTML&
&title&ActiveX VLC Player&/title&
&h1&ActiveX VLC Player&/h1&
&p&Lei Xiaohua&br/&
&!-- To run this demo you should install VLC first --&
&a href=&http://blog.csdn.net/leixiaohua1020&&http://blog.csdn.net/leixiaohua1020&/a&&br/&
&OBJECT classid=&clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921&
codebase=&http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab&
width=&640& height=&480& id=&vlc& events=&True&&
&!--&param name=&Src& value=&http://video-/oceans-clip.mp4& /&--&
&!--&param name=&Src& value=&http://live./live/CCTV13.m3u8& /&--&
&!--&param name=&Src& value=&rtmp://live.hkstv./live/hks& /&--&
&!--&param name=&Src& value=&mmst://media./shtv& /&--&
&param name=&Src& value=&rtsp://58.248.254.7:9135/live/ds-mmzh.sdp& /&
&param name=&ShowDisplay& value=&True& /&
&param name=&AutoLoop& value=&False& /&
&param name=&AutoPlay& value=&True& /&
&/html&播放器的效果如下图所示,图中正在播放的视频的URL为rtsp://58.248.254.7:9135/live/ds-mmzh.sdp下载Simplest flashmedia exampleSourceForge:Github:开源中国:CSDN下载:本工程包含如下基于Flash技术的流媒体的例子:simplest_as3_rtmp_player: &最简单的RTMP播放器(基于ActionScript)simplest_as3_rtmp_streamer:最简单的RTMP推流器(基于ActionScript)rtmp_sample_player_adobe: 从Adobe Flash Media Sever提取出来的测试播放器rtmp_sample_player_wowza: 从Wowza服务器中提取出来的测试播放器rtmp_sample_player_flowplayer: 基于FlowPlayer的RTMP/HTTP播放器(添加RTMP plugin)rtmp_sample_player_videojs: 基于VideoJS的RTMP/HTTP播放器rtmp_sample_player_jwplayer: 基于JWplayer的RTMP/HTTP播放器hls_sample_player_flowplayer: 基于FlowPlayer的HLS播放器(添加HLS plugin)hls_video_player_html5: 基于HTML5的HLS/HTTP播放器activex_vlc_player: &基于VLC的ActiveX控件的播放器注意:某些播放器直接打开html页面是不能工作的,需要把播放器放到Web服务器上。(例如Apache或者Nginx)
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:5038051次
积分:47533
积分:47533
排名:第47名
原创:375篇
转载:159篇
译文:28篇
评论:5739条
姓名:雷霄骅
网名:leixiaohua1020
中国传媒大学-广播电视工程
中国传媒大学-数字电视技术
中国传媒大学-数字视频技术
[注1:QQ消息较多,难以一一回复,见谅]
[注2:CSDN私信功能使用很少,有问题可以直接在博客评论处留言]
主要从事与广播电视有关的视音频技术的研究。包括视音频质量评价,视音频编解码,流媒体,媒资检索等。
【SourceForge】【主】
【Github】
【开源中国】
欢迎转载本博客原创或翻译文章,但请声明出处,谢谢!
本QQ群旨在为视音频技术同行方便交流提供一个平台。无论是实验室,电视台,互联网视频,安防,播放器,媒体中心等等都可以加入讨论。欢迎新手和大牛,多交流可以更快的进步~1号群【2000人】:2号群【1000人】:通知:1号群成员容量为2000人,目前已经接近上限,为了给新成员入群讨论的机会,会定期清理不发言的用户,希望大家理解,谢谢支持! 2号群为新创建的群,欢迎加入~ 针对近期出现的各种问题,为保障本群和谐发展制定了《群规》,新成员入群后请阅读位于群公告中的《群规》了解本群的规则
文章:135篇
阅读:2307775
文章:91篇
阅读:656436
文章:41篇
阅读:242097

我要回帖

更多关于 rtmp播放器 的文章

 

随机推荐