-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Shoutcast #389
Comments
I tested with one more Android 4.1.2 device and it works. So out of the 3 devices, only 1 fail. For the failed one (Sony Xperia V LT25i, Android 4.3), the exception is as follows:
|
We just pushed a whole bunch of changes to dev, that will allow you to use TYPE_MP3 rather than rely on anything built on top of the (on many devices quite flaky) MediaExtractor API. Please verify that using TYPE_MP3 works correctly for your case. If it does, you should use that instead. |
Note - Works fine for me. |
thx. TYPE_MP3 doesn't work on any of my test devices. my test procedure:
for my Android 4.1 and 4.4 test device, the sample URL works with TYPE_OTHER, but when TYPE_MP3 is used, it always result as exception: Android 4.4
Android 4.3 (that TYPE_OTHER doesn't work too) and 4.1
|
Ah right. This is because the server is using ICY rather than HTTP. There's some information about this here: https://code.google.com/p/aacdecoder-android/wiki/HandlingShoutcastStreams I'm not sure how much we want to support this. It seems like a fairly bad way to be streaming live audio to mobile devices, v.s. something like HLS or DASH. |
Thx. It works like a charm. To get it work, I basically just followed the instruction at aacdecoder-android. It needs only 2 classes from that project. Details are as follows:
I tested with all the three devices previously used and the solution works without problem. Should I close this issue or maybe the information should be documented? To my understanding, ShoutCast is quite a popular audio streaming platform, and probably there will be people try using ExoPlayer for ShoutCast in the future. |
|
You are right that abnormal behavior did happen. Probably when the network is not stable, the player just keep looping the content in the buffer, and print out error message like it's of course the best if a media player library can transparently handle network switchover and other issues, but at the minimum I expect the library to trigger onError event so that developers can programmatically restart/retry or just alert user of a failure. |
My point is that for this way of streaming, it seems impossible to recover in a completely seamless way. There doesn't appear to be a mechanism to request data from the server that continues from the point up to which you managed to load before the network error. The problem we have is that the player is trying to recover, but the recovery mechanism that works for most streaming technologies doesn't work for this case, and so recovery doesn't work properly and the player goes into a bad state. The workaround would be to disable retries in the player, so that the app would always receive an error (and have to retry itself). Kind of sucks as an experience for the user though. |
The retry logic should work nicely for you now, and there shouldn't be discontinuities detected either. I'm going to close this, because I don't think we'll want to support ICE directly in the library (it's pretty easy to add support in a specific app if needed). |
I updated code and test with my Android 4.1.2 device. the result is the same, getting a lot of
and the player keeps playing content in the buffer in loop. This problem doesn't happen in my other devices. Is there a way to disable retry at all? |
The above problem is not specific to ShoutCast. I'll create another issue. |
Right. In general, the retry logic should now work well. I think that issue is something else, possibly something device specific. We'll take a look. |
Hi, Error On Stream: Working Stream: Is there any workaround with such streams. Thanks: |
I tested ExoPlayer v1.2.4 to play a mp3 audio stream produce by a Shoutcast DNAS server. Using the demo project with DemoUtil.TYPE_OTHER renderer. Tested in 2 different physical devices, It works in Android 4.4 but fail in Android 4.3.
My questions are:
if it's not supported yet, given ExoPlayer works in Android 4.1(API 16)+, would Shoutcast be supported in the future for API 16+?thx.
The text was updated successfully, but these errors were encountered: