AVAssetExportSession在输出视频的右下角给我一个绿色边框 [英] AVAssetExportSession giving me a green border on right and bottom of output video

查看:142
本文介绍了AVAssetExportSession在输出视频的右下角给我一个绿色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是代码:

AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset:mixComposition presetName:AVAssetExportPresetHighestQuality];
        exporter.outputURL = outputUrl;
        exporter.outputFileType = AVFileTypeQuickTimeMovie;
        exporter.videoComposition = mainComposition;
        exporter.shouldOptimizeForNetworkUse = YES;
        [exporter exportAsynchronouslyWithCompletionHandler:^{
            //completion
        }];

我尝试过不同的质量设置。无论我想渲染什么视频,我总是在视频的右侧和底部都有一个1-2像素的边框。是什么导致这种情况以及如何解决?

I've tried different quality settings. I always get a 1-2 pixel border running down the right side of the video and along the bottom, no matter what video I'm trying to render. What could be causing this and how do I fix it?

编辑:我没有在任何地方使用任何绿色,所以这必须以某种方式来自框架。

I am not using any kind of green color anywhere, so this must be coming from the framework somehow.

推荐答案

通常在视频裁剪后出现绿线,问题出在视频renderSize宽度,它应该乘以16。

Usually green lines appear after video cropping, problem is in video renderSize width, it should be multiply of 16.

这里有一些关于此的链接:
apple 1
apple 2

Here some links about this: apple 1 apple 2

这篇关于AVAssetExportSession在输出视频的右下角给我一个绿色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆