从较小的尺寸放大视频(重新缩放) [英] Scale the video up from a smaller size(Re-scale)
本文介绍了从较小的尺寸放大视频(重新缩放)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我实际上在寻找的不仅是质量,还需要使用AV基础将整个视频调整为更高的分辨率.
我有一个320x240
和176x144
的mp4品质的视频,我想将视频的尺寸调整为最大1280x720
,但是AVAssetExportSession
类不允许将视频从较小的尺寸放大.
I'm actually looking for is to not just the quality but resize the entire video to a greater resolution using the AV foundation.
I have a videos in 320x240
and 176x144
in mp4 quality and I want to resize video upto size 1280x720
, but AVAssetExportSession
class not allow to scale the video up from a smaller size.
推荐答案
尝试AVMutableVideoCompositionLayerInstruction和CGAffineTransform.
try AVMutableVideoCompositionLayerInstruction and CGAffineTransform.
此代码将有助于理解.
https://gist.github.com/zrxq/9817265
这篇关于从较小的尺寸放大视频(重新缩放)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文