google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.7k stars 6.02k forks source link

Exoplayer and RTMPS videos #6786

Closed XanderSan closed 4 years ago

XanderSan commented 4 years ago

Hi. I updated to 2.11.0 version and I'm trying to show rtmps videos but I have this error:

2019-12-19 10:34:53.996 31719-32028/it.telecomitalia.videolibrary E/ExoPlayerImplInternal: Source error. net.butterflytv.rtmp_client.RtmpClient$RtmpIOException: RTMP error: -10 at net.butterflytv.rtmp_client.RtmpClient.open(RtmpClient.java:222) at com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.open(RtmpDataSource.java:49) at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:83) at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:961) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

My code is:

MediaSource mediaSource; RtmpDataSourceFactory rtmpFactory = new RtmpDataSourceFactory(); mediaSource = new ProgressiveMediaSource.Factory(rtmpFactory).createMediaSource(Uri.parse(videoUrl)); mediaSource.addEventListener(mainHandler, mediaSourceEventListener); player.prepare(mediaSource,true,false);

Could you help me? Is there a workaround to play RTMPS videos?

Thanks

Samrobbo commented 4 years ago

Hi @XanderSan,

Can I get a link to the media you are trying to play please? If you do not wish to share publicly, email it to dev.exoplayer@gmail.com, making sure to quote "Issue #6786" as the title.

Thanks :)

XanderSan commented 4 years ago

Thanks for your support. I'll try to schedule this work in January 2020 because I need to call permission to do it and in this moment is not possible.

umangsaini commented 4 years ago

For RTMPS please refer to the this issue #5354.

For RTMP links, you may try playing links from issue #6187, to confirm if there is any issue with your project. I am able to play RTMP streams with latest v2.11.0 Demo app and extensions enabled.

google-oss-bot commented 4 years ago

Hey @XanderSan. We need more information to resolve this issue but there hasn't been an update in 14 days. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 4 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@XanderSan if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.