http://dianying.cntv.cn/love/lianaiqianguize/classpage/video/20091221/100120.shtml
这是CCTV电影站一个播放页面地址,打开源码,找到播放器一段,flash player是由JS创建的1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19var fo = createPlayer("v_player_cctv",928,552);
fo.addVariable("videoId", "20091221100120");
fo.addVariable("articleId", "VIDE0020091221100120");
fo.addVariable("scheduleId", "C13671000001");
fo.addVariable("filePath", "/love/lianaiqianguize/classpage/video/");
fo.addVariable("sorts", "其他,,,爱情,C13671,CCTV-9");
fo.addVariable("sysSource", "discovery");
fo.addVariable("url", "http://dianying.cntv.cn/love/lianaiqianguize/classpage/video/20091221/100120.shtml");
fo.addVariable("videoCenterId","36b502b4ceeb4a6d950955b4bd9e93f8");//视频生产中心id
fo.addVariable("channelId",channelId);//埋码
fo.addVariable("adCall",adCall);//广告
fo.addVariable("isLogin", "y");
fo.addVariable("userId", "001");
fo.addVariable("hour24DataURL", "");
fo.addVariable("isCycle", "false");
fo.addVariable("wideMode", "normal");
fo.addVariable("defaultRate", "low");
fo.addVariable("isAutoPlay", "true");
writePlayer(fo,"myFlash");
createPlayer() 函数在 film_standard2.js 文件,找到swf播放器地址 http://player.cntv.cn/standard/cntvplayer.swf ,下载下来用 Action Script Viewer 6 打开
发现里面有这么个类 com.cntv.common.model.proxy.GetVideoInfoProxy ,通过用 videoId、articleId、filePath 等关键字搜索,找到这么一段AS代码
1 | _local2 = (((((this._localtor.configVO.videoInfoURL + this._localtor.paramVO.filePath) + this._localtor.paramVO.videoId.substr(0, 8)) + "/") + this._localtor.paramVO.videoId.substr(8, (this._localtor.paramVO.videoId.length - 1))) + ".txt"); |
就是说把videoId截前面8位,作为目录,后面是文件名,用 videoId = “20091221100120” 代入,得到这么一个地址
http://dianying.cntv.cn/love/lianaiqianguize/classpage/video/20091221/100120.txt,跟播放页地址一样,后缀名改为txt而已,把地址放到IE打开,发现是一个JSON格式的文本,格式化之后如下1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68{
"videoid": "20091221100120",
"duration": "21:56",
"isLive": "false",
"title": "恋爱前规则1",
"imagePath": "http://p1.img.cctvpic.com/image/2009/qgds/2009/12/21/qgds_h264418000nero_aac32_20091221_1261357606439_2.jpg",
"isRtmp": "false",
"ack": "yes",
"relation": "public",
"refHtml": "<embed id=’v_player_cctv’ width=’960′ height=’540′ flashvars=’videoId=20091221100120&isLogin=y&userId=001& articleId=VIDE0020091221100120&scheduleId=C13671000001& filePath=/love/lianaiqianguize/classpage/video/&sorts=其他,,,爱情,C13671000001&url=http://dianying.cntv.cn/love/lianaiqianguize/classpage/video/20091221/100120.shtml&configPath=http://dianshiju.cntv.cn/nettv/Library/film/player/config.xml&widgetsConfig=http://dianshiju.cntv.cn/nettv/Library/film/player/widgetsConfig.xml&languageConfig=http://dianshiju.cntv.cn/nettv/Library/film/player/zh_cn.xml&sysSource=film’ allowscriptaccess=’always’ allowfullscreen=’true’ menu=’false’ quality=’best’ bgcolor=’#000000′ name=’v_player_cctv’ src=’http://dianshiju.cntv.cn/nettv/Library/tongyong/player/OutSidePlayer.swf’ type=’application/x-shockwave-flash’ lk_mediaid=’lk_juiceapp_mediaPopup_1257416656250′ lk_media=’yes’/>",
"refURL": "http://dianying.cntv.cn/love/lianaiqianguize/classpage/video/20091221/100120.shtml",
"chapters": [
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264418000nero_aac32_20091221_1261357606439-1.mp4",
"duration": "296"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264418000nero_aac32_20091221_1261357606439-2.mp4",
"duration": "297"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264418000nero_aac32_20091221_1261357606439-3.mp4",
"duration": "299"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264418000nero_aac32_20091221_1261357606439-4.mp4",
"duration": "299"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264418000nero_aac32_20091221_1261357606439-5.mp4",
"duration": "126"
}
],
"chapters2": [
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-1.mp4",
"duration": "178"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-2.mp4",
"duration": "178"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-3.mp4",
"duration": "178"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-4.mp4",
"duration": "179"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-5.mp4",
"duration": "179"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-6.mp4",
"duration": "176"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-7.mp4",
"duration": "176"
},
{
"url": "http://sportsipr.v.cctv.com/200911/qgds/2009/12/21/qgds_h264818000nero_aac32_20091221_1261357611665-8.mp4",
"duration": "72"
}
]
}
实际是个播放列表,直接用迅雷就可以下载了
事实上,cntv还有另一种json格式,比如《火星没事》,JSON文本如下
1 | { |
rtmp 是adobe用于flash流媒体的播放协议,详情猛击这里 http://www.51testing.com/?uid-8776-action-viewspace-itemid-81594
关于rtmp的播放,我也不清楚,在反编译的AS中截取这么几段代码,剩下的请自己分析吧
1 | override protected function initNetConnection():void{ |