Open LloydBlv opened 7 years ago
Please check out the RTMPIOException errorcode
Can I test the rtmp url?
@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?
Yeah sure, have you tried to catch the RTMPIOException with try-catch block and show an appropriate message?
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.
I have also a similar issue you can find the bug detail in https://github.com/google/ExoPlayer/issues/3156
Rtmp Client also dies
It is interesting. The thread you mentioned(https://github.com/google/ExoPlayer/issues/3156) has been resolved. You are still having the sampe problem?
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
/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)
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
@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
While playing RTMP stream this weird exception happens, And gives no clue about why its happening:
Please help!