相关疑难解决方法(0)

如何将UIImage数组导出为电影?

我有一个严重的问题:我有NSArray几个UIImage对象.我现在想做的是从那些创作电影UIImages.但我不知道该怎么做.

我希望有人可以帮助我或给我一个代码片段,它可以做我喜欢的事情.

编辑:供将来参考 - 应用解决方案后,如果视频看起来扭曲,请确保您捕获的图像/区域的宽度是16的倍数.在这里经过几个小时的努力后发现:
为什么我的UIImages电影得到了扭曲?

这是完整的解决方案(只需确保宽度是16的倍数)
http://codethink.no-ip.org/wordpress/archives/673

iphone export avfoundation uiimage ios

183
推荐指数
7
解决办法
8万
查看次数

为什么我的UIImages电影会被扭曲?

我正在使用zoul的解决方案将UIImage数组导出为电影.但我的镜架都变形了.这是原始图片:

在此输入图像描述

这是一个类似的失真例子:http: //oi56.tinypic.com/8wkqys.jpg

我在这里读到它与纵横比有关,但没有解释如何修复它.

iphone export objective-c avfoundation uiimage

12
推荐指数
1
解决办法
4603
查看次数

iPhone - AVAssetWriter - 从1920×1080像素的照片创建电影时出错

我试图从一些图片创建一部电影.它适用于高清图片({720,1280})或更低的分辨率.但是当我尝试使用全高清图片{1080,1920}创建电影时,视频会被加扰.这是一个链接,可以看到它的外观http://www.youtube.com/watch?v=BfYldb8e_18.你有什么想法我可能做错了吗?

- (void) createMovieWithOptions:(NSDictionary *) options
{
@autoreleasepool {
    NSString *path = [options valueForKey:@"path"];
    CGSize size =  [(NSValue *)[options valueForKey:@"size"] CGSizeValue];
    NSArray *imageArray = [options valueForKey:@"pictures"];
    NSInteger recordingFPS = [[options valueForKey:@"fps"] integerValue];
    BOOL success=YES;
    NSError *error = nil;

    AVAssetWriter *assetWriter = [[AVAssetWriter alloc] initWithURL:[NSURL fileURLWithPath:path]
                                                           fileType:AVFileTypeQuickTimeMovie
                                                              error:&error];
    NSParameterAssert(assetWriter);

    NSDictionary *videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:
                                   AVVideoCodecH264, AVVideoCodecKey,
                                   [NSNumber numberWithFloat:size.width], AVVideoWidthKey,
                                   [NSNumber numberWithFloat:size.height], AVVideoHeightKey,
                                   nil];

    AVAssetWriterInput *videoWriterInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo
                                                                              outputSettings:videoSettings];

    // Configure settings for the pixel buffer adaptor.
    NSDictionary* bufferAttributes …
Run Code Online (Sandbox Code Playgroud)

iphone mobile ios avassetwriter avasset

7
推荐指数
1
解决办法
1883
查看次数