fyhertz / libstreaming-examples

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

Example 3 Not Working #2

Open AndroidSPtech opened 10 years ago

AndroidSPtech commented 10 years ago

hi fyhertz

I follow all steps what you have mention here : https://github.com/fyhertz/libstreaming/wiki/Using-libstreaming-with-Wowza-Media-Server#wiki-goal

and i am using latest code which you updated 4 days ago.

But still i m getting same error which nikita2k facing and mention

i also check well and make both stream same and also my device successfully ping with wowza ip address, so i am not getting connection related problem

So please help me to solve this problem. is there any other way or example to send video stream from android camera to wowza server ??

fyhertz commented 10 years ago

Hi,

Is the example 3 streaming to wowza properly ?? (the start button should become a stop button when everything works properly)

If the start button stays disabled forever, try to remove the "\r\n" at the end of the function addHeaders() in the RtspClient.java, compile and try again ! There is a weird bug and on some wowza server won't reply to the RTSP client of libstreaming unless there is only one \r\n even though there should be two.

I'm working on it; but I haven't found a solution yet

Regards, Simon

egfconnor commented 10 years ago

I get the error even if changing the last line in RtspClient.java.

My addheaders() method: private String addHeaders() { return "CSeq: " + (++mCSeq) + "\r\n" + "Content-Length: 0\r\n" + "Session: " + mSessionID + "\r\n" + (mAuthorization != null ? "Authorization: " + mAuthorization + "":""); }

Running Wowza on Windows 8 and Android device is a Nexus 5. Any help?

My logcat: 01-19 21:03:21.270: D/MP4Config(18564): SPS: Z0KADORAoP0A2hQmoA== 01-19 21:03:21.270: D/MP4Config(18564): PPS: aM44gA== 01-19 21:03:21.270: I/RtspClient(18564): ANNOUNCE rtsp://192.168.0.11:1935/live/test.stream RTSP/1.0 01-19 21:03:26.340: E/MainActivity(18564): Connection lost 01-19 21:03:26.340: W/System.err(18564): java.net.SocketException: Connection lost 01-19 21:03:26.350: W/System.err(18564): at net.majorkernelpanic.streaming.rtsp.RtspClient$Response.parseResponse(RtspClient.java:353) 01-19 21:03:26.350: W/System.err(18564): at net.majorkernelpanic.streaming.rtsp.RtspClient.sendRequestAnnounce(RtspClient.java:191) 01-19 21:03:26.350: W/System.err(18564): at net.majorkernelpanic.streaming.rtsp.RtspClient.startStream(RtspClient.java:143) 01-19 21:03:26.350: W/System.err(18564): at net.majorkernelpanic.example3.MainActivity$ToggleStreamAsyncTask.doInBackground(MainActivity.java:279) 01-19 21:03:26.350: W/System.err(18564): at net.majorkernelpanic.example3.MainActivity$ToggleStreamAsyncTask.doInBackground(MainActivity.java:1) 01-19 21:03:26.350: W/System.err(18564): at android.os.AsyncTask$2.call(AsyncTask.java:288) 01-19 21:03:26.350: W/System.err(18564): at java.util.concurrent.FutureTask.run(FutureTask.java:237) 01-19 21:03:26.350: W/System.err(18564): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 01-19 21:03:26.350: W/System.err(18564): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 01-19 21:03:26.350: W/System.err(18564): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 01-19 21:03:26.350: W/System.err(18564): at java.lang.Thread.run(Thread.java:841) 01-19 21:03:29.670: D/VideoStream(18564): Surface destroyed ! 01-19 21:03:29.670: I/RtspClient(18564): TEARDOWN rtsp://192.168.0.11:1935/live/test.stream RTSP/1.0 01-19 21:03:29.700: W/IInputConnectionWrapper(18564): showStatusIcon on inactive InputConnection

AdityaHariKishan commented 10 years ago

Hi Fyhertz

Thanks for making this great media streaming application, the application example 3 working fine in all desktop browsers the stream coming is perfect and facing issue in while the stream opening in mobile or handset browsers I am unable to see anything can you say why it happening so and how can i fix this issue

Thanks in Advance Aditya

khurramengr commented 9 years ago

@fyhertz, @AndroidSPtech , @egfconnor , @AdityaHariKishan i m also facing this issue, after pressing the start button it keeps saying "Start" and get disabled, also onSessionStarted() never gets called. I've also tried removing "\r\n" at the end of the function addHeaders() but it doesn't work either. Can you please guide me further??? I am streaming to locally installed Wowza streaming engine.