从URL到AVAsset

时间:2019-02-15 05:06:17

标签: ios swift swift4 avasset

如何从视频URL获取AVAsset。录制视频后,我得到一个这样的URL:

  

file:///private/var/mobile/Containers/Data/Application/54FDB17C-3657-4198-AF8D-A3E540BED3DC/tmp/57147251345__95EBC88C-AF48-4331-B9CF-B80BE52EA249.MOV

并且我已经尝试过这样获得AVAsset:

let videoAsset1 = AVAsset(url: video1!)

一切看起来不错,但它会打印URL和AVAsset,我希望它只是AVAsset: <AVURLAsset: 0x282842b60, URL = file:///private/var/mobile/Containers/Data/Application/AF33FC7F-2546-4835-AB3C-056F6035F755/tmp/57189867871__FE67A956-1FDA-40B4-911B-9B7F05FB57B6.MOV>

也许有人可以帮助我吗?

0 个答案:

没有答案