How to convert Data to AVAsset correctly?
I'm trying to get AVAsset from audio via url path in user's device for merging with video, but everytime I get AVAsset with empty array of asset tracks; I need exactly AVAssetTrack for merging with video.
I found a function in stackoverflow for merging video with audio but in function app crash with error "Thread 1: "*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray". MARK: I can play this sound via AVAudioPlayer, but the problem lies in getting the AVAssetTrack.
I tried to output an array of tracks to the console but it returns nil