fyhertz / libstreaming-examples

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

Stream Example 2 to VLC #38

Open gbmaniac opened 7 years ago

gbmaniac commented 7 years ago

According to what I read, you need the SDP file to play it but I can't find the session description from the log. I also don't know how to play the where to save the SDP file nor how to play it using VLC. Could someone help me?

SSSANTON commented 7 years ago

Same question:how to make it play on VLC player.

SSSANTON commented 7 years ago

Example 1 can send the camera stream to the VLC player and play it!

stackved commented 6 years ago

@SSSANTON Example 1 is working for me, however, when i try to connect to the phone while on LTE cellular data, the VLC throws an error saying:

Connection failed VLC could not connect to "100.116.30.122:1234".

So, this has forced me to look into Example 2. And I am facing similar problem here as raised by @gbmaniac

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!!!

vikramkapoor commented 3 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!!!

I tried this method but I don't see any output on the VLC player. The camera starts streaming but nothing displays on VLC