EasyDarwin / EasyPusher-Android

免费组件:简单、高效、稳定、免费的一款标准RTSP/RTP协议直播推送库,支持将H.264/H.265/G.711/G.726/AAC等音视频数据推送到RTSP流媒体服务器(例如EasyDarwin)进行低延时直播或者视频通信,支持Windows、Linux、ARM、Android、iOS等平台,EasyPusher配套EasyDarwin流媒体服务器、EasyPlayer RTSP播放器适用于特殊行业的低延时应急指挥需求! Android迁移到了https://github.com/EasyDarwin/EasyPusher-Android , iOS迁移到了https://github.com/EasyDarwin/EasyPusher-iOS
http://www.easydarwin.org
646 stars 262 forks source link

推流返回6-断开连接 #10

Closed jp1017 closed 6 years ago

jp1017 commented 6 years ago

返回码分别是0, 1, 2, 6

10-11 15:45:19.323 W/CameraServer( 3499): 推流onCallback: 0
10-11 15:45:19.323 W/CameraServer( 3499): 推流激活成功
10-11 15:45:19.323 D/libEasyPusher( 3499): EasyStreamPusher_StartStream serverAddr[video.qd.com] port[10554] videoCodec[28] audioCodec[86018] samplerate[8000]  serverURL[rtsp://video.qd.com:10554/107700000088_11.sdp]
10-11 15:45:19.324 W/MediaAudioEncoder( 3499): AudioThread:start audio recording
10-11 15:45:19.325 D/libEasyPusher( 3499): init sock: 0
10-11 15:45:19.325 E/easypusher_jni( 3499): ____isActivated__....... userPtr=-432548752
10-11 15:45:19.326 W/CameraServer( 3499): 推流onCallback: 1
10-11 15:45:19.326 W/CameraServer( 3499): 推流连接中
10-11 15:45:19.337 W/MediaEncoder( 3499): INFO_OUTPUT_FORMAT_CHANGED
10-11 15:45:19.344 W/MediaMuxerWrapper( 3499): addTrack:trackNum=2,trackIx=0,format={csd-1=java.nio.HeapByteBuffer[pos=0 lim=8 cap=8], mime=video/avc, frame-rate=15, width=320, height=240, color-standard=4, color-range=2, bitrate=576000, csd-0=java.nio.HeapByteBuffer[pos=0 lim=20 cap=20], color-transfer=3, max-bitrate=576000}
10-11 15:45:19.344 W/MediaMuxerWrapper( 3499): start:
10-11 15:45:19.376 D/libEasyPusher( 3499): IP address: 139.224.226.23
10-11 15:45:19.376 D/libEasyPusher( 3499): Connecting [139.224.226.23:10554]
10-11 15:45:19.414 E/easypusher_jni( 3499): ____isActivated__....... userPtr=-432548752
10-11 15:45:19.414 W/CameraServer( 3499): 推流onCallback: 2
10-11 15:45:19.414 W/CameraServer( 3499): 推流连接成功
10-11 15:45:19.414 D/libEasyPusher( 3499): Connect success
10-11 15:45:19.416 D/libEasyPusher( 3499): SEND[726]
10-11 15:45:19.416 D/libEasyPusher( 3499): ANNOUNCE rtsp://video.qd.com:10554/107700000088_11.sdp RTSP/1.0
10-11 15:45:19.416 D/libEasyPusher( 3499): CSeq: 1
10-11 15:45:19.416 D/libEasyPusher( 3499): User-Agent: EasyPusher v1.2.16.1105
10-11 15:45:19.416 D/libEasyPusher( 3499): Content-Type: application/sdp
10-11 15:45:19.416 D/libEasyPusher( 3499): Content-Length: 557
10-11 15:45:19.416 D/libEasyPusher( 3499): 
10-11 15:45:19.416 D/libEasyPusher( 3499): v=0
10-11 15:45:19.416 D/libEasyPusher( 3499): o=- 2205756022 2205756022 IN IP4 127.0.0.1
10-11 15:45:19.416 D/libEasyPusher( 3499): s=EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): i=EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): c=IN IP4 127.0.0.1
10-11 15:45:19.416 D/libEasyPusher( 3499): t=0 0
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-nam:EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-inf:EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-cmt:source application::EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-aut:
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-cpy:
10-11 15:45:19.416 D/libEasyPusher( 3499): m=video 0 RTP/AVP 96
10-11 15:45:19.416 D/libEasyPusher( 3499): a=rtpmap:96 H264/90000
10-11 15:45:19.416 D/libEasyPusher( 3499): a=fmtp:96 packetization-mode=1;sprop-parameter-sets=
10-11 15:45:19.416 D/libEasyPusher( 3499): a=control:trackID=1
10-11 15:45:19.416 D/libEasyPusher( 3499): m=audio 0 RTP/AVP 97
10-11 15:45:19.416 D/libEasyPusher( 3499): a=rtpmap:97 MPEG4-GENERIC/8000/1
10-11 15:45:19.416 D/libEasyPusher( 3499): a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1588
10-11 15:45:19.416 D/libEasyPusher( 3499): a=control:trackID=2
10-11 15:45:19.416 D/libEasyPusher( 3499): 
10-11 15:45:19.499 W/MediaEncoder( 3499): INFO_OUTPUT_FORMAT_CHANGED
10-11 15:45:19.501 W/MediaMuxerWrapper( 3499): addTrack:trackNum=2,trackIx=1,format={bitrate=64000, mime=audio/mp4a-latm, csd-0=java.nio.HeapByteBuffer[pos=0 lim=2 cap=2], channel-count=1, sample-rate=44100, max-bitrate=64000}
10-11 15:45:19.501 W/MediaMuxerWrapper( 3499): start:
10-11 15:45:19.502 I/MPEG4Writer( 3499): limits: 4294967295/0 bytes/us, bit rate: -1 bps and the estimated moov size 3195 bytes
10-11 15:45:19.505 W/MediaMuxerWrapper( 3499): MediaMuxer started:
10-11 15:45:19.506 W/MediaEncoder( 3499): drain:BUFFER_FLAG_CODEC_CONFIG
10-11 15:45:19.507 W/MediaEncoder( 3499): drain:BUFFER_FLAG_CODEC_CONFIG
10-11 15:45:19.525 D/libEasyPusher( 3499): close socket..
10-11 15:45:19.525 D/libEasyPusher( 3499): Push Thread exit...
10-11 15:45:19.525 E/easypusher_jni( 3499): ____isActivated__....... userPtr=-432548752
10-11 15:45:19.525 W/CameraServer( 3499): 推流onCallback: 6
10-11 15:45:19.525 W/CameraServer( 3499): 推流断开连接
jp1017 commented 6 years ago

单独推送音频时返回0, 1, 2, 4, 是什么问题呢

10-12 14:58:56.007 W/CameraServer(18941): 推流onCallback: 0
10-12 14:58:56.008 W/CameraServer(18941): 推流激活成功
10-12 14:58:56.009 D/libEasyPusher(18941): EasyStreamPusher_StartStream serverAddr[video.qd.com] port[10554] videoCodec[28] audioCodec[86018] samplerate[8000]  serverURL[rtsp://video.qd.com:10554/107700000088_11.sdp]
10-12 14:58:56.015 D/libEasyPusher(18941): init sock: 0
10-12 14:58:56.015 E/easypusher_jni(18941): ____isActivated__....... userPtr=-750104944
10-12 14:58:56.015 W/CameraServer(18941): 推流onCallback: 1
10-12 14:58:56.016 W/CameraServer(18941): 推流连接中
10-12 14:58:56.021 W/MediaAudioEncoder(18941): 音/视频: micId: 0
10-12 14:58:56.030 D/libEasyPusher(18941): IP address: 139.224.226.23
10-12 14:58:56.030 D/libEasyPusher(18941): Connecting [139.224.226.23:10554]
10-12 14:58:56.063 E/easypusher_jni(18941): ____isActivated__....... userPtr=-750104944
10-12 14:58:56.063 W/CameraServer(18941): 推流onCallback: 2
10-12 14:58:56.063 W/CameraServer(18941): 推流连接成功
10-12 14:58:56.063 D/libEasyPusher(18941): Connect success
10-12 14:58:56.066 D/libEasyPusher(18941): SEND[726]
10-12 14:58:56.066 D/libEasyPusher(18941): ANNOUNCE rtsp://video.qd.com:10554/107700000088_11.sdp RTSP/1.0
10-12 14:58:56.066 D/libEasyPusher(18941): CSeq: 1
10-12 14:58:56.066 D/libEasyPusher(18941): User-Agent: EasyPusher v1.2.16.1105
10-12 14:58:56.066 D/libEasyPusher(18941): Content-Type: application/sdp
10-12 14:58:56.066 D/libEasyPusher(18941): Content-Length: 557
10-12 14:58:56.066 D/libEasyPusher(18941): 
10-12 14:58:56.066 D/libEasyPusher(18941): v=0
10-12 14:58:56.066 D/libEasyPusher(18941): o=- 2205756022 2205756022 IN IP4 127.0.0.1
10-12 14:58:56.066 D/libEasyPusher(18941): s=EasyDarwin
10-12 14:58:56.066 D/libEasyPusher(18941): i=EasyDarwin
10-12 14:58:56.066 D/libEasyPusher(18941): c=IN IP4 127.0.0.1
10-12 14:58:56.066 D/libEasyPusher(18941): t=0 0
10-12 14:58:56.066 D/libEasyPusher(18941): a=x-qt-text-nam:EasyDarwin
10-12 14:58:56.066 D/libEasyPusher(18941): a=x-qt-text-inf:EasyDarwin
10-12 14:58:56.066 D/libEasyPusher(18941): a=x-qt-text-cmt:source application::EasyDarwin
10-12 14:58:56.066 D/libEasyPusher(18941): a=x-qt-text-aut:
10-12 14:58:56.066 D/libEasyPusher(18941): a=x-qt-text-cpy:
10-12 14:58:56.066 D/libEasyPusher(18941): m=video 0 RTP/AVP 96
10-12 14:58:56.066 D/libEasyPusher(18941): a=rtpmap:96 H264/90000
10-12 14:58:56.066 D/libEasyPusher(18941): a=fmtp:96 packetization-mode=1;sprop-parameter-sets=
10-12 14:58:56.066 D/libEasyPusher(18941): a=control:trackID=1
10-12 14:58:56.066 D/libEasyPusher(18941): m=audio 0 RTP/AVP 97
10-12 14:58:56.066 D/libEasyPusher(18941): a=rtpmap:97 MPEG4-GENERIC/8000/1
10-12 14:58:56.066 D/libEasyPusher(18941): a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1588
10-12 14:58:56.066 D/libEasyPusher(18941): a=control:trackID=2
10-12 14:58:56.066 D/libEasyPusher(18941): 
10-12 14:58:56.092 D/libEasyPusher(18941): RECV[125]
10-12 14:58:56.092 D/libEasyPusher(18941): RTSP/1.0 200 OK
10-12 14:58:56.092 D/libEasyPusher(18941): Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )
10-12 14:58:56.092 D/libEasyPusher(18941): Cseq: 1
10-12 14:58:56.092 D/libEasyPusher(18941): 
10-12 14:58:56.092 D/libEasyPusher(18941): 
10-12 14:58:56.092 D/libEasyPusher(18941): SEND[184]
10-12 14:58:56.092 D/libEasyPusher(18941): SETUP rtsp://video.qdsxkj.com:10554/107700000088_11.sdp/trackID=1 RTSP/1.0
10-12 14:58:56.092 D/libEasyPusher(18941): CSeq: 2
10-12 14:58:56.092 D/libEasyPusher(18941): User-Agent: EasyPusher v1.2.16.1105
10-12 14:58:56.092 D/libEasyPusher(18941): Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1
10-12 14:58:56.092 D/libEasyPusher(18941): 
10-12 14:58:56.092 D/libEasyPusher(18941): 
10-12 14:58:56.123 D/libEasyPusher(18941): RECV[312]
10-12 14:58:56.123 D/libEasyPusher(18941): RTSP/1.0 200 OK
10-12 14:58:56.123 D/libEasyPusher(18941): Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )
10-12 14:58:56.123 D/libEasyPusher(18941): Cseq: 2
10-12 14:58:56.123 D/libEasyPusher(18941): Cache-Control: no-cache
10-12 14:58:56.123 D/libEasyPusher(18941): Session: 17806934427188
10-12 14:58:56.123 D/libEasyPusher(18941): Date: Thu, 12 Oct 2017 06:58:56 GMT
10-12 14:58:56.123 D/libEasyPusher(18941): Expires: Thu, 12 Oct 2017 06:58:56 GMT
10-12 14:58:56.123 D/libEasyPusher(18941): Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1
10-12 14:58:56.123 D/libEasyPusher(18941): 
10-12 14:58:56.123 D/libEasyPusher(18941): 
10-12 14:58:56.123 D/libEasyPusher(18941): SEND[209]
10-12 14:58:56.123 D/libEasyPusher(18941): SETUP rtsp://video.qdsxkj.com:10554/107700000088_11.sdp/trackID=2 RTSP/1.0
10-12 14:58:56.123 D/libEasyPusher(18941): CSeq: 3
10-12 14:58:56.123 D/libEasyPusher(18941): User-Agent: EasyPusher v1.2.16.1105
10-12 14:58:56.123 D/libEasyPusher(18941): Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3
10-12 14:58:56.123 D/libEasyPusher(18941): Session: 17806934427188
10-12 14:58:56.123 D/libEasyPusher(18941): 
10-12 14:58:56.123 D/libEasyPusher(18941): 
10-12 14:58:56.149 D/libEasyPusher(18941): RECV[312]
10-12 14:58:56.149 D/libEasyPusher(18941): RTSP/1.0 200 OK
10-12 14:58:56.149 D/libEasyPusher(18941): Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )
10-12 14:58:56.149 D/libEasyPusher(18941): Cseq: 3
10-12 14:58:56.149 D/libEasyPusher(18941): Session: 17806934427188
10-12 14:58:56.149 D/libEasyPusher(18941): Cache-Control: no-cache
10-12 14:58:56.149 D/libEasyPusher(18941): Date: Thu, 12 Oct 2017 06:58:56 GMT
10-12 14:58:56.149 D/libEasyPusher(18941): Expires: Thu, 12 Oct 2017 06:58:56 GMT
10-12 14:58:56.149 D/libEasyPusher(18941): Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3
10-12 14:58:56.149 D/libEasyPusher(18941): 
10-12 14:58:56.149 D/libEasyPusher(18941): 
10-12 14:58:56.149 D/libEasyPusher(18941): SEND[157]
10-12 14:58:56.149 D/libEasyPusher(18941): PLAY rtsp://video.qd.com:10554/107700000088_11.sdp RTSP/1.0
10-12 14:58:56.149 D/libEasyPusher(18941): CSeq: 4
10-12 14:58:56.149 D/libEasyPusher(18941): User-Agent: EasyPusher v1.2.16.1105
10-12 14:58:56.149 D/libEasyPusher(18941): Session: 17806934427188
10-12 14:58:56.149 D/libEasyPusher(18941): Range: npt=0.000-
10-12 14:58:56.149 D/libEasyPusher(18941): 
10-12 14:58:56.149 D/libEasyPusher(18941): 
10-12 14:58:56.173 W/MediaAudioEncoder(18941): output format changed...
10-12 14:58:56.176 D/libEasyPusher(18941): RECV[309]
10-12 14:58:56.176 D/libEasyPusher(18941): RTSP/1.0 200 OK
10-12 14:58:56.176 D/libEasyPusher(18941): Server: EasyDarwin/7.3 (Build/17.0325; Platform/Win32; Release/EasyDarwin; State/Development; )
10-12 14:58:56.176 D/libEasyPusher(18941): Cseq: 4
10-12 14:58:56.176 D/libEasyPusher(18941): Session: 17806934427188
10-12 14:58:56.176 D/libEasyPusher(18941): RTP-Info: url=rtsp://video.qd.com:10554/107700000088_11.sdp/107700000088_11.sdp,url=rtsp://video.qd.com:10554/107700000088_11.sdp/107700000088_11.sdp
10-12 14:58:56.176 D/libEasyPusher(18941): 
10-12 14:58:56.176 D/libEasyPusher(18941): 
10-12 14:58:56.176 D/libEasyPusher(18941): RTSP interaction is complete. Prepare to send RTP...
10-12 14:59:00.000 D/libEasyPusher(18941): Video source is lost.   times:5
10-12 14:59:00.020 W/LOGSERVICELOG(18941): mLogTaskReceiver: MONITOR_LOG_SIZE
10-12 14:59:00.020 W/LOGSERVICELOG(18941): -- checLogSize() --
10-12 14:59:01.000 D/libEasyPusher(18941): Video source is lost.   times:5
10-12 14:59:27.229 D/libEasyPusher(18941): EasyStreamPusher rcvpos: 0
10-12 14:59:27.229 D/libEasyPusher(18941): EasyStreamPusher: 105  exit 0..
10-12 14:59:27.229 E/easypusher_jni(18941): ____isActivated__....... userPtr=-753162752
10-12 14:59:27.230 W/MediaAudioEncoder(18941): 推流onCallback: 4
10-12 14:59:27.230 W/MediaAudioEncoder(18941): 推流连接异常中断
10-12 14:59:27.230 D/libEasyPusher(18941): close socket..
10-12 14:59:27.230 D/libEasyPusher(18941): init sock: -1
jinlong0813 commented 6 years ago

如果是自己编译的版本,请重新拉取下编译试试。或者下载https://fir.im/EasyPusher安装试试

jp1017 commented 6 years ago

key不对, initPusher返回一个负数, 请问这些这些返回码哪里有说明呢 @jinlong0813