wulkano / Aperture

Record the screen on macOS
MIT License
1.23k stars 111 forks source link

Can't adjust resolution #68

Closed dkhagen closed 3 years ago

dkhagen commented 4 years ago

I've tried passing a cropRect into the init, but the output video is still 3686x2304. I have my display scaling set to 1920x1200, when I run

self.globalAperture = try! Aperture.init(destination: self.documentDirURL.appendingPathComponent(name).appendingPathExtension("mp4"), framesPerSecond: 60, cropRect: NSScreen.main?.frame, showCursor: true, highlightClicks: true, audioDevice: nil)

the NSScreen.main?.frame returns (0,0,1920,1200) so I'm not sure where the 3686x2304 is coming from. When running, I get an error that says 'CMIO_Unit_Convertor_VideoToolboxCompressor.cpp:2367 cmio assert: "!mInitialized" at NotWritable - (err=0)' but I haven't been able to find much about this. And it still records the video, so I'm not sure exactly what the issue is. Is there a better way to pass in desired output resolutions?

sindresorhus commented 3 years ago

You are not understanding the difference between points and actual pixels. Video recording is actual pixels.

If you want the video to be scaled down, you can use 0.5 in the new scaleFactor parameter: https://github.com/wulkano/Aperture/releases/tag/v1.0.0

(Don't pass cropRect like you're doing now. It does nothing for how you use it)