在解码中,接了浙江宇视的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 ?
相机类型型号:
百度了下,网友中有分析说是两个方面的问题,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帧:
encPrm.chCreateParams.defaultDynamicParams.intraFrameInterval = 25;
encPrm.chCreateParams.encodingPreset = XDM_USER_DEFINED;
复制代码
(1): 问题
用科达NVR作为客户端连接DM8168,发现NVR的视频画面和录像会出现停止,并且提示“前端
掉线”的告警,过了1分钟后又开始正常显示和录像.
(2): 原因
在liveMedia/RTSPServer.cpp中将DEBUG宏打开,跟踪NVR整个连接过程,结果发现如下信息:
RTSP client session (id "555C5F62", stream name "id1") has timed out (due to inactivity)
复制代码
而正常的连接打印为:
RTSP client session (id "023C11D5", stream name "id1"): Liveness indication
RTSP client session (id "023C11D5", stream name "id1"): Liveness indication
复制代码
意思就是一旦RTSP的客户端连接成功后,需要周期的想服务端发送心跳包,如果超过某个设定的时间,
RTSP 服务端则会主动关闭这个客户端的连接,因此导致科达的NVR被关闭,之后又重新连接,因此导致
视频显示和画面中断又继续。
(3): 解决办法:
调整RTSP服务端的超时时间值:fReclamationTestSeconds,而这个值在
liveMedia/include/RTSPServer.hh有初始值:
static RTSPServer* createNew(UsageEnvironment& env, Port ourPort = 554,
UserAuthenticationDatabase* authDatabase = NULL,
unsigned reclamationTestSeconds = 65);
复制代码
在构造函数createNew的实现中,在初始化参数列表亦可以进行修改,
RTSPServer::RTSPServer(UsageEnvironment& env,
int ourSocket, Port ourPort,
UserAuthenticationDatabase* authDatabase,
unsigned reclamationTestSeconds): Medium(env), ............... fReclamationTestSeconds(reclamationTestSeconds)
复制代码
因此,在自己的应用程序创建 RTSPServer的时候,修改这个值:
// Create the RTSP server:
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/
问题还没解决!!!