1

I want to programmatically record the screen of an iPhone through the CLI. I have my iPhone 13 running iOS 17.5.1 connected to a Mac running macOS 14.5.

I can see it connects in Xcode and I can record the screen using Quicktime.

However, when I run ffmpeg -f avfoundation -list_devices true -i "" the screen doesn't show, only the camera. It once did in the past but I haven't managed to get it working since. What am I missing?

ffmpeg -f avfoundation -list_devices true -i ""
ffmpeg version 7.0.1 Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
2024-05-29 10:39:42.768 ffmpeg[4354:44967] WARNING: Add NSCameraUseContinuityCameraDeviceType to your Info.plist to use AVCaptureDeviceTypeContinuityCamera.
[AVFoundation indev @ 0x15a604c80] AVFoundation video devices:
[AVFoundation indev @ 0x15a604c80] [0] FaceTime HD Camera
[AVFoundation indev @ 0x15a604c80] [1] My iPhone Home Desk View Camera
[AVFoundation indev @ 0x15a604c80] [2] Capture screen 0
[AVFoundation indev @ 0x15a604c80] AVFoundation audio devices:
[AVFoundation indev @ 0x15a604c80] [0] RØDE Connect Virtual
[AVFoundation indev @ 0x15a604c80] [1] My iPhone Home Microphone
[AVFoundation indev @ 0x15a604c80] [2] MacBook Pro Microphone
[AVFoundation indev @ 0x15a604c80] [3] RØDE Connect Stream
[AVFoundation indev @ 0x15a604c80] [4] Microsoft Teams Audio
[AVFoundation indev @ 0x15a604c80] [5] RØDE Connect System
[in#0 @ 0x600003da0200] Error opening input: Input/output error
Error opening input file .
Error opening input files: Input/output error

0

You must log in to answer this question.

Browse other questions tagged .