ofxiOSVideoWriter icon indicating copy to clipboard operation
ofxiOSVideoWriter copied to clipboard

Possible to change bitrate?

Open aferriss opened this issue 7 years ago • 2 comments

Like the title says, wondering if it's possible to record higher bitrate videos.

I saw in the video settings there is AVVideoAverageBitRateKey: [NSNumber numberWithInt:bitrate]

have you tried it?

aferriss avatar Oct 13 '17 21:10 aferriss

hey @aferriss, nope haven't tried this yet.

julapy avatar Oct 14 '17 00:10 julapy

I've been poking around with this -- you can mess with the "NSDictionary * videoSettings" line, for example this is a jpeg with highest quality (makes a really big movie):


NSDictionary * videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:
                                    AVVideoCodecJPEG, AVVideoCodecKey,
                                    [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithFloat: 1.0], AVVideoQualityKey, nil] ,AVVideoCompressionPropertiesKey,
                                    [NSNumber numberWithInt:self.videoSize.width], AVVideoWidthKey,
                                    [NSNumber numberWithInt:self.videoSize.height], AVVideoHeightKey,
                                    nil];

ofZach avatar Jan 09 '18 15:01 ofZach