Copied an AVAssetWriter function. It's commented out for now