測試直接用rtmpdump也會有問題
改用crtmpserver後rtmpdump就OK
目前發現改可改librtmp的rtmp.c
SendBytesReceived
AMF_EncodeInt32(packet.m_body, pend, r->m_nBytesIn);
r->m_nBytesInSent = r->m_nBytesIn;
改成
AMF_EncodeInt32(packet.m_body, pend, r->m_nBytesIn); /* hard coded for now */
if(r->m_nBytesIn>0x70000000){
r->m_nBytesIn = 10000;
}
r->m_nBytesInSent = r->m_nBytesIn;
或改ffmpeg的ffmpeg/libavformat/rtmpproto.c
gen_bytes_read
int ret;
if ((ret = ff_rtmp_packet_create(&pkt, RTMP_NETWORK_CHANNEL, RTMP_PT_BYTES_READ,ts, 4)) < 0)
改成
int ret;
if(rt->bytes_read>0x70000000)
rt->bytes_read = 10000;
if ((ret = ff_rtmp_packet_create(&pkt, RTMP_NETWORK_CHANNEL, RTMP_PT_BYTES_READ,ts, 4)) < 0)
這是會定時回報SERVER收到多少BYTE的資料
超過0xFFFFFFFF就會被SERVER斷線,
留言列表