Cordova Media Plugin getting decode error on iOS 8 with some audio files

705 views
Skip to first unread message

Tom Krones

unread,
Sep 10, 2014, 1:11:32 PM9/10/14
to phon...@googlegroups.com
I just upgraded my device to iOS 8 and started getting a decode error with some of my mp3 files that are being played using the media plugin.  They played fine with iOS 6 and iOS 7.  Here are the two files one plays fine the other gives the MediaError.MEDIA_ERR_DECODE = 3 error.

Anyone know why this is happening and if there is any software I can use to re-encode the files and to see if it fixes them?

Thanks.
chart-1-6-1-bad.mp3
chart-1-6-1-good.mp3

Kerri Shotts

unread,
Sep 10, 2014, 3:44:42 PM9/10/14
to phon...@googlegroups.com
Do any other media players have problems with them?

Tom Krones

unread,
Sep 10, 2014, 3:49:32 PM9/10/14
to phonegap
Just checked.  They both play fine in VLC, Quicktime, and itunes.

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/Zb7NQsr6wCQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Krones

unread,
Sep 10, 2014, 3:50:40 PM9/10/14
to phonegap
I'm tried converting the audio to a wav file then back to an mp3 using audacity and it didn't help.

Kerri Shotts

unread,
Sep 10, 2014, 4:12:52 PM9/10/14
to phon...@googlegroups.com
Totally wacky suggestion, but could the bad files be too short (or small)? I'm guessing *not*, but if all your bad files are also files that are extremely short (or small), that would be something to consider. Try adding silence to the end and see if that allows the file to play.

Tom Krones

unread,
Sep 10, 2014, 4:14:30 PM9/10/14
to phonegap
I realized I wasn't clear, both audio files play but the 'bad' one returns the error when it finishes and the app becomes unresponsive.  

Shazron

unread,
Sep 10, 2014, 4:22:26 PM9/10/14
to phonegap
I'd like to track all iOS 8 issues and fix them. This is interesting, can you please file an issue at:
http://issues.apache.org/jira/browse/CB

... so it can be tracked and evaluated by the devs, and you can be notified. Include any appropriate test files (audio in this case).

Sign up here:



--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.

Tom Krones

unread,
Sep 10, 2014, 4:24:51 PM9/10/14
to phonegap
Good idea!  I just ran the test, added a few seconds to the end of the file in audacity and re-exported the file.  Now it plays with no error.  Now the question is why would the length be an issue?

@Shazron, sure no problem.

Kerri Shotts

unread,
Sep 10, 2014, 4:36:13 PM9/10/14
to phon...@googlegroups.com
Holy %@#$!

I wasn't really expecting that to work. (!!!!)

I guess the real test is to see if this holds true all the time -- if you create another MP3 that's the same (or similar) size and it fails, then it probably points to size being a problem.

If that's so, I would wager that there's an issue either in the encoder or decoder (or combination). Perhaps the prior decoder was more tolerant of certain conditions but a change in IOS8 has made it less so? Or perhaps there is actually a bug in the iOS 8 decoder. To see if it's the encoder causing (or triggering) the issue, you might try with another encoder other than Audacity.

Tomas Krones

unread,
Sep 10, 2014, 5:14:34 PM9/10/14
to phon...@googlegroups.com
I had to run out for a second but I'll run those tests in a few hours. 

Sent from my iPhone

Tom Krones

unread,
Sep 10, 2014, 7:38:16 PM9/10/14
to phon...@googlegroups.com
I think the issue is length.  Created a 2 new files that were about 0.5 seconds and 10 seconds long and only the short one threw an error.  Then I downloaded a free audio sound effect from freesound.org that was under a second and it failed. 

Not sure where to go from here.  I think I'll have to look for another audio plugin until this is fixed.  :(

For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/Zb7NQsr6wCQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+unsubscribe@googlegroups.com.

Kerri Shotts

unread,
Sep 11, 2014, 1:10:55 AM9/11/14
to phon...@googlegroups.com
It'll be interesting to see if another plugin has the same issue on iOS 8 or not.

kanarie

unread,
Sep 23, 2014, 5:22:54 AM9/23/14
to phon...@googlegroups.com
Hi Tom,

I run into the same issues on short audiofiles on iOS 8. Did you file the issue with apache like Shazzron suggested? Thanks.

kanarie

unread,
Sep 23, 2014, 7:03:24 AM9/23/14
to phon...@googlegroups.com
Never mind, I found the issue report

wideblue

unread,
Dec 11, 2014, 9:31:45 AM12/11/14
to phon...@googlegroups.com
It seems that iOS update 8.1.2 resolved this problem. 
Cheers

Dne sreda, 10. september 2014 19:11:32 UTC+2 je oseba Tom Krones napisala:
Reply all
Reply to author
Forward
0 new messages