I’m trying to record test videos using either ffmpeg or appium mac2 driver (as far as I know, it uses ffmpeg behind the scenes anyway)
deviceId == 0 is screen capture in CircleCI VM.
In python code is simple:
appium_driver.start_recording_screen(deviceId=0)
Or using raw ffmpeg:
ffmpeg -f avfoundation -i "0" -t 10 output.mp4
But I can’t give permissions somehow. Once I start video recording, there is a popup:
And an error:
[ffmpeg] objc[23088]: class 'NSKVONotifying_AVCaptureScreenInput' not linked into application
What I’ve tried:
basically main are ffmpeg and .machine-agent, others are just out of desperation
- macos/add-permission:
bundle-id: /Applications/Utilities/Terminal.app
permission-type: kTCCServiceScreenCapture
- macos/add-permission:
bundle-id: /private/tmp/.machine-agent
permission-type: kTCCServiceScreenCapture
- macos/add-permission:
bundle-id: /usr/local/bin/ffmpeg
permission-type: kTCCServiceScreenCapture
- macos/add-permission:
bundle-id: /opt/homebrew/bin/appium
permission-type: kTCCServiceScreenCapture
P.S. Screen capturing via applescript and quicktime doesn’t work for me (I can’t click “Record” button). What I’ve also tried: wrap ffmpeg into apple Automator
or Apple Script
to make a fake app and give permissions to it, but it didn’t work neither.