4943
- 收藏
- 点赞
- 分享
- 举报
在论坛上找的一份rtsp server源码,通过vlc可以播放,但是用3536来解码就不行了。
本帖最后由 Joey 于 2017-6-5 09:09 编辑
用3536解码时,rtsp会话时,当3536 client发出play之后,server这边开始发送rtp包,但是接着3536 client这边发送“TEARDOWN”的命令请求关掉rtsp会话(这个过程是没人对3536进行操作的,但是不知道为什么3536要发出teardown的命令)
rtsp会话过程具体如下:
[code]/mnt/mpp/test # ./rtsp_rtcp_rtp-v.0
size of 2EnPayLoad=1
RTSP server START
hostname is: (none)
rtsp listening port is: 554
Input rtsp://hostIP:554/test.264 to play this
listen for client connecting...
The pthread schedule_do start
c) cbr.
please press twice ENTER to exit this sample
AddClient, 128
Incoming RTSP connection accepted on socket: 12
EventLoop Connection reached: 3
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is init state
current method code is: 3
OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
(Send to client:)
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER,SET_PARAMETER
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 108
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER,SET_PARAMETER
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:DESCRIBE rtsp://192.168.10.210:554/sub RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: Lavf57.25.100
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is init state
current method code is: 0
server:192.168.10.210
port:-1093179766
GetSdpDescr,663===>psp.base64profileid=42002A,psp.base64sps=Z0IAKpWoHgCJ+WbgICAgQA==,psp.base64pps=aM48gA==
(Send to client:)
RTSP/1.0 200 OK
CSeq: 2
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Content-Type: application/sdp
Content-Base: rtsp://192.168.10.210/sub/
Content-Length: 464
v=0
o=-2208992768 2208992768 IN IP4 192.168.10.210
s=sub
i=sub
t=0 0
a=tool:Zyqhziee Streaming Media v2015.11.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:H.264 Video, streamed by the Zyqhziee Media Server
a=x-qt-text-inf:test.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpWoHgCJ+WbgICAgQA==,aM48gA==
a=control:track1
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 646
RTSP/1.0 200 OK
CSeq: 2
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Content-Type: application/sdp
Content-Base: rtsp://192.168.10.210/sub/
Content-Length: 464
v=0
o=-2208992768 2208992768 IN IP4 192.168.10.210
s=sub
i=sub
t=0 0
a=tool:Zyqhziee Streaming Media v2015.11.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:H.264 Video, streamed by the Zyqhziee Media Server
a=x-qt-text-inf:test.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpWoHgCJ+WbgICAgQA==,aM48gA==
a=control:track1
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:SETUP rtsp://192.168.10.210/sub/track1 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=12300-12301
CSeq: 3
User-Agent: Lavf57.25.100
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is init state
current method code is: 8
*** transport: RTP/AVP/UDP;unicast;client_port=12300-12301 ***
!!!!!!!!!!!!!!!!!!!!!!rtp create:addr:b10aa8c0,port:12300,localc0a80ad2
<><><><>success creat RTP<><><><>
<><><><>Creat RTP<><><><>
pstr=-12301
**adding a schedule object action ../src/rtsp/rtsputils.c,330**
(Send to client:)
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Transport: RTP/AVP;unicast;client_port=12300-12301;destination=192.168.10.177;source=192.168.10.210;server_port=57111-57112
TRANSFER TO READY STATE!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 229
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Transport: RTP/AVP;unicast;client_port=12300-12301;destination=192.168.10.177;source=192.168.10.210;server_port=57111-57112
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:PLAY rtsp://192.168.10.210/sub/ RTSP/1.0
Range: npt=0.000-
CSeq: 4
User-Agent: Lavf57.25.100
Session: 99893
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
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: 4
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Start Playing!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 104
RTSP/1.0 200 OK
CSeq: 4
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:TEARDOWN rtsp://192.168.10.210/sub/ RTSP/1.0
CSeq: 5
User-Agent: Lavf57.25.100
Session: 99893
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is play state
(Send to client:)
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
no user online now resetfifo
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 104
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
tcp_read, 1756
fd:12,RTSP connection closed by client.
first error,pRtsp is null
AddClient, 128
Incoming RTSP connection accepted on socket: 12
EventLoop Connection reached: 3
tcp_read, 1756
192.168.10.177 Port:60633
INPUT_BUFFER was:OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100
[/code]
用3536解码时,rtsp会话时,当3536 client发出play之后,server这边开始发送rtp包,但是接着3536 client这边发送“TEARDOWN”的命令请求关掉rtsp会话(这个过程是没人对3536进行操作的,但是不知道为什么3536要发出teardown的命令)
rtsp会话过程具体如下:
[code]/mnt/mpp/test # ./rtsp_rtcp_rtp-v.0
size of 2EnPayLoad=1
RTSP server START
hostname is: (none)
rtsp listening port is: 554
Input rtsp://hostIP:554/test.264 to play this
listen for client connecting...
The pthread schedule_do start
c) cbr.
please press twice ENTER to exit this sample
AddClient, 128
Incoming RTSP connection accepted on socket: 12
EventLoop Connection reached: 3
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is init state
current method code is: 3
OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
(Send to client:)
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER,SET_PARAMETER
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 108
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER,SET_PARAMETER
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:DESCRIBE rtsp://192.168.10.210:554/sub RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: Lavf57.25.100
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is init state
current method code is: 0
server:192.168.10.210
port:-1093179766
GetSdpDescr,663===>psp.base64profileid=42002A,psp.base64sps=Z0IAKpWoHgCJ+WbgICAgQA==,psp.base64pps=aM48gA==
(Send to client:)
RTSP/1.0 200 OK
CSeq: 2
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Content-Type: application/sdp
Content-Base: rtsp://192.168.10.210/sub/
Content-Length: 464
v=0
o=-2208992768 2208992768 IN IP4 192.168.10.210
s=sub
i=sub
t=0 0
a=tool:Zyqhziee Streaming Media v2015.11.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:H.264 Video, streamed by the Zyqhziee Media Server
a=x-qt-text-inf:test.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpWoHgCJ+WbgICAgQA==,aM48gA==
a=control:track1
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 646
RTSP/1.0 200 OK
CSeq: 2
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Content-Type: application/sdp
Content-Base: rtsp://192.168.10.210/sub/
Content-Length: 464
v=0
o=-2208992768 2208992768 IN IP4 192.168.10.210
s=sub
i=sub
t=0 0
a=tool:Zyqhziee Streaming Media v2015.11.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:H.264 Video, streamed by the Zyqhziee Media Server
a=x-qt-text-inf:test.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpWoHgCJ+WbgICAgQA==,aM48gA==
a=control:track1
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:SETUP rtsp://192.168.10.210/sub/track1 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=12300-12301
CSeq: 3
User-Agent: Lavf57.25.100
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is init state
current method code is: 8
*** transport: RTP/AVP/UDP;unicast;client_port=12300-12301 ***
!!!!!!!!!!!!!!!!!!!!!!rtp create:addr:b10aa8c0,port:12300,localc0a80ad2
<><><><>success creat RTP<><><><>
<><><><>Creat RTP<><><><>
pstr=-12301
**adding a schedule object action ../src/rtsp/rtsputils.c,330**
(Send to client:)
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Transport: RTP/AVP;unicast;client_port=12300-12301;destination=192.168.10.177;source=192.168.10.210;server_port=57111-57112
TRANSFER TO READY STATE!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 229
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Transport: RTP/AVP;unicast;client_port=12300-12301;destination=192.168.10.177;source=192.168.10.210;server_port=57111-57112
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:PLAY rtsp://192.168.10.210/sub/ RTSP/1.0
Range: npt=0.000-
CSeq: 4
User-Agent: Lavf57.25.100
Session: 99893
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
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: 4
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Start Playing!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 104
RTSP/1.0 200 OK
CSeq: 4
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:TEARDOWN rtsp://192.168.10.210/sub/ RTSP/1.0
CSeq: 5
User-Agent: Lavf57.25.100
Session: 99893
rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is play state
(Send to client:)
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
no user online now resetfifo
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 104
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
tcp_read, 1756
fd:12,RTSP connection closed by client.
first error,pRtsp is null
AddClient, 128
Incoming RTSP connection accepted on socket: 12
EventLoop Connection reached: 3
tcp_read, 1756
192.168.10.177 Port:60633
INPUT_BUFFER was:OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100
[/code]
我来回答
回答5个
时间排序
认可量排序
认可0
认可0
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2020-07-29 14:10:02
-
2019-01-17 10:56:55
-
2018-12-17 15:45:30
-
2019-12-12 10:52:09
-
2019-01-06 10:57:28
-
2019-12-16 17:01:04
-
2016-04-26 17:52:45
-
2018-11-30 09:04:18
-
2016-10-09 14:49:29
-
2021-05-25 17:28:23
-
2018-12-19 15:16:05
-
2015-12-09 10:52:34
-
2015-12-13 21:33:04
-
2016-06-01 18:15:34
-
2018-03-28 18:25:27
-
2019-01-21 09:20:14
-
2017-05-10 17:51:49
-
2019-01-14 14:26:11
-
2014-07-16 12:22:08
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5Hi3516CV610 如何使用SD卡升级固件
-
5cat /dev/logmpp 报错 <3>[ vi] [func]:vi_send_frame_node [line]:99 [info]:vi pic queue is full!
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认