Code Monkey home page Code Monkey logo

tsingsee / easyrtspclient Goto Github PK

View Code? Open in Web Editor NEW
265.0 47.0 174.0 72.48 MB

Streaming media sdk tool:An elegant, simple, high performance & high compatibility RTSP Client Utility,can use in RTSP Player,NVR,RTSP Relay,EasyRTSPClient can run in any platform ,such as x68/x64/Windows/Linux/Android/iOS/arm etc..,with flexible interface,EasyRTSPClient can fit almost all network IPCamera,very easy to use.简单、稳定、高效、易用的RTSPClient工具,支持Windows、Linux、ARM、Android、iOS等几乎所有平台,支持RTP Over TCP/UDP,支持断线重连,能够接入市面上99%以上的IPC,调用简单且成熟稳定!

Home Page: http://open.tsingsee.com/sdk/easyrtspclient/

C 32.49% C++ 26.05% Shell 1.73% Makefile 39.73%
rtspclient easyrtspclient easydarwin rtsp-player rtsp-relay describe-setup-play

easyrtspclient's Introduction

EasyRTSPClient v3.0

EasyRTSPClient是TSINGSEE青犀开放平台开发和提供的一套非常稳定、易用、支持重连的RTSPClient组件,帮助用户非常简单地处理整个RTSP OPTIONS/DESCRIBE/SETUP/PLAY的复杂流程,担心内存释放的问题了,EasyRTSPClient全平台支持(包括Windows/Linux 32&64,ARM各种平台,Android,iOS),是技术研发快速迭代的工具,也是安防运维人员进行现场问题排查的得力帮手!

EasyRTSPClient在适应新形式下的4G、5G网络环境,以及阿里、腾讯广泛推行的ipv6化网络环境上,EasyRTSPClient同时兼容支持了ipv4 & ipv6网络环境。

EasyRTSPClient已经成功应用在RTSP播放器EasyPlayer、行业视频接入网关EasyRTSPLive多款产品中,适用于各种安防直播、行业直播、专业设备互联网直播等多种应用场景;

项目依赖

EasyRTSPClient项目依赖1个TSINGSEE青犀开放平台的Git工程:

目录结构为:

/
/Include/
/EasyRTSPClient/

编译与运行

  • EasyRTSPClient:以RTSPClient的形式,从RTSP URL将音视频获取到本地;

    Windows编译方法,

      Visual Studio 2010 编译:./EasyRTSPClient-master/win/EasyRTSPClient.sln
    

    Linux编译方法,

      chmod +x ./Buildit
      ./Buildit
    

    Usage,

      --------------------------------------------------------------
      EasyRTSPClient.exe -d <rtsp-url>[ -m <transport-mode> -s <save-file>]
      Help Mode:   EasyRTSPClient.exe -h
      rtsp-url : source rtsp address
      transport-mode : tcp or udp, default is tcp
      save-file : yes or no, default is yes
      For example: EasyRTSPClient.exe -d rtsp://admin:[email protected]/11 -m tcp -s yes
      --------------------------------------------------------------
    
  • EasyPlayer-RTSP调用:EasyPlayer-RTSP是由TSINGSEE青犀开放平台团队开发和维护的一个RTSP播放器项目,目前支持Windows(支持多窗口、包含ActiveX,npAPI Web插件)、Android平台,iOS平台,EasyRTSPClient作为其RTSP/RTP部分组件,为EasyPlayer-RTSP提供稳定可靠、高兼容性的数据连接,EasyPlayer-RTSP项目地址:https://github.com/tsingsee/EasyPlayer-RTSP

  • EasyRTSPLive中间件:RTSP转RTMP中间件服务,拉流IPC摄像机或者NVR硬盘录像机RTSP流转成RTMP推送到阿里云CDN/腾讯云CDN/RTMP流媒体服务器,支持多路RTSP流同时拉取并以RTMP协议推送发布,EasyRTSPLive我们支持任何平台,包括但不限于Windows/Linux/Android/ARM,EasyRTSPLive项目地址:https://github.com/tsingsee/EasyRTSPLive

    支持平台芯片目录位置
    Windowsx86./Lib/
    Windowsx64./Lib/x64/
    Linuxx86./Lib/
    Linuxx64./Lib/x64/
    海思arm-hisiv100-linux./Lib/hisiv100/
    海思arm-hisiv200-linux./Lib/hisiv200/
    海思arm-hisiv300-linux./Lib/hisiv300/
    海思arm-hisiv400-linux./Lib/hisiv400/
    海思arm-hisiv500-linux./Lib/hisiv500/
    海思arm-hisiv600-linux./Lib/hisiv600/
    Androidarm/arm64/x86/x86_64/mips/mips_64arm/arm64/x86/x86_64/mips/mips_64
    iOSarm/arm64https://github.com/EasyDSS/EasyPlayer-RTSP-iOS
    邮件获取更多平台版本

调用流程

RTSPSourceCallBack数据回调说明

EasyRTSPClient可以回调出多种类型的数据:

#define EASY_SDK_VIDEO_FRAME_FLAG			/* 视频帧数据 */
#define EASY_SDK_AUDIO_FRAME_FLAG			/* 音频帧数据 */
#define EASY_SDK_EVENT_FRAME_FLAG			/* 事件帧数据 */
#define EASY_SDK_RTP_FRAME_FLAG				/* RTP帧数据 */
#define EASY_SDK_SDP_FRAME_FLAG				/* SDP帧数据 */
#define EASY_SDK_MEDIA_INFO_FLAG			/* 媒体类型数据 */

EASY_SDK_VIDEO_FRAME_FLAG数据可支持多种视频格式:

#define EASY_SDK_VIDEO_CODEC_H265			/* H265  */
#define EASY_SDK_VIDEO_CODEC_H264			/* H264  */
#define	EASY_SDK_VIDEO_CODEC_MJPEG			/* MJPEG */
#define	EASY_SDK_VIDEO_CODEC_MPEG4			/* MPEG4 */

视频帧标识支持

#define EASY_SDK_VIDEO_FRAME_I				/* I帧 */
#define EASY_SDK_VIDEO_FRAME_P				/* P帧 */
#define EASY_SDK_VIDEO_FRAME_B				/* B帧 */
#define EASY_SDK_VIDEO_FRAME_J				/* JPEG */

当回调出RTSP_FRAME_INFO->codec为EASY_SDK_VIDEO_CODEC_H264数据,RTSP_FRAME_INFO->type为EASY_SDK_VIDEO_FRAME_I关键帧时,我们输出的数据结构为SPS+PPS+I的组合

	|---------sps---------|-------pps-------|---------------I Frame---------------|
	|                     |                 |                                     |
	0-----------------reserved1---------reserved2-------------------------------length

EASY_SDK_AUDIO_FRAME_FLAG数据可支持多种音频格式:

#define EASY_SDK_AUDIO_CODEC_AAC			/* AAC */
#define EASY_SDK_AUDIO_CODEC_G711A			/* G711 alaw*/
#define EASY_SDK_AUDIO_CODEC_G711U			/* G711 ulaw*/
#define EASY_SDK_AUDIO_CODEC_G726			/* G726 */

更多流媒体音视频资源

EasyDarwin开源流媒体服务器:www.EasyDarwin.org

EasyDSS高性能互联网直播服务:www.EasyDSS.com

EasyNVR安防视频可视化服务:www.EasyNVR.com

EasyNVS视频综合管理平台:www.EasyNVS.com

EasyNTS云组网:www.EasyNTS.com

EasyGBS国标GB/T28181服务器:www.EasyGBS.com

EasyRTS应急指挥平台:www.EasyRTS.com

TSINGSEE青犀开放平台:open.TSINGSEE.com

Copyright © TSINGSEE.com Team 2012-2020

青犀TSINGSEE

easyrtspclient's People

Contributors

babosa avatar caiyingyong avatar jinlong0813 avatar tracy-tang avatar tsingsee-seven avatar wellsen avatar xcyle-gh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyrtspclient's Issues

./Buildit x64 error

nbproject/Makefile-x64.mk:84: .dep.inc: No such file or directory
"make" -f nbproject/Makefile-x64.mk x64/easyrtspclient
make[1]: Entering directory /home/zhangyl/EasyRTSPClient-3.0.19.0415' mkdir -p build/x64/GNU-Linux rm -f "build/x64/GNU-Linux/main.o.d" g++ -m64 -c -O2 -IInclude -MMD -MP -MF "build/x64/GNU-Linux/main.o.d" -o build/x64/GNU-Linux/main.o main.cpp In file included from main.cpp:10:0: Include/EasyRTSPClientAPI.h:10:23: fatal error: EasyTypes.h: No such file or directory #include "EasyTypes.h" ^ compilation terminated. make[1]: *** [build/x64/GNU-Linux/main.o] Error 1 make[1]: Leaving directory /home/zhangyl/EasyRTSPClient-3.0.19.0415'
make: *** [.build-conf] Error 2

How to get key?

Hi
How to get key "1F7A71441EC837799152DB76E2C38022"??

mStreamRender = new EasyRTSPClient(this, "1F7A71441EC837799152DB76E2C38022", surface, mResultReceiver);

How to disable run time log ?

How to disable the following run time log ?

EasyRTSPClient SDK****
/* Platform: Windows /
/
Process Name[18]: EasyRTSPClient.exe /
/
Coding Time: 2016-04-12 10:00:00 /
/
Start Time: 2017-09-01 08:00:00 /
/
Validity Time Left: 00000450 day(s) */


Opening connection to 192.168.0.154, port 554...
20180608 094224 channel[1] Connecting...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.0.154 RTSP/1.0
CSeq: 2
User-Agent: EasyRTSPClient v2.0.18.0101 (RTSPClient v2016.05.20)

Received 137 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: 8 Jun 2018 08:43:16 GMT
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

Sending request: DESCRIBE rtsp://192.168.0.154 RTSP/1.0
CSeq: 3
User-Agent: EasyRTSPClient v2.0.18.0101 (RTSPClient v2016.05.20)
...

音频支持BitPerSample输出

@gavin1010 在MediaInfo中输出音频数据格式中,需要输出BitPerSample参数;
unsigned int sample_rate; /* 音频采样率 /
unsigned int channels; /
音频声道数 */

使用rtspclient读取rtsp流中时间戳突变的问题

您好,我在使用rtspclient的过程中发现了一个很奇怪的问题,想请教一下应该怎么解决?
我使用easyrtspclient这个so去解析easypusher推到easydarwin上的rtsp流,打印每一帧视频帧的时间戳,发现一旦递增到了一定的值,时间戳就会发生突变,然后继续递增。我打印出来的日志如下:在22:30:45时候,时间戳发生了变化
22:30:44 [ 2993:BAS] the timestamp is:1569335444781
22:30:44 [ 2993:BAS] the timestamp is:1569335444859
22:30:44 [ 2993:BAS] the timestamp is:1569335444962
22:30:44 [ 2993:BAS] the timestamp is:1569335444999
22:30:44 [ 2993:BAS] the timestamp is:1569335445067
22:30:44 [ 2993:BAS] the timestamp is:1569335445153
22:30:44 [ 2993:BAS] the timestamp is:1569335445200
22:30:45 [ 2993:BAS] the timestamp is:1569335445275
22:30:45 [ 2993:BAS] the timestamp is:1569335445353
22:30:45 [ 2993:BAS] the timestamp is:1569335445414
22:30:45 [ 2993:BAS] the timestamp is:1569335445493
22:30:45 [ 2993:BAS] the timestamp is:1569318668356
22:30:45 [ 2993:BAS] the timestamp is:1569318668404
22:30:45 [ 2993:BAS] the timestamp is:1569318668479
22:30:45 [ 2993:BAS] the timestamp is:1569318668572
22:30:45 [ 2993:BAS] the timestamp is:1569318668615
22:30:45 [ 2993:BAS] the timestamp is:1569318668688
22:30:45 [ 2993:BAS] the timestamp is:1569318668770
22:30:45 [ 2993:BAS] the timestamp is:1569318668832
22:30:45 [ 2993:BAS] the timestamp is:1569318668902
22:30:45 [ 2993:BAS] the timestamp is:1569318668979
想请问一下这是怎么造成的,应该怎么解决呢?

callback 函数不能支持多路并发的处理

目前的Callback没有提供返回用户指定的context作为参数并通过callabck回传:

希望改进一下,比如:

typedef int (Easy_APICALL *RTSPSourceCallBack)( int _channelId, void *_channelPtr, void *arg, int _frameType, char pBuf, EASY_FRAME_INFO _frameInfo);

Easy_API int Easy_APICALL EasyRTSP_SetCallback(Easy_Handle handle, RTSPSourceCallBack _callback, void *arg);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.