// 耗时操作, 在主线程 AVURLAsset *avUrl = [AVURLAsset assetWithURL:[NSURL URLWithString:bodiesModel.url]]; CMTime time = [avUrl duration]; int seconds = ceil(time.value/time.timescale);
在工程中连接CoreMedia和AVFoundation框架