开发者

Cap frame rate or bit rate in AVAssetExportSession?

开发者 https://www.devze.com 2023-03-11 10:53 出处:网络
I\'m using AVAssetExportSession to export some stuff at 640x480, and the files are kind of monstrous -- predictably monstrous, but still monstrous, given that we need to upload them from the phone ove

I'm using AVAssetExportSession to export some stuff at 640x480, and the files are kind of monstrous -- predictably monstrous, but still monstrous, given that we need to upload them from the phone over a 3G network. Is there any way to affect the size of the file other than to reduce the resolution? Ideally I'd like to try, e.g., compressing harder (even if that lowers quality), or cutting back to 15 frames/second, or something like that, but there don't see开发者_C百科m to be any hooks to do it.


With AVExportSession you can only use presets. If AVAssetExportPresetMediumQuality and AVAssetExportPresetLowQuality don't work for you, you're better off using AVAssetReader and AVAssetWriter. AVAssetWriter supports bitrate setting and optionally you could skip frames when writing to get lower FPS.

0

精彩评论

暂无评论...
验证码 换一张
取 消