Answer for RTMP reconnection causing MPEG-TS push stream to drop video
Written by mjames on 23 Sep 2013 . Posted in
The frame-rate is 30, and I am told that the stream has an I-frame every 2 seconds (GOP size = 60). What is the best GOP size configuration for EvoStream? Likewise is there an optimal frame-rate?
The push command is as follows:
pushstream uri=mpegtsudp://239.11.1.1:2000 localStreamname=live
Here is a sample of the logs for an event that causes the stream to drop.
1379863611:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol CTCP(23) <-> TCP(35596) <-> OSSL(35597) <-> OHTT(35598) <-> [JVAR(35599)] unregistered from application: lminterface
1379863611:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 19->18 IOHT_TCP_CARRIER
1379863671:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 18->19 IOHT_TCP_CONNECTOR
1379863671:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 19->20 IOHT_TCP_CARRIER
1379863671:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 20->19 IOHT_TCP_CONNECTOR
1379863671:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol CTCP(23) <-> TCP(35600) <-> OSSL(35601) <-> OHTT(35602) <-> [JVAR(35603)] unregistered from application: lminterface
1379863671:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 19->18 IOHT_TCP_CARRIER
1379863731:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 18->19 IOHT_TCP_CONNECTOR
1379863731:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 19->20 IOHT_TCP_CARRIER
1379863731:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 20->19 IOHT_TCP_CONNECTOR
1379863731:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol CTCP(23) <-> TCP(35604) <-> OSSL(35605) <-> OHTT(35606) <-> [JVAR(35607)] unregistered from application: lminterface
1379863731:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 19->18 IOHT_TCP_CARRIER
1379863757:2:/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1285:ProcessInvokeOnStatus:Default implementation of ProcessInvokeOnStatus in application evostreamms: Request:n<MAP name="" isArray="false">n <MAP name="header" isArray="false">n <UINT32 name="channelId">20</UINT32>n <UINT8 name="headerType">3</UINT8>n <BOOL name="isAbsolute">false</BOOL>n <UINT32 name="messageLength">137</UINT32>n <UINT8 name="messageType">20</UINT8>n <UINT32 name="streamId">1</UINT32>n <UINT32 name="timestamp">0</UINT32>n </MAP>n <MAP name="invoke" isArray="false">n <STR name="functionName">onStatus</STR>n <DOUBLE name="id">0.000</DOUBLE>n <BOOL name="isFlex">false</BOOL>n <MAP name="parameters" isArray="true">n <NULL name="0x00000000"></NULL>n <MAP name="0x00000001" isArray="false">n <STR name="clientid">258_1_10698288</STR>n <STR name="code">NetStream.Play.UnpublishNotify</STR>n <STR name="description">unpublished...</STR>n <STR name="level">status</STR>n </MAP>n </MAP>n </MAP>n</MAP>
1379863757:2:/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1285:ProcessInvokeOnStatus:Default implementation of ProcessInvokeOnStatus in application evostreamms: Request:n<MAP name="" isArray="false">n <MAP name="header" isArray="false">n <UINT32 name="channelId">20</UINT32>n <UINT8 name="headerType">3</UINT8>n <BOOL name="isAbsolute">false</BOOL>n <UINT32 name="messageLength">146</UINT32>n <UINT8 name="messageType">20</UINT8>n <UINT32 name="streamId">1</UINT32>n <UINT32 name="timestamp">0</UINT32>n </MAP>n <MAP name="invoke" isArray="false">n <STR name="functionName">onStatus</STR>n <DOUBLE name="id">0.000</DOUBLE>n <BOOL name="isFlex">false</BOOL>n <MAP name="parameters" isArray="true">n <NULL name="0x00000000"></NULL>n <MAP name="0x00000001" isArray="false">n <STR name="clientid">258_1_10698288</STR>n <STR name="code">NetStream.Play.Stop</STR>n <STR name="description">stop...</STR>n <STR name="details">live</STR>n <STR name="level">status</STR>n <STR name="reason"></STR>n </MAP>n </MAP>n </MAP>n</MAP>
1379863757:0:/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:642:ProcessUsrCtrl:Invalid user ctrl:n<MAP name="" isArray="false">n <MAP name="header" isArray="false">n <UINT32 name="channelId">2</UINT32>n <UINT8 name="headerType">0</UINT8>n <BOOL name="isAbsolute">true</BOOL>n <UINT32 name="messageLength">6</UINT32>n <UINT8 name="messageType">4</UINT8>n <UINT32 name="streamId">0</UINT32>n <UINT32 name="timestamp">0</UINT32>n </MAP>n <MAP name="usrCtrl" isArray="false">n <UINT32 name="streamId">1</UINT32>n <UINT16 name="type">1</UINT16>n <STR name="typeString">RM_USRCTRL_TYPE_STREAM_EOF</STR>n </MAP>n</MAP>
1379863757:0:/thelib/src/protocols/rtmp/basertmpprotocol.cpp:1054:ProcessBytes:Unable to send rtmp message to application
1379863757:0:/thelib/src/netio/epoll/tcpcarrier.cpp:98:OnEvent:Unable to signal data available
1379863757:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 18->17 IOHT_TCP_CARRIER
1379863757:3:/thelib/src/application/baseclientapplication.cpp:296:SignalStreamUnRegistered:Stream INR(238) with name `live` from protocol IR(33305) unregistered from application `evostreamms`
1379863757:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol [IR(33305)] unregistered from application: evostreamms
1379863757:3:/thelib/src/application/baseclientapplication.cpp:296:SignalStreamUnRegistered:Stream ONTS(239) with name `live` from protocol PT(33306) unregistered from application `evostreamms`
1379863757:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol [PT(33306)] unregistered from application: evostreamms
1379863757:2:/thelib/src/streaming/baseoutstream.cpp:93:UnLink:BaseOutStream::UnLink: This stream is not linked
1379863757:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 17->16 IOHT_UDP_CARRIER
1379863758:2:/applications/evorouter/src/application/originapplication.cpp:322:PushLocalStream:Input stream live not available yet
1379863773:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 16->17 IOHT_TCP_CARRIER
1379863773:3:/thelib/src/netio/epoll/tcpacceptor.cpp:191:Accept:Client connected: 127.0.0.1:56116 -> 127.0.0.1:1936
1379863773:3:/thelib/src/application/baseclientapplication.cpp:291:SignalStreamRegistered:Stream NR(240) with name `` from protocol IR(35609) registered to application `evostreamms`
1379863773:3:/thelib/src/application/baseclientapplication.cpp:296:SignalStreamUnRegistered:Stream NR(240) with name `` from protocol IR(35609) unregistered from application `evostreamms`
1379863773:3:/thelib/src/application/baseclientapplication.cpp:291:SignalStreamRegistered:Stream INR(241) with name `live` from protocol IR(35609) registered to application `evostreamms`
1379863774:3:/thelib/src/application/baseclientapplication.cpp:291:SignalStreamRegistered:Stream ONTS(242) with name `live` from protocol PT(35610) registered to application `evostreamms`
1379863774:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 17->18 IOHT_UDP_CARRIER
1379863774:2:/thelib/src/streaming/baseoutstream.cpp:445:GenericStreamCapabilitiesChanged:Video codec VUNK not supported by stream type ONTS
1379863791:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 18->19 IOHT_TCP_CONNECTOR
1379863791:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 19->20 IOHT_TCP_CARRIER
1379863791:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 20->19 IOHT_TCP_CONNECTOR
1379863791:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol CTCP(23) <-> TCP(35612) <-> OSSL(35613) <-> OHTT(35614) <-> [JVAR(35615)] unregistered from application: lminterface
1379863791:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 19->18 IOHT_TCP_CARRIER
1379863851:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 18->19 IOHT_TCP_CONNECTOR
1379863851:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 19->20 IOHT_TCP_CARRIER
1379863851:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 20->19 IOHT_TCP_CONNECTOR
1379863851:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol CTCP(23) <-> TCP(35616) <-> OSSL(35617) <-> OHTT(35618) <-> [JVAR(35619)] unregistered from application: lminterface
1379863851:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 19->18 IOHT_TCP_CARRIER
1379863911:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 18->19 IOHT_TCP_CONNECTOR
1379863911:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 19->20 IOHT_TCP_CARRIER
1379863911:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 20->19 IOHT_TCP_CONNECTOR
1379863911:6:/thelib/src/application/baseclientapplication.cpp:286:UnRegisterProtocol:Protocol CTCP(23) <-> TCP(35620) <-> OSSL(35621) <-> OHTT(35622) <-> [JVAR(35623)] unregistered from application: lminterface
1379863911:4:/thelib/src/netio/epoll/iohandlermanager.cpp:130:UnRegisterIOHandler:Handlers count changed: 19->18 IOHT_TCP_CARRIER
1379863971:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 18->19 IOHT_TCP_CONNECTOR
1379863971:4:/thelib/src/netio/epoll/iohandlermanager.cpp:120:RegisterIOHandler:Handlers count changed: 19->20 IOHT_TCP_CARRIER