Failed to get Parse bytes. err: optm 1869640813 in audio stream in iphone sdk

I am using the audio stream in my application. I get the sound file from the server and play it using the audio stream. The url is similar to http://182.18.140.134/ExpressPlus/audio/356108042705526/teja.mp3 when I try to play this audio generating a warning because "Parsing errors failed. Err: optm 1869640813".

I don’t know how to solve it?

Thanks to everyone, Madan.

+4
source share
2 answers

AudioFileStreamParseBytes waiting for a stream that has been optimized for network transmission. For example, if you exported a file using AVAssetExportSession , you should set it as follows:

 AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset: songAsset presetName: AVAssetExportPresetPassthrough]; exporter.shouldOptimizeForNetworkUse = YES; 

I think in your case you need to look at how MP3 is created and check if the flag is set.

If that doesn't work, look at Matt Gallagher's tutorial on this:

Stream and Play MP3 Stream

It covers issues that may cause failure to parse MP3 files.

+1
source

The documentation states this message:

It is not possible to create output packets because the streaming table of audio files or other defining information is missing or appears after the audio data.

http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/AudioStreamReference/Reference/reference.html

In the "Result Codes" section. The result code is kAudioFileStreamError_NotOptimized. This message is fuzzy, but it looks like the header information for the audio is not at the beginning of the file as expected. You should try checking the returned audio file to see how it is configured.

0
source

All Articles