I'm trying to take a file from my iTunes library and produce a clipped/trimmed version of it. The problem I'm running into is that I tell it to trim on a specific time range. It trims with the right duration, but a different start time.
I'm using the export session method given in Trim audio with iOS.
This github project reproduces the issue. It's setup to trim starting at 10sec for a duration of 3 sec. What is produced is a clip with time range at around 0:12.1 to 0:15.1.
https://github.com/nickbolton/AVAssetExportSessionDebug.git
Any ideas as to why the trimmed time range is wrong? Thanks!