rs / SDAVAssetExportSession

AVAssetExportSession drop-in replacement with customizable audio&video settings
MIT License
805 stars 212 forks source link

getting "AVAssetReaderOutput does not currently support compressed output" Exception #39

Closed harryhorn closed 7 years ago

harryhorn commented 9 years ago

I am using Xcode 7 beta 5 and am getting a strange error with code that follows the realm and a sample in stack overflow. I am getting:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVAssetReaderVideoCompositionOutput initWithVideoTracks:videoSettings:] AVAssetReaderOutput does not currently support compressed output'

Anyone see this or have any idea what is going on? I tried playing with the options but no solution.

Thanks

zakkhoyt commented 8 years ago

Try using options like this:

[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] forKey:(id)kCVPixelBufferPixelFormatTypeKey];

instead of a compressed format like:

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

That was my issue