hmmm i try open your url rtsp://strm-3.tr.medianova.tv/rkraltv/rkraltv with realplayer and with vlc and that stream is not available. Try u open stream in some player (on pc) before u test it on android?
r^ On 26 May 2011 08:37, Filiz Gökçe <sonsuzlu...@gmail.com> wrote: > Hi, > I try to make live stream on android, > I try lots of ways, but none of them doesnt work. > Could you help me ? > > > This is example of rtsp; > mMediaPlayer = new MediaPlayer(); > mMediaPlayer.setDataSource(KralStream.getTvStreamUrl().toString()); > mMediaPlayer.setDisplay(holder); > mMediaPlayer.prepareAsync(); > mMediaPlayer.setOnBufferingUpdateListener(this); > mMediaPlayer.setOnCompletionListener(this); > mMediaPlayer.setOnPreparedListener(this); > mMediaPlayer.setOnVideoSizeChangedListener(this); > mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); > mMediaPlayer.setLooping(true); > > Exeption :05-26 10:22:46.186: ERROR/MediaPlayerService(10157): create > PVPlayer > 05-26 10:23:06.382: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed > with an error or info -1 > 05-26 10:23:06.382: ERROR/MediaPlayer(23800): error (1, -1) > 05-26 10:23:06.382: ERROR/MediaPlayer(23800): Error (1,-1) > > rtsp; > VideoView videoView=(VideoView)findViewById(R.id.videoView1); > Uri uri = > Uri.parse("http://www.kraltv.com.tr/m/app_streaming_url.asp?t=5&g=DA245844BC6D4F9A8EFDD8F14D41676F"); > videoView.setVideoURI(uri); > videoView.start(); > > Gives message;"Sorry, this video connot ve played." > > > rtsp; > mPreview = (SurfaceView) findViewById(R.id.surface); > holder = mPreview.getHolder(); > holder.addCallback(this); > holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); > extras = getIntent().getExtras(); > public void play() { > > try { > Uri video = KralStream.getTvStreamUrl(); > Toast.makeText(this, video.toString(), > Toast.LENGTH_SHORT).show(); > mMediaPlayer = new MediaPlayer(); > mMediaPlayer.setDataSource(path); > mMediaPlayer.setDisplay(holder); > mMediaPlayer.prepare(); > mMediaPlayer.setOnBufferingUpdateListener(this); > mMediaPlayer.setOnCompletionListener(this); > mMediaPlayer.setOnPreparedListener(this); > mMediaPlayer.setOnVideoSizeChangedListener(this); > mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); > } catch (Exception e) { > Log.e(TAG, "error: " + e.getMessage(), e); > } > } > > Exeption ;05-26 10:36:57.589: ERROR/MediaPlayerService(10157): create > PVPlayer > 05-26 10:37:20.542: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed > with an error or info -1 > 05-26 10:37:20.542: ERROR/MediaPlayer(24240): error (1, -1) > 05-26 10:37:20.565: WARN/PlayerDriver(10157): PVMFInfoErrorHandlingComplete > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): error: Prepare failed.: > status=0x1 > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): java.io.IOException: > Prepare failed.: status=0x1 > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.media.MediaPlayer.prepare(Native Method) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > com.giantrabbit.nagare.KralTvNow.play(KralTvNow.java:162) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > com.giantrabbit.nagare.KralTvNow.surfaceCreated(KralTvNow.java:215) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.SurfaceView.updateWindow(SurfaceView.java:536) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewGroup.drawChild(ViewGroup.java:1638) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewGroup.drawChild(ViewGroup.java:1638) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.View.draw(View.java:6796) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.widget.FrameLayout.draw(FrameLayout.java:352) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewGroup.drawChild(ViewGroup.java:1640) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.View.draw(View.java:6796) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.widget.FrameLayout.draw(FrameLayout.java:352) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1894) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewRoot.draw(ViewRoot.java:1407) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewRoot.performTraversals(ViewRoot.java:1163) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.view.ViewRoot.handleMessage(ViewRoot.java:1727) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.os.Handler.dispatchMessage(Handler.java:99) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.os.Looper.loop(Looper.java:123) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > android.app.ActivityThread.main(ActivityThread.java:4627) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > java.lang.reflect.Method.invokeNative(Native Method) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > java.lang.reflect.Method.invoke(Method.java:521) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) > 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at > dalvik.system.NativeStart.main(Native Method) > 05-26 10:37:20.737: INFO/MediaPlayer(24240): Info (1,26) > 05-26 10:37:20.737: ERROR/MediaPlayer(24240): Error (1,-1) > 05-26 10:37:20.868: INFO/ActivityManager(10163): Displayed activity > com.giantrabbit.nagare/.KralTvNow: 25864 ms (total 25864 ms) > 05-26 10:37:23.777: WARN/PowerManagerService(10163): Timer 0x3->0x3|0x1 > > > This is example of http ; > > mMediaPlayer = new MediaPlayer(); > > mMediaPlayer.setDataSource("http://www.kraltv.com.tr/m/app_streaming_url.asp?t=5&g=DA245844BC6D4F9A8EFDD8F14D41676F"); > mMediaPlayer.setDisplay(holder); > mMediaPlayer.prepareAsync(); > mMediaPlayer.setOnBufferingUpdateListener(this); > mMediaPlayer.setOnCompletionListener(this); > mMediaPlayer.setOnPreparedListener(this); > mMediaPlayer.setOnVideoSizeChangedListener(this); > mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); > mMediaPlayer.setLooping(true); > Exeption: > 05-26 10:16:24.276: ERROR/MediaPlayerService(10157): create PVPlayer > 05-26 10:16:24.292: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferWriteDataStreamImpl > 05-26 10:16:24.346: INFO/PlayerDriver(10157): buffering (100) > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of > PVMFMemoryBufferReadDataStreamImpl > 05-26 10:16:24.350: WARN/MediaPlayer(23736): info/warning (1, 26) > 05-26 10:16:24.354: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed > with an error or info -10 > 05-26 10:16:24.354: ERROR/MediaPlayer(23736): error (-10, -10) > 05-26 10:16:24.354: WARN/PlayerDriver(10157): PVMFInfoErrorHandlingComplete > 05-26 10:16:24.393: INFO/MediaPlayer(23736): Info (1,26) > 05-26 10:16:24.393: ERROR/MediaPlayer(23736): Error (-10,-10) > > > Htttp; > VideoView videoView=(VideoView)findViewById(R.id.videoView1); > Uri uri = > Uri.parse("http://www.kraltv.com.tr/m/app_streaming_url.asp?t=5&g=DA245844BC6D4F9A8EFDD8F14D41676F"); > videoView.setVideoURI(uri); > videoView.start(); > > Gives message;"Sorry, this video connot ve played." > > > Filiz Gökçe > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en