Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Android SDK - Unable to read MPEG live feed


Hello,

JWPlayer on Android isn't able to read MPEG live feeds like this one : http://streaming.prun.net/streamprun

It says "No playable sources found". The Content-Type header of this feed is audio/mpeg, and it looks like it's just a raw MP3 feed. Why can't it be played by JWPlayer ?

Thanks !

12 Community Answers

Daniel Berger

JW Player Support Agent  
0 rated :

Can you please implement your setup (include the live stream url) in our open source project: https://github.com/jwplayer/jwplayer-sdk-android-demo

Thanks.

n...

User  
0 rated :

Here it is : https://up2sha.re/file?f=w8esCTjW

As you can see the player can't find a playable source, however if you open the URL in a web browser or VLC for instance it will work normally.

Daniel Berger

JW Player Support Agent  
0 rated :

Hi,

Thank you for the project. I see that your audio file does not have a valid mime type which our player requires. Can you please implement your file as an mp3 file? Thanks.

n...

User  
0 rated :

What do you mean by mime type ? The HTTP response has "Content-Type:audio/mpeg", isn't that enough for the player to detect that it's MP3 ?

Daniel Berger

JW Player Support Agent  
0 rated :

Sure. I would be happy to clarify. There seem to be two issues. The first issue is that your file does not have an extension. The second issue is that even when I force it to be an HLS file, I get a cors error (http://www.test-cors.org/).

n...

User  
0 rated :

I see, thanks. I didn't know that the Android version of JWPlayer was subject to CORS. I will need to setup a server-side proxy to bypass it.

I have another example of non-working audio file: it's a basic MP3 file which doesn't work because of a UnrecognizedInputFormatException. It's got an extension, and it's a valid MP3 file.

Here is its URL : https://www.voxiweb.com/podcast.mp3

Why doesn't this one work ?

George

JW Player Support Agent  
0 rated :

Hi,

Apparently we can’t recognize the file:
Caused by: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException:
None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggVorbisExtractor, PsExtractor, WavExtractor) could read the stream.

Try re-encoding

n...

User  
0 rated :

The thing is that I can't really re-encode it because our audio files come from an external server.

According to ffmpeg the file is a valid mp3 file :

filename=podcast.mp3
nb_streams=1
nb_programs=0
format_name=mp3
format_long_name=MP2/3 (MPEG audio layer 2/3)
start_time=0.000000
duration=1410.824400
size=56441931
bit_rate=320050
probe_score=50
TAG:encoded_by=Amadeus Pro
TAG:title=Hebdoxytude 38, l’actualité de la semaine en technologies et accessibilité
TAG:album=Oxytude
TAG:artist=Oxytude
TAG:date=2017
TAG:genre=Podcast

ffmpeg also outputs this :

[mp3 @ 0x165e8e0] Skipping 7168 bytes of junk at 1787.

Could it come from there ?

George

JW Player Support Agent  
0 rated :

Possibly, you’ll have to find a way to re-encode it, just to test the theory. If it works with a new encode, then you’ll have to see how you can get the stream provider to encode the file.

n...

User  
0 rated :

The native ExoPlayer can read those files without any problem. According to the stack trace, doesn't JWPlayer internally uses ExoPlayer ?

George

JW Player Support Agent  
0 rated :

Which version of ExoPlayer? Send me the source code of the ExoPlayer test app with your stream

n...

User  
0 rated :

I just ran some tests. The mp3 file doesn't work with the ExoPlayer test app (UnrecognizedInputFormatException), same as JWPlayer. The live feed (streamprun) however works like a charm (it doesn't in JWPlayer because of CORS). Why is JWPlayer subject to CORS while ExoPlayer isn't ?

Also, using the ExoMedia library (ExoPlayer/MediaPlayer abstraction and compatibility layer), both files works fine... that's weird

This question has received the maximum number of answers.