我正在尝试将视频保存到我的照片库中。但有时我会得到一个错误:操作无法完成。 (PHPhotosErrorDomain 错误 -1。)
这是我的代码:
PHPhotoLibrary.shared().performChanges({
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: exporter!.outputURL!)
}) { saved, error in
if saved {
print("video saved to camera roll")
} else {
print(error?.localizedDescription)
}
}
最佳答案
我能够通过在 AVAssetWriter 的视频输出设置中删除 AVVideoCompressionPropertiesKey 中的 AVVideoQualityKey 来解决这个问题。
https://stackoverflow.com/questions/60250295/
相关文章:
javascript - 雅格斯 : access processed argv in fail f
sql-server - SSIS:发生 OLE DB 错误。错误代码 0x80004005,对方过
google-cloud-bigtable - BigTable是否允许设置微时间戳粒度
xaml - 如何在使用 xamarin shell 时更改状态栏颜色
graphql - Apollo Graphql : Rename schema for backw
reactjs - 如何测试 componentWillUnmount