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?
Asked
Active
Viewed 3,790 times
1
-
I don't think that you can, wouldn't that cause copyright issues? – Richard J. Ross III Dec 14 '11 at 16:04
-
yes u can, and there is no issue, DRMed songs dont return a URL and thus u cant create an AVAsset from it, others you can – Daniel Dec 14 '11 at 17:42
1 Answers
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...

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-avassetreaderoutput/8524117#8524117 i put code in my answer that does just that – Daniel Feb 12 '14 at 17:07