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

Error in playing RTMP Stream #4200

Closed tspvivek closed 5 years ago

tspvivek commented 6 years ago

Issue description

When tried playing a particular RTMP stream using the ExoPlayer Demo App, i am getting RtmpIOException.

Reproduction steps

Use the exoplayer demo app and in the media.exolist.json add this rtmp url rtmp://mbcmediaserver.mbcradio.tv/bestfm/livestream

In my case, I have added the RTMP url under HLS section in the media.exolist.json file.

Link to test content

rtmp://mbcmediaserver.mbcradio.tv/bestfm/livestream

Version of ExoPlayer being used

2.7.3 with extensions

Device(s) and version(s) of Android being used

Redmi 5A, Xiaomi Android version: 7.1.2

A full bug report captured from the device

exoplayer_rtmp_log.txt

tspvivek commented 6 years ago

@AquilesCanta Hi Santiago, Do i need to provide any more details that could help you?

AquilesCanta commented 6 years ago

Sorry for the delay, but I cannot debug the issue just yet. Will try to do next week. There is nothing obvious I can point out, so I will just try to manually diagnose the issue. Feel free to give it a try, if you have some time.

VitalyVPinchuk commented 6 years ago

Hi everyone, I tried to play the media and failed too. I think given link is not valid and RTMP extension fails to connect through RtmpClient with exit code -3 or -4. Please try this one: rtmp://184.72.239.149/vod/mp4:bigbuckbunny_1500.mp4 though I'm not sure that it is real RTMP format.

tspvivek commented 6 years ago

@VitalyVPinchuk Hi, Thanks for trying out this issue. But this audio url is valid and its playing well in the FFmpeg Media Player . And also it plays if you open the MBC Radio in Iphone Safari.

VitalyVPinchuk commented 6 years ago

Hi, But still, I think it's not the issue of ExoPlayer. RTMP extension depends on RTMP-Client, which doesn't play this media offhand. Probably you should ask there (https://github.com/ant-media/LibRtmp-Client-for-Android).

tspvivek commented 6 years ago

@VitalyVPinchuk Thanks for the information. I have opened a issue in LibRtmp. Error in playing RTMP Audio Stream

ojw28 commented 6 years ago

Stack trace:

     Caused by: 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.upstream.DefaultDataSource.open(DefaultDataSource.java:147)
        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:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:760)
ojw28 commented 6 years ago

Tracking bugs on the LibRtmp side: https://github.com/ant-media/LibRtmp-Client-for-Android/issues/65 https://github.com/ant-media/LibRtmp-Client-for-Android/issues/66

ojw28 commented 6 years ago

I can't play rtmp://mbcmediaserver.mbcradio.tv/bestfm/livestream using anything, including VLC and the mentioned FFMpeg Media Player. Are you really sure it's valid? Can you play it using VLC? If it's geo-restricted, have you any idea to which country?

tspvivek commented 6 years ago

@ojw28 Please try opening this http://www.mbcradio.tv/sites/all/themes/mbcradiotv/templates/bestfm.html link in Iphone Safari browser and Press the play button. Its playing fine. I'm sure its not geo-restricted. My app is already playing this url using FFmpeg Media Player.

ojw28 commented 6 years ago

I was able to make a little more progress:

In any case, this is sufficient to work out that the first failure is related to resolving the address, and that at least VLC is also affected.

randauto commented 5 years ago

I have same issue. Link test my rtmp: http://hlstester.com/new-hls-player/?url=rtmp://5a6872aace0ce.streamlock.net/nghevov1//vov1.stream_aac

rtmp://5a6872aace0ce.streamlock.net/nghevov1//vov1.stream_aac -> can play welll but when playing in Exo player with this extension, it can not play.

Aroniez commented 5 years ago

Same issue still. Any solution yet?

ojw28 commented 5 years ago

This should be fixed by https://github.com/google/ExoPlayer/pull/6303.