Exoplayer unable to stream certain AAC encoded audio with .m3u8

2.7k views Asked by At

I'm porting an audio player project from Vitamio to ExoPlayer. I've been able to get it working, except I have two audio sources that will not play. There is no noticable difference between them and other samples that playback perfectly fine. The issue is not sample length since very long running samples play as well. Here are links to the sample file:

http://s3.amazonaws.com/instarad_audio/20/208888/index.m3u8 http://s3.amazonaws.com/instarad_audio/20/208237/index.m3u8

Here is the error -->

java.lang.IllegalStateException at android.media.MediaCodec.dequeueOutputBuffer(Native Method) at com.google.android.exoplayer.MediaCodecTrackRenderer.drainOutputBuffer(MediaCodecTrackRenderer.java:720) at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:420) at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:398) at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:203) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:157) at android.os.HandlerThread.run(HandlerThread.java:61) at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)

11-27 17:50:05.423 28529-28571/com.google.android.exoplayer.demo E/OMXNodeInstance﹕ OMX_FreeBuffer for buffer h

I'm creating these samples as TYPE_HLS_MEDIA, either with AUDIO_AAC encoding or VIDEO_H264.

My best guess is that these samples were recorded with an unusuall sample rate, or they are somehow corrupt.

All samples will be encoded as AAC streaming through .m3u8 format. Are there other Renders/Encoders I should be looking at?

Thank you, David

1

There are 1 answers

2
AudioBubble On BEST ANSWER

This link contains a aac audio, but the aac profile is LTP, which is not supported by google AAC software decoder. That means this link should not work on any legacy android device also. so it's not a defect from your application.

General
ID                                       : 1 (0x1)
Complete name                            : a.ts
Format                                   : MPEG-TS
File size                                : 2.00 MiB
Duration                                 : 1mn 33s
Overall bit rate mode                    : Variable
Overall bit rate                         : 180 Kbps

Audio
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 4
Format profile                           : LTP
Muxing mode                              : ADTS
Codec ID                                 : 15
Duration                                 : 1mn 33s
Bit rate mode                            : Variable
Channel(s)                               : 1 channel
Channel positions                        : Front: C
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy

Menu
ID                                       : 4096 (0x1000)
Menu ID                                  : 1 (0x1)
Duration                                 : 1mn 33s
List                                     : 256 (0x100) (AAC)
Service name                             : Service01
Service provider                         : Libav
Service type                             : digital television