cc966358

cc966358

0个粉丝

7

问答

0

专栏

7

资料

cc966358  发布于  2016-06-18 17:47:51
采纳率 0%
7个问答
18781

付费购买的一分rtsp server代码

   
价格不是很贵,看了下写的一般,效率也比较低下,不过可以学习下rtsp的 流程。

验证过可用,在海思平台上要根据不同的AD稍作修改
易百纳技术社区文件: rtsp code.rar
下载
我来回答
回答52个
时间排序
认可量排序

goodman

2个粉丝

30

问答

18

专栏

17

资料

goodman 2016-06-18 18:33:05
认可0
这个代码真一般,不知道买了多少米的

ngswfx

1个粉丝

55

问答

1

专栏

40

资料

ngswfx 2016-06-18 22:18:42
认可0
本帖最后由 ngswfx 于 2016-6-20 08:46 编辑

这几天,我正在看我自己的rtsp server ,是以前从网上找的,功能很强大,可惜看得我云里雾里的,好不容易改成支持多通道了.

你这个到相对简单些,就是结构层次比较单一,揉到一块了.

看着像网上几百块钱的IPC板子自带的那种代码. rtspServer独立封装成lib就好测试了.

//看了一下代码,测了一下,能用
//数据传输部分,用的UDP
//VLC可以连接上. 代码里默认通道0发送数据,3520D代码.
//结实程度一般

roomtt

0个粉丝

5

问答

0

专栏

1

资料

roomtt 2016-07-07 21:26:59
认可0
下载来看看:lol

艾编程的鲁小班

18个粉丝

25

问答

17

专栏

32

资料

艾编程的鲁小班 2016-07-08 13:49:27
认可0
没有3520D,不知道3516A能用不?

ngswfx

1个粉丝

55

问答

1

专栏

40

资料

ngswfx 2016-07-10 14:58:47
认可0
本帖最后由 ngswfx 于 2016-7-11 13:43 编辑

[quote][url=forum.php?mod=redirect&goto=findpost&pid=33505&ptid=11648]wfjdemmye 发表于 2016-7-8 13:49[/url]
没有3520D,不知道3516A能用不?[/quote]

用没问题,主要是不好用,呵呵:lol


我给他封装了一下,代码更乱了,就一个cpp,一个头文件。但接口简单了。:lol ,测试容易些
//就3个函数,编码数据直接往里面扔就可以了
最适合往海斯3520D这种SDK sample Demo里面放了。
///////////////
int IVHIRtspServerLite_Init(int nPort);
int IVHIRtspServerInputStreamDate(void *pstStream);
int IVHIRtspServerLite_DeInit();

艾编程的鲁小班

18个粉丝

25

问答

17

专栏

32

资料

艾编程的鲁小班 2016-07-11 11:25:45
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=33633&ptid=11648]ngswfx 发表于 2016-7-10 14:58[/url]
用没问题,主要是不好用,呵呵


[/quote]

:handshake太爱你了,终于看到RTP怎么组包了

艾编程的鲁小班

18个粉丝

25

问答

17

专栏

32

资料

艾编程的鲁小班 2016-07-13 14:39:49
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=33633&ptid=11648]ngswfx 发表于 2016-7-10 14:58[/url]
用没问题,主要是不好用,呵呵


[/quote]

不知道为什么我把这个跟venc编译到一起,venc只有一个通道0输出H264,VLC怎么放不出来。。。

rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  ready state
current method code is:5
        +++++++++++++++++++++
        start to play 0 now!
        +++++++++++++++++++++
(Send to client:)
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 03:42:03 GMT
Session: 177740


        Start Playing!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
192.168.2.111 Port:52485
INPUT_BUFFER was:TEARDOWN [url]rtsp://192.168.2.10/test.264/[/url] RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 177740


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  play state
(Send to client:)
RTSP/1.0 200 OK
CSeq: 6
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 03:42:14 GMT
Session: 177740


no user online now resetfifo
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
AddClient, 1308
Incoming RTSP connection accepted on socket: 20
EventLoop Connection reached: 4
fd:22,RTSP connection closed by client.
first error,pRtsp is null
192.168.2.111 Port:52486
INPUT_BUFFER was:OPTIONS [url]rtsp://192.168.2.10:9528/test.264[/url] RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  init state
current method code is:  3  
OPTIONS [url]rtsp://192.168.2.10:9528/test.264[/url] RTSP/1.0
(Send to client:)
RTSP/1.0 200 OK
CSeq: 2
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN


leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
192.168.2.111 Port:52486
INPUT_BUFFER was:DESCRIBE [url]rtsp://192.168.2.10:9528/test.264[/url] RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Accept: application/sdp


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  init state
current method code is:  0  
server:192.168.2.10
port:-1240479502


GetSdpDescr,1731===>psp.base64profileid=,psp.base64sps=,psp.base64pps=

(Send to client:)
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 03:42:18 GMT
Content-Type: application/sdp
Content-Base: [url]rtsp://192.168.2.10/test.264/[/url]
Content-Length: 264

v=0
o=-2209001984 2209001984 IN IP4 192.168.2.10
s=Unnamed
i=N/A
c=IN IP4 192.168.2.111
t=0 0
a=recvonly
m=video 5004 RTP/AVP 96
b=RR:0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=;sprop-parameter-sets=,;
a=control:trackID=0

leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
192.168.2.111 Port:52486
INPUT_BUFFER was:SETUP [url]rtsp://192.168.2.10/test.264/trackID=0[/url] RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  init state
current method code is:  8  
*** transport: RTP/AVP/TCP;unicast;interleaved=0-1 ***
pstr=/TCP;unicast;interleaved=0-1
AAAAAAAAAAA Unsupported Transport,/home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,2046
(Send to client:)
RTSP/1.0 461 Unsupported transport
CSeq: 4


TRANSFER TO READY STATE!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
192.168.2.111 Port:52486
INPUT_BUFFER was:SETUP [url]rtsp://192.168.2.10/test.264/trackID=0[/url] RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Transport: RTP/AVP;unicast;client_port=5004-5005


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  ready state
current method code is:8
*** transport: RTP/AVP;unicast;client_port=5004-5005 ***
<><><><>success creat RTP<><><><>
<><><><>Creat RTP<><><><>
pstr=-5005
**adding a schedule object action /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,1079**
(Send to client:)
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 03:42:22 GMT
Session: 3872
Transport: RTP/AVP;unicast;client_port=5004-5005;destination=192.168.245.65;source=192.168.245.96;server_port=5004-5005


leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
192.168.2.111 Port:52486
INPUT_BUFFER was:PLAY [url]rtsp://192.168.2.10/test.264/[/url] RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 3872
Range: npt=0.000-


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  ready state
current method code is:5
        +++++++++++++++++++++
        start to play 0 now!
        +++++++++++++++++++++
PLAY: already playing
(Send to client:)
RTSP/1.0 200 OK
CSeq: 6
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 03:42:24 GMT
Session: 3872


        Start Playing!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
192.168.2.111 Port:52486
INPUT_BUFFER was:TEARDOWN [url]rtsp://192.168.2.10/test.264/[/url] RTSP/1.0
CSeq: 7
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 3872


rtsp_tracepoint: /home/tucsen/hi3516d-imx185/mpp/sample/venc/../common/IVHIRtspServerLiteSDK.c,RTSP_state_machine,2287
state_machine:current state is  play state
(Send to client:)
RTSP/1.0 200 OK
CSeq: 7
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 03:42:34 GMT
Session: 3872


leaving rtsp_state_machine!
exit Rtsp_state_machine
4
5
fd:20,RTSP connection closed by client.
first error,pRtsp is null

ngswfx

1个粉丝

55

问答

1

专栏

40

资料

ngswfx 2016-07-13 15:21:21
认可0
本帖最后由 ngswfx 于 2016-7-13 17:58 编辑

[quote][url=forum.php?mod=redirect&goto=findpost&pid=33887&ptid=11648]wfjdemmye 发表于 2016-7-13 14:39[/url]
不知道为什么我把这个跟venc编译到一起,venc只有一个通道0输出H264,VLC怎么放不出来。。。

rtsp_tra ...[/quote]

hi3516d 和3520D,编码后的那个流的结构可能不一样,你看一下源码,如果void *pstStream内部结构VENC_STREAM_S不同,修改一下即可,搞定了放上来,写明3518版本。

/////3518
typedef struct hiVENC_STREAM_S
{
    VENC_PACK_S *pstPack;                           /*stream pack attribute*/
    HI_U32      u32PackCount;                       /*the pack number of one frame stream*/
    HI_U32      u32Seq;                             /*the list number of stream*/

    union
    {
        VENC_STREAM_INFO_H264_S  stH264Info;         /*the stream info of h264*/
        VENC_STREAM_INFO_JPEG_S  stJpegInfo;         /*the stream info of jpeg*/
        VENC_STREAM_INFO_MPEG4_S stMpeg4Info;       /*the stream info of mpeg4*/
        VENC_STREAM_INFO_H265_S  stH265Info;        /*the stream info of h265*/
    };
}VENC_STREAM_S;   //3518

//////////////////源码中用的是3520的VENC_STREAM_S:

typedef struct hiVENC_STREAM_S
{
    VENC_PACK_S *pstPack;       /*stream pack attribute*/
    HI_U32      u32PackCount;   /*the pack number of one frame stream*/
    HI_U32      u32Seq;         /*the list number of stream*/

    union
    {
        VENC_STREAM_INFO_H264_S stH264Info;   /*the stream info of h264*/
        VENC_STREAM_INFO_JPEG_S stJpegInfo;   /*the stream info of jpeg*/
        VENC_STREAM_INFO_MPEG4_S stMpeg4Info; /*the stream info of mpeg4*/
    };
}VENC_STREAM_S;   //3520

如果内部的子结构还不一样,也修改了吧,例如VENC_STREAM_INFO_H264_S等
////////////这2个结构不一样,修改一下源码

艾编程的鲁小班

18个粉丝

25

问答

17

专栏

32

资料

艾编程的鲁小班 2016-07-14 13:59:41
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=33896&ptid=11648]ngswfx 发表于 2016-7-13 15:21[/url]
hi3516d 和3520D,编码后的那个流的结构可能不一样,你看一下源码,如果void *pstStream内部结构VENC_S ...[/quote]

仔细找了一下,里面好多结构都有点变。。。

ngswfx

1个粉丝

55

问答

1

专栏

40

资料

ngswfx 2016-07-14 14:03:07
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=33971&ptid=11648]wfjdemmye 发表于 2016-7-14 13:59[/url]
仔细找了一下,里面好多结构都有点变。。。[/quote]

内部主要就是得到码流信息,主要沿着VENC_STREAM_S结构进行修改即可。

/////////////估计会有2-4个结构发生变化。

艾编程的鲁小班

18个粉丝

25

问答

17

专栏

32

资料

艾编程的鲁小班 2016-07-14 15:48:35
认可0
大神,跑起来了,但是感觉延迟很厉害,我的sizeof(venc_stream_s)=64

9crk

1个粉丝

34

问答

0

专栏

6

资料

9crk 2016-07-29 17:09:24
认可0
本帖最后由 9crk 于 2016-7-29 17:14 编辑

我看到了
<><><><>success creat RTP<><><><>
<><><><>Creat RTP<><><><>
这是来自github上的rtp打包工具……我也在用:lol

tango_zhu

14个粉丝

14

问答

0

专栏

3

资料

tango_zhu 2016-09-12 23:15:57
认可0
mark 下等待好架构

2272943826

0个粉丝

24

问答

0

专栏

8

资料

2272943826 2016-09-21 14:36:28
认可0
楼主,下载完啦, 该如何使用,有具体的思路或者步骤吗? 谢谢

zcc246

0个粉丝

1

问答

0

专栏

0

资料

zcc246 2016-09-22 09:04:05
认可0
我用了这个例子 发现报错HI_MPI_VENC_CreateChn [0] faild with 0xa0078010!  Start Venc failed!  不知道怎么解决了

lwh1119

0个粉丝

0

问答

0

专栏

0

资料

lwh1119 2016-10-19 22:03:52
认可0
下载来看看!!!!

SimonJi2016

0个粉丝

2

问答

0

专栏

0

资料

SimonJi2016 2016-11-01 13:57:48
认可0
[img]C:\2.png[/img]

SimonJi2016

0个粉丝

2

问答

0

专栏

0

资料

SimonJi2016 2016-11-01 13:59:29
认可0
各位好,提供的例程运行后不能成功运行。得到的hostname是(none),不知道是不是这个问题呢?

11yichengming

1个粉丝

9

问答

0

专栏

0

资料

11yichengming 2016-12-28 20:21:21
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=33972&ptid=11648]ngswfx 发表于 2016-7-14 14:03[/url]
内部主要就是得到码流信息,主要沿着VENC_STREAM_S结构进行修改即可。

/////////////估计会有2-4个结 ...[/quote]

请问下实现多通道的rtsp server ,是有多个rtsp服务器地址吗?这里有点不是很明白

chenjibin

0个粉丝

29

问答

0

专栏

1

资料

chenjibin 2016-12-29 13:51:45
认可0
我有一份rtsp server的源码,效率高,纯C写的,在3516 3518上都是用过,有人想要买吗,发个红包给我就可以!
加载中···
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区