Cannot play aac file recorded in iOS

51 views
Skip to first unread message

Farid Hosseini

unread,
Apr 23, 2014, 3:32:18 AM4/23/14
to jpl...@googlegroups.com
I'm using jPlayer to playback a file recorded in iOS using AVAudioRecorder in standard web browsers.

I'm storing the file here:

I've tried the most basic demo, even with the jsfiddle provided here: http://jsfiddle.net/jPlayer/XLNCY/ (swapping the mp3 for my aac file) and no luck...

Any ideas? I've searched everywhere and tried everything I could think of... 

The setting I'm using for the recording portion are as follows (its valuable):
            var audioSettings = new AudioSettings () {
                SampleRate = 44100.0f, 
                Format = MonoTouch.AudioToolbox.AudioFormatType.MPEG4AAC,
                NumberChannels = 1,
                AudioQuality = AVAudioQuality.High
            };
  

Thanks in advance.

Mark Panaghiston

unread,
Apr 28, 2014, 10:41:22 AM4/28/14
to jpl...@googlegroups.com
I reviewed and admit it is odd that iOS can make AAC files that its browser refuses to play... But looking at your options again it might be the SampleRate since you use the common one for MP3 (44.1kHz) while often AAC will use 48kHz.

I looked at the file in a few browsers and it worked after changing the file type to mp4. I tested in Firefox since I consider that a bit special, it insists on the mime type being correct and uses the underlying OS codecs... But it worked there too - after tweaking the extension to get the correct mime type. (Yes Icould have made the aac look like an mp4 mime)

I suggest that you try different encoding options... While your options look close, there are some odd indicators when inspecting the file using GSpot. It is like your AAC file is half MP3 and half MP4, which makes no sense.

Mark Panaghiston

unread,
Apr 28, 2014, 10:44:31 AM4/28/14
to jpl...@googlegroups.com
Posted that while still looking...

After testing in Safari on OSX, I found that it does not like the file either... And it fails on Chrome on Win 7...

Your encoding options must be borked.
Reply all
Reply to author
Forward
0 new messages