LibRtmp-Client-for-Android icon indicating copy to clipboard operation
LibRtmp-Client-for-Android copied to clipboard

RTMP throws fatal exception

Open LloydBlv opened this issue 8 years ago • 10 comments

While playing RTMP stream this weird exception happens, And gives no clue about why its happening:

E/ExoPlayerImplInternal: Source error. net.butterflytv.rtmp_client.RtmpClient$RtmpIOException at net.butterflytv.rtmp_client.RtmpClient.open(RtmpClient.java:53) at com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.open(RtmpDataSource.java:57) at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:137) at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:692) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) 08-26 22:40:08.186 7769-9587/com.myapp A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xf88e3c8c in tid 9587 (Loader:Extracto)

Please help!

LloydBlv avatar Aug 27 '17 06:08 LloydBlv

Please check out the RTMPIOException errorcode

Can I test the rtmp url?

mekya avatar Aug 27 '17 14:08 mekya

@mekya Thanks for your response, the url is generated dynamically, so I cant share, I looked at the url you mentioned, Is there anyway to prevent the app from crash and show a proper error message?

LloydBlv avatar Aug 28 '17 10:08 LloydBlv

Yeah sure, have you tried to catch the RTMPIOException with try-catch block and show an appropriate message?

mekya avatar Aug 30 '17 12:08 mekya

The app doesn't crash when this error occurs. It's already caught by ExoPlayer internally, and propagated to the player's event listener (which gives you a handy point where you can show an appropriate error message).

If your app is crashing, it's not directly related to the logging at the top of this thread. You'd need to provide a more complete log or bug report.

ojw28 avatar Sep 04 '17 23:09 ojw28

I have also a similar issue you can find the bug detail in https://github.com/google/ExoPlayer/issues/3156

Rtmp Client also dies

keremkusmezer avatar Dec 16 '17 00:12 keremkusmezer

It is interesting. The thread you mentioned(https://github.com/google/ExoPlayer/issues/3156) has been resolved. You are still having the sampe problem?

mekya avatar Dec 19 '17 07:12 mekya

I am testing antmedia server and getting similar exception. The rtmp url works fine if I run from VLC player or ffplay on mac

I am putting rtmp url like this

rtmp://34.213.233.241:1935/LiveApp/228154535248454858718201

Error code i am receiving -4

nagendraK6 avatar Jan 09 '18 05:01 nagendraK6

/ExoPlayerImplInternal: Source error. net.butterflytv.rtmp_client.RtmpClient$RtmpIOException at net.butterflytv.rtmp_client.RtmpClient.open(RtmpClient.java:53) at com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.open(RtmpDataSource.java:57) at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:692) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

nagendraK6 avatar Jan 09 '18 05:01 nagendraK6

Still Getting the same issue E/ExoPlayerImplInternal: Source error. net.butterflytv.rtmp_client.RtmpClient$RtmpIOException at net.butterflytv.rtmp_client.RtmpClient.open(RtmpClient.java:56) at com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.open(RtmpDataSource.java:57) at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:841) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:308) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Please Help

aktjkt avatar May 30 '18 06:05 aktjkt

@mekya how cant I catch the error?

`private fun play(rtmpUri: String) {
    try {
        player = ExoPlayerFactory.newSimpleInstance(
                DefaultRenderersFactory(this), DefaultTrackSelector(), DefaultLoadControl())
        val playerView = findViewById<SimpleExoPlayerView>(R.id.player_view)
        //val uri = Uri.parse(BuildConfig.STREAMING_URL)
        val uri = Uri.parse(rtmpUri)

        playerView.player = player

        val mediaSource = ExtractorMediaSource(uri, RtmpDataSourceFactory(), DefaultExtractorsFactory(), null, null)

        player?.prepare(mediaSource)
        player?.playWhenReady = true
    } catch (e: Exception) {
        println("invalid uri")
    }
}`

this try catch doesn't do anything

MarkDylan100 avatar Jul 17 '18 09:07 MarkDylan100