Ansersion / myRtspClient

A RTSP client based on jrtplib
Apache License 2.0
162 stars 92 forks source link

When my rtsp server adds audio, the complete_example program error #25

Open cafecai opened 5 years ago

cafecai commented 5 years ago

When my rtsp server adds audio, the complete_example program error. VLC media player connects to rtsp server, it can play video and audio normally

/mnt/myRtspClient/example # ./complete_example rtsp://192.168.1.21/live.sdp Start play rtsp://192.168.1.21/live.sdp Then put video data into test_packet_recv.h264 RTSP/1.0 200 OK CSeq: 1 Date: Thu Jan 1 08:01:26 1970 Public: OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN Server: rtsp_demo

[Client.GetResponse().c_str()]RTSP/1.0 200 OK CSeq: 2 Date: Thu Jan 1 08:01:26 1970 Server: rtsp_demo Content-Type: application/sdp Content-Length: 416

v=0 o=- 0 0 IN IP4 0.0.0.0 s=rtsp_demo t=0 0 a=control:rtsp://192.168.1.21/live.sdp a=range:npt=0- m=video 0 RTP/AVP 96 c=IN IP4 0.0.0.0 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;sprop-parameter-sets=Z0IAKp2oHgCJ+WbgICAgQA==,aM48gA== a=control:rtsp://192.168.1.21/live.sdp/track1 m=audio 0 RTP/AVP 97 c=IN IP4 0.0.0.0 a=rtpmap:97 PCMA/48000/1 a=control:rtsp://192.168.1.21/live.sdp/track2

debug: mt=video,line=rtpmap:96 H264/90000 debug: mt=video,line=fmtp:96 packetization-mode=1;sprop-parameter-sets=Z0IAKp2oHgCJ+WbgICAgQA==,aM48gA== debug: mt=video,line=control:rtsp://192.168.1.21/live.sdp/track1 debug: mt=audio,line=rtpmap:97 PCMA/48000/1 debug: mt=audio,line=control:rtsp://192.168.1.21/live.sdp/track2 MyRTP_SetUp TCP: 0 Setup Session audio: MyRtsp: Success MyRTP_SetUp TCP: 0 Setup Session video: MyRtsp: Success RTSP/1.0 454 Session Not Found CSeq: 4 Date: Thu Jan 1 08:01:26 1970 Server: rtsp_demo

DoSETUP error

Ansersion commented 5 years ago

I'm so sorry that the 'PCMA' is not supported yet. m=audio 0 RTP/AVP 97 c=IN IP4 0.0.0.0 a=rtpmap:97 PCMA/48000/1 a=control:rtsp://192.168.1.21/live.sdp/track2

cafecai commented 5 years ago

What audio formats are supported?

Ansersion commented 5 years ago

The audio formats supported as follow: MPA g711(mu-law)