I working on a project which involves decoding AAC track from a mp4 file into PCM format. So far, the only way I found that does this is by using AVAssetReader. However, this approach has 2 problems for me:
1) According to the guide, the AVAssetReader is not recommended for real-time processing. However, My project requires live decoding and playback, where the decoded PCMs are post-processed. Will this be a problem? If yes, what will be the alternative?
2) AVAssetReader seems to decode the track sequentially. It does not seem to allow jumping to a random point and decode from there, which is something required by my project. What will be solution?
Asked
Active
Viewed 767 times
0

Vadim Kotov
- 8,084
- 8
- 48
- 62

crab oz
- 635
- 7
- 16
-
How did you do with AVAssetReader? Actually I need that one. – Bhuvanendra Pratap Maurya Sep 26 '19 at 12:52
1 Answers
0
Answer 1: If you have to deal with track in iPod library, AVAssetReader is the only way.If not, you can choose another decoder like FFmpeg.
Answer 2: AVAssetReader supports random access.It has a timeRange property, see https://stackoverflow.com/a/6719873/1060971.

Community
- 1
- 1

vampirewalk
- 819
- 8
- 19