• 8148 8168 中移植live55 出现except rtsp 中途莫名的断流


      在解码中,接了浙江宇视的ipc相机,解码一般就挂了,vlc 也是中途断流.费解?

    vlc异常信息如下:

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    direct3d warning: trying surface pixel format: YV12

    main error: Failed to resize display

    main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 600 ms)

    main error: ES_OUT_RESET_PCR called

    live555 warning: no data received in 10s, eof ?

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    packetizer_h264 warning: waiting for SPS/PPS

    direct3d warning: trying surface pixel format: YV12

    main error: Failed to resize display

    main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 600 ms)

    main error: ES_OUT_RESET_PCR called

    live555 warning: no data received in 10s, eof ?

    相机类型型号:

    http://www.uniview.com/Products/Cameras/Box/#~series0

    百度了下,网友中有分析说是两个方面的问题,1pts 解码显示太慢,2是两系统时钟突变时间戳对不上号.我猜,呵呵,有可能是加了私有协议

     更新:后面和常熟的顾哥网友聊聊发现他也遇到过类似情况,也还没解决,有两种情况一个是有些相机确实会断流,另外一种情况是live555里面貌似有bug 导致teardown

    rtsp的 默认端口地址是:

    address = *(addresses.firstAddress());

    portNum = 554; // default value

    2015-1-7 貌似有网友出现过这种情况:

    在基于TI DM8168 平台上移植live555  进行视频直播,DM8168采集的后的图像,经M3_video编码为H264视频流(编码后也是一帧一帧的数据),碰到以下问题:
        (1): 问题: 
              用VLC作为RTSP客户端连接DM8168, 只能播放开始几帧,之后画面变乱,并无法播放;
        (2): 原因:
              H264编码后的帧只有第一帧是IDR帧,之后没有IDR帧.
        (3): 解决办法:
              修改DM8168建立encode link时的参数,以便周期的产生IDR帧:

    1.                    encPrm.chCreateParams.defaultDynamicParams.intraFrameInterval = 25;
    2.                    encPrm.chCreateParams.encodingPreset = XDM_USER_DEFINED;
    复制代码

      (1): 问题
             用科达NVR作为客户端连接DM8168,发现NVR的视频画面和录像会出现停止,并且提示“前端
             掉线”的告警,过了1分钟后又开始正常显示和录像.
      (2): 原因
            在liveMedia/RTSPServer.cpp中将DEBUG宏打开,跟踪NVR整个连接过程,结果发现如下信息:

    1. RTSP client session (id "555C5F62", stream name "id1") has timed out (due to inactivity)
    复制代码

           而正常的连接打印为:

    1.           RTSP client session (id "023C11D5", stream name "id1"): Liveness indication
    2.          RTSP client session (id "023C11D5", stream name "id1"): Liveness indication
    复制代码

          意思就是一旦RTSP的客户端连接成功后,需要周期的想服务端发送心跳包,如果超过某个设定的时间,
           RTSP 服务端则会主动关闭这个客户端的连接,因此导致科达的NVR被关闭,之后又重新连接,因此导致
           视频显示和画面中断又继续。
       (3): 解决办法:
              调整RTSP服务端的超时时间值:fReclamationTestSeconds,而这个值在
             liveMedia/include/RTSPServer.hh有初始值:

    1.          static RTSPServer* createNew(UsageEnvironment& env, Port ourPort = 554,
    2.                                                      UserAuthenticationDatabase* authDatabase = NULL,
    3.                                                       unsigned reclamationTestSeconds = 65);
    复制代码

            在构造函数createNew的实现中,在初始化参数列表亦可以进行修改,

    1.          RTSPServer::RTSPServer(UsageEnvironment& env,
    2.                                  int ourSocket, Port ourPort,
    3.                                  UserAuthenticationDatabase* authDatabase,
    4.                                  unsigned reclamationTestSeconds): Medium(env), ............... fReclamationTestSeconds(reclamationTestSeconds)
    复制代码

    因此,在自己的应用程序创建 RTSPServer的时候,修改这个值:

    1.                  // Create the RTSP server:
    2.                   RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, authDB, 100);
    复制代码
    http://kuafu80.blog.163.com/blog/static/122647180201391193917936/
    http://www.61icbbs.com/forum.php?mod=viewthread&tid=9810

    http://kuafu80.blog.163.com/blog/static/122647180201391193917936/

    http://www.asmag.com.cn/test/show/69661.html

    http://zhidao.baidu.com/link?url=ukgA8J5O7-8z-7eZTX1NCzBGm5S_tIh2S9FseCveXx7oTcdVLX210REu7QUc0Whxdd52N5YSKcxUr__NLYDKV-ZTsIO7hI9CB50x-bP41By

    http://bbs.csdn.net/topics/390698320

    http://www.gzlilin.com.cn/article.aspx?a=839

    http://www.asmag.com.cn/test/show/69661.html

    问题还没解决!!!

  • 相关阅读:
    对于高并发短连接造成Cannot assign requested address解决方法
    virtualbox迁移已建虚机存储磁盘方法
    httpd:RSA certificate configured for SERVER does NOT include an ID which matches the server name
    解决服务不断重启挂掉问题
    tbb静态库编译
    su和su
    ubuntu18.04 mariadb start失败
    如何修复“sshd error: could not load host key”
    [LeetCode]Gas Station
    Java多态的一些陷阱
  • 原文地址:https://www.cnblogs.com/pengkunfan/p/4160410.html
Copyright © 2020-2023  润新知