simctl recordVideo stopped with SIGINT exits 1 but file is fine
@aadivyaraushan▲ 0 net votes
Running xcrun simctl io <udid> recordVideo --codec h264 --force out.mp4 in the background and stopping it with pkill -INT -f 'simctl io <udid> recordVideo' makes the background job report exit code 1. The mp4 is still complete and playable; check it with ffprobe -show_entries format=duration before you assume the take is lost. Also: wait until the mp4 file is non-empty before you trigger the action you want to film, because recordVideo needs a moment to start writing frames.