注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

没有想法

乱写乱画

 
 
 

日志

 
 

关于优酷视频的分段分析  

2010-09-04 20:45:22|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
最近看视频的时候发现一个问题:
第一段来自于58.100.228.109(杭州联通),很快
第二段要到61.55.175.76(河北联通),很慢
拖到第三段,又回到杭州联通(58.100.228.111),很快
很影响体验。没有更好的选择了吗?或者在检测到速度较慢时可以换个副本连接?

好奇分析了一把
http://v.youku.com/v_show/id_XMTk0NTk5NTg0.html
分段信息可以通过
http://v.youku.com/player/getPlayList/VideoIDS/XMTk0NTk5NTg0/timezone/+08/version/5/source/video?password=&ran=8590&n=3
获得,返回是json消息:
{"data":[{"tt":"0","show":{"showid":79620,"copyright":0,"theaterid":0},"ct":"v","cs":"","logo":"http:\/\/g2.ykimg.com\/1100641F464BD51F0959030394F8D56F2017A9-A2B0-F2AA-C732-E4EABA785DAE","seed":2374,"tags":["\经\典","\英\国\达\人","\娱\乐"],"categories":"85","videoid":"48649896","username":"\小\鸟\总\动\?","userid":"48349241","title":"\英\国\达\人\第\四\?","key1":"bd7cb031","key2":"fbfe67156f243ff4","seconds":"2848.45","streamfileids":{"flv":"24*1*24*24*24*19*24*17*24*24*38*11*37*57*7*13*24*47*57*1*38*37*24*1*47*38*13*25*37*57*58*1*25*7*11*38*7*9*63*57*9*25*25*63*9*9*67*38*63*9*19*9*37*63*7*37*47*38*14*11*1*24*14*24*9*9*"},"segs":{"flv":[{"no":"0","size":"12997661","seconds":"421"},{"no":"1","size":"13133313","seconds":"424"},{"no":"2","size":"13073658","seconds":"422"},{"no":"3","size":"13046037","seconds":"420"},{"no":"4","size":"12905791","seconds":"421"},{"no":"5","size":"13045549","seconds":"424"},{"no":"6","size":"9587159","seconds":"316"}]},"streamsizes":{"flv":"87789168"},"streamtypes":["flvhd"],"streamtypes_o":["flvhd"]}],"user":{"id":0},"controller":{"search_count":tr,"mp4_restrict":1,"stream_mode":1,"share_disabled":false,"download_disabled":false}}

分了7段,seed应该是一个随机数种子,key1,key2,还有后面这一串数字都是随机生成的{"flv":"24*1*24*24*24*19*24*17*24*24*38*11*37*57*7*13*24*47*57*1*38*37*24*1*47*38*13*25*37*57*58*1*25*7*11*38*7*9*63*57*9*25*25*63*9*9*67*38*63*9*19*9*37*63*7*37*47*38*14*11*1*24*14*24*9*9*"}
跟分段有关吗?谁能告诉我啊?

第一段文件获取url
http://f.youku.com/player/getFlvPath/sid/128360331567116713680_00/st/flv/fileid/03000207004BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE?start=25&K=3fde8322f76cb34318261597&myp=0&ts=421.333
http://123.234.0.41/youku/4774AC2C4C83A8355026B23768/03000207004BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE.flv?start=25
http://58.100.228.109:9203/2900EA7BD70F09A61932F748074C74B9AB8A1551256C23C706394AB20B1DC51B963A7D7B0E5068FA36B64AE74/123.234.0.41/youku/4774AC2C4C83A8355026B23768/03000207004BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE.flv?start=25
第二段文件获取url
http://f.youku.com/player/getFlvPath/sid/128360331567116713680_01/st/flv/fileid/03000207014BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE?start=291&K=3fde8322f76cb34318261597&myp=0&ts=423.933
http://61.55.175.76/youku/29768AA4A1E397D5F055E6BA5/03000207014BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE.flv?start=291
第三段文件获取url
http://f.youku.com/player/getFlvPath/sid/128360331567116713680_02/st/flv/fileid/03000207024BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE?start=171&K=3fde8322f76cb34318261597&myp=0&ts=422
http://123.234.0.32/youku/1572CDB4D1F388337142D461CF/03000207024BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE.flv?start=171
http://58.100.228.111:9204/2000EA7B31128684D5744ECA25A9CE68860A7677BECEB59C56613EE03FAFE97FA961A9F4FFE1E03453096B4C4/123.234.0.32/youku/1572CDB4D1F388337142D461CF/03000207024BD51F09534D0394F8D5C381B41E-5E88-EEA4-E2ED-1D946B3060EE.flv?start=171

第一段和第三段都经过了两次跳转,可以推断的是123.234.0.41和123.234.0.32做了智能判断,跳转到了离我最近的服务器,61.55.175.76这台服务器为什么没有呢?
  评论这张
 
阅读(2605)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017