1

I grab the audio data from an MPMediaItem (iTunes song) and put it in an AVAsset. How do I turn my AVAsset into an .MP3 file that can be stored to disk?

spentak
  • 4,627
  • 15
  • 62
  • 90

1 Answers1

2

Actually, yes you can do this..... check out this great article that shows you how to use an AVAssetWriter to write out the data whilst reading...

Article here.

Simon Lee
  • 22,304
  • 4
  • 41
  • 45
  • @Daniel can you give a reference to how this can be done with only a reader? – Nick Holt Feb 12 '14 at 09:05
  • 1
    @NickHolt check out http://stackoverflow.com/questions/7812394/ios-5-0-crash-when-reading-data-from-an-avas‌​setreaderoutput/8524117#8524117 i put code in my answer that does just that – Daniel Feb 12 '14 at 17:07