微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

处理后带有奇怪线条的 GPUImageMovie 视频

如何解决处理后带有奇怪线条的 GPUImageMovie 视频

使用 GPUImageMovie 后视频出现奇怪的线条。这是我的代码

self.avAsset = [AVURLAsset URLAssetWithURL:self.url options:nil];
AVPlayerItem *avPLayerItem = [AVPlayerItem playerItemWithAsset:self.avAsset];
self.avPlayer = [AVPlayer playerWithPlayerItem:avPLayerItem];
self.avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndPause;
avPLayerItem.videoComposition = [AVVideoComposition videoCompositionWithPropertiesOfAsset:self.avAsset];

GPUImageMovie *movie = [[GPUImageMovie alloc] initWithAsset:self.avAsset];
GPUImageView *movieView = [[GPUImageView alloc] initWithFrame:self.videoView.bounds];
movieView.layer.zPosition = 50;
[self.view addSubview:movieView];
    
[movie addTarget:movieView];
[movieView setInputRotation:kGPUImageRotateRight atIndex:0];
[self.avPlayer play];
[movie startProcessing];

在使用 GPUImageMovie 之前:Image

使用 GPUImageMovie 后:Image

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。