Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    tinyvision使用udp传输264延迟仅100+ms

    V Series
    1
    1
    502
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lajuchenghui
      逸俊晨晖 LV 5 last edited by

      之前做了个rtsp服务 拉流发现延迟比较高 实际上读帧和编码的耗时并有没那么高 所以猜测时rtsp服务带来了较高的延时 于是就做了个单独的udp传输264
      测试结果 1080P@20 延迟100+ms
      延迟2.png

      通信过程
      tinyvision是服务端 PC是客户端
      首先客户端向服务端发起连接请求 服务端回复视频参数
      然后服务端向客户端持续发送264 客户端每次收到都必须回复顺序号 以此保证顺序同步 防止乱序和丢包导致的花屏
      为了保证稳定性 服务端在根据客户端回复的顺序号判断出丢包后会小间隔进行多次重发 多次重发失败后判定为连接断开 客户端在大间隔没收到数据后会重新向服务端发起连接

      PC端播放
      PC端拿到264数据后 用ffmpeg解码获得yuv数据 然后用SDL间接调用openGL接收yuv数据进行渲染

      1 Reply Last reply Reply Quote Share 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策