fyhertz / libstreaming-examples

Some examples of how to use libstreaming
283 stars 231 forks source link

Custom RTSPServer on Example 2 #33

Open ririsrismawati opened 8 years ago

ririsrismawati commented 8 years ago

Hi there,

I want to ask about how to custom/create new RTSPServer on example 2. I have try custom RTSP Server on Example 2 but no luck.

Any feedback appreciated. Thank you

solocop commented 5 years ago

Example 2 is not need to use RTSP server. It created and sent a RTP package via internet and you can use a receiver to handle that packages.

HOW TO USE:

Install VLC on your computer. Run application and enter your IP computer which use to play stream to the edit text Start streaming by click to START on the screen. Copy file SDP file from logcat output of onSessionConfigured method and save as your_name.spd //Log.d(TAG, "SDP file: /n" + mSession.getSessionDescription()); like this

v=0 o=- 0 0 IN IP4 null s=Unnamed i=N/A c=IN IP4 192.168.99.103 t=0 0 a=recvonly m=audio 5004 RTP/AVP 96 a=rtpmap:96 mpeg4-generic/16000 a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1408; SizeLength=13; IndexLength=3; IndexDeltaLength=3; a=control:trackID=0 m=video 5006 RTP/AVP 96 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=42800d;sprop-parameter-sets=Z0KADdoFB+Q=,aM4NiA==; a=control:trackID=1

Open file by VLC: Open VLC -> Media -> Stream -> Add sdp file -> Play Good Luck!!!