青龙棋牌

产品列表PRODUCTS LIST

青龙棋牌 > 技术与支持 > rtp音视频同步问题解决方法
rtp音视频同步问题解决方法
点击次数:260 发布时间:2018-05-18

rtp音视频同步问题解决方法

YOUYUYINSHIPINLIUSHIYILIANGTIAODULIDESHUJULIUZAIWANGLUOSHANGCHUANSHUDE,RUGUOWANGLUOZHILIANGXIANGDANGCHA,NEIMEZAIJIESHOUDUANSHOUDAODEYINSHIPINSHUJULIUJIUYOUKENENGBUSHITONGBUDELE,WEILEKEFUZHEIZHONGBUTONGBUDEXIANXIANG,XUYAOTIANJIATONGBUJIZHI。DETONGBUJIZHISHISHIYONGKAIYUANKUjrtplib3.7.1LAISHIXIANDE,YANGEZUNSHOUrtpXIEYIBIAOZHUN。

JIEJUEDEFANGANRUXIA:

DANGYOUSHUJUXUYAOFASONGSHI,WANGSHUJUZHONGJIARUSHIJIANCHUO,ZAIJIESHOUDUAN,DUQUSHIJIANCHUO,JINXINGBIJIAO,RUGUOXIANGTONGHUOXIANGCHAHENJIN,JIUTIJIAOBOFANG,RUGUOQIZHONGYIGESHIJIANCHUOGENGDA,JIUDENGDAI。RUGUOWANGLUOZHILIANGHENCHA,NEIMECUNZAILIANGZHONGBUTONGBUDEQINGKUANG:

1.   DUIYUDANTIAOSHUJULIULAISHUO,RUGUOWANGLUOZHILIANGHENCHA,KENENGCHUXIANSHUJULIUDEJIESHOUBULIUCHANG,RUGUOMEIYOUZUOLIUCHANGCHULI,NEIMEJIUKENENGCHUXIANDOUDONGXIANXIANG,ZHEIXUYAOSHIYONGrtpZHONGDESHIJIANCHUOJIEJUE。

2.   DUIYUDUOTIAOSHUJULIULAISHUO,RUGUOWANGLUOZHILIANGHENCHA,KENENGCHUXIANBENYINGGAITONGSHIBOFANGDESHUJUZHENMEIYOUZAITONGYISHIJIANDAODA,XUYAOZUOTONGBUCHULI。

青龙棋牌JIEJUEDI1GEWENTIDEFANGFASHIXIANGMEIGEFASONGDESHUJUBAOJIASHANGSHIJIANCHUO,ZAIrtpKUZHONG,SHIJIANCHUOBIAOSHIZAIDABAOSHUJUDUANZHONG*GECAIYANGSUODUIYINGDESHIJIAN,SHIJIANCHUODEQISHIZHISHISUIJIDE,HOUXUDESHIJIANCHUOSHIZAIQIANYIGESHIJIANCHUOSHANGDEZENGLIANG,ZAISendPacketZHONGDESHIJIANCHUOCANSHUBIAOSHIDESHISHIJIANCHUOZENGLIANG,SUOYISHUJULIUDETONGBUXUYAOJISUANCHUSHIJIANCHUOZENGLIANG。

DUIYUYINPINSHUJU,YOUYUYINPINSHUJUDECAIYANGLVSHI8000Hz,SUOYIMEICAIYANGYICIXUYAOSHIJIANSHI1/8000s,YOUYUSHIMEI20msFENGBAOYICI,SUOYISHIJIANCHUODEZENGLIANGSHI(20*10**-3)*8000=160。

DUIYUSHIPINSHUJU,YOUYUSHIPINSHUJUDECAIYANGLVSHI90000Hz,SUOYIMEICAIYANGYICIXUYAOSHIJIANSHI1/90000s,RUGUOZHENLVSHI25ZHEN/s,SUOYISHIJIANCHUOZENGLIANGSHI90000/25=3600。

ZAIFASONGDUAN,MEIFASONGYIGESHUJUBAO,DOUDASHANGGAISHUJUBAODUIYINGDESHIJIANCHUOZHI,ZHIXUYAOXIANGSendPacketDEzuiHOUGECANSHUCHUANDISHIJIANCHUOZENGLIANG,rtpKUHUIZIDONGSUANCHUSHIJIANCHUO,BINGJIADAOFASONGDErtpSHUJUBAOSHOUBULIBIAN。

ZAIJIESHOUDUAN,DANGSHOUDAOYIGESHUJUBAOSHI,HUOQUGAIrtpSHUJUBAODESHIJIANCHUOZHI,JISUANCHUYUQIANYIGESHUJUBAODESHIJIANCHUOZHIDECHAZHI,CHENGYIGAIMEITILIUDESHIJIANCHUODANWEI,JIUDECHULEDANGQIANSHUJUBAOYUQIANYIGESHUJUBAOZHIJIANDEJIANGEDEDABAOSHIJIANT。SUOYIZHIYAOBAOZHENGZAIYUQIANYIGESHUJUBAOBEITIJIAOGUOHOUTSHIJIANHOUZAITIJIAODANGQIANJIESHOUDAODESHUJUBAO,NEIMEZAIrtpCENGJIUJIEJUELESHANGBIANTICHUDE*GEWENTI。

JIEJUEDI2GEWENTIDEFANGFASHISHIYONGrtcpFASONGZHEBAOGAOSHUJUBAOZHONGDESHIJIANXINXI,FASONGZHEBAOGAOBEIFASONGDEJIANGESHIJIANSHIBUGUDINGDE,TADEDAXIAOYUCANYUDAOHUIHUAZHONGDETONGBUYUANSHULIANGCHENGZHENGBI。MEIGEFASONGZHEBAOGAOZHONGDOUYOUGEntpSHIJIANHErtpSHIJIAN,GAIntpSHIJIANBIAOSHIZAIFASONGSHIJIANCHUOWEIGAIrtpSHIJIANDErtpBAOSHIDEXITONGSHIJIAN,JIUSHIZAIFASONGZHEIGErtpBAOSHIDEXITONGSHIJIAN,SUOYIZHEILIANGGESHIJIANZHIYOUDUIYINGGUANXI,YOUYUDUIYUYIGETONGBUYUAN,SHIJIANCHUODANWEISHIGUDINGDE,SUOYIKEYIYOUHOUXUDEMOUGESHUJUBAODErtpSHIJIANCHUOJISUANCHUZHEIGESHUJUBAOSUODUIYINGDESHIJIAN,ZHEIGESHIJIANJIUSHIZAIFASONGZHEIGESHUJUBAOSHI,FASONGDUANDEXITONGSHIJIAN。

使用这种方法就可以计算出每个收到的rtp数据包在发送端的系统时间,这个系统时间在发送端是单调递增的,所以可以通过这个值来同步多条数据流。