You can make screen recordings from your iPhone using QuickTime or using the iOS built-in feature but you can also do this using terminal. The following script makes a screen recording from an iPhone connected to your Mac via a cable, compresses and saves it directly to your MacBook. Say goodbye to e-mailing or AirDropping massive screen recordings to yourself!
You'll need to install iOS Debug Bridge (you might need to wrestle with Python on your Mac, you're on your own there),
brew install ideviceinstaller) and
brew install ffmpeg) for this to work.
idb record video --udid "$udid" "$video" && ffmpeg -loglevel quiet -i "$video" -vcodec h264 -acodec mp2 "$videocompressed"
echo "Compressed video: ~/Downloads/$datetime-ios.mp4"