Opened 13 days ago

Last modified 9 days ago

#11001 open defect

MacOS Sonoma "Class `NSKVONotifying_AVCaptureScreenInput' not linked into application"

Reported by: Frank Plowman Owned by: Thilo Borgmann
Priority: normal Component: avdevice
Version: git-master Keywords: avfoundation macos
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Using MacOS Sonoma 14.4.1 (23E224) and ffmpeg 2f8bf90054a5f7455f35b8705163f81c4413d779, attempting to record using the avfoundation input device results in the following errors:

2024-05-06 18:03:21.526 ffmpeg[13164:50828] WARNING: Add NSCameraUseContinuityCameraDeviceType to your Info.plist to use AVCaptureDeviceTypeContinuityCamera.
objc[13164]: class `NSKVONotifying_AVCaptureScreenInput' not linked into application
[AVFoundation indev @ 0x137f05660] Configuration of video device failed, falling back to default.

AVCaptureDeviceTypeContinuityCamera allows you to use your iPhone as a video capture device. The application, Terminal.app in this case, does indeed not have NSCameraUseContinuityCameraDeviceType in its Info.plist, so this may be an upstream issue or could be ignored. The second issue appears more concerning.

The audio is also very choppy, even when set up with a realtime-suitable configuration but I am unsure as to whether this is related.

How to reproduce:

% ./ffmpeg -pix_fmt bgr0 -f avfoundation -i "1:1" test.ts
ffmpeg version N-115088-g2f8bf90054 Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: 
  libavutil      59. 17.100 / 59. 17.100
  libavcodec     61.  5.103 / 61.  5.103
  libavformat    61.  3.103 / 61.  3.103
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.101 / 10.  2.101
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
2024-05-06 18:15:54.840 ffmpeg[31518:102093] WARNING: Add NSCameraUseContinuityCameraDeviceType to your Info.plist to use AVCaptureDeviceTypeContinuityCamera.
objc[31518]: class `NSKVONotifying_AVCaptureScreenInput' not linked into application
objc[31518]: class `NSKVONotifying_AVCaptureScreenInput' not linked into application
objc[31518]: class `NSKVONotifying_AVCaptureScreenInput' not linked into application
[AVFoundation indev @ 0x13c6059d0] Configuration of video device failed, falling back to default.
[avfoundation @ 0x13c605760] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, avfoundation, from '1:1':
  Duration: N/A, start: 837.977396, bitrate: 1536 kb/s
  Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 2940x1912, 1000k tbr, 1000k tbn
  Stream #0:1: Audio: pcm_f32le, 48000 Hz, mono, flt, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native))
  Stream #0:1 -> #0:1 (pcm_f32le (native) -> mp2 (native))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'test.ts':
  Metadata:
    encoder         : Lavf61.3.100
  Stream #0:0: Video: mpeg2video (Main), yuv420p(progressive), 2940x1912, q=2-31, 200 kb/s, 240 fps, 90k tbn
      Metadata:
        encoder         : Lavc61.5.103 mpeg2video
      Side data:
        cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: mp2, 48000 Hz, mono, s16, 384 kb/s
      Metadata:
        encoder         : Lavc61.5.103 mp2
[out#0/mpegts @ 0x600002db0300] video:1649KiB audio:73KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 3.167513%
frame=   55 fps= 30 q=31.0 Lsize=    1776KiB time=00:00:01.76 bitrate=8236.5kbits/s speed=0.967x    
Exiting normally, received signal 2.

Change History (2)

comment:1 by Thilo Borgmann, 11 days ago

Owner: set to Thilo Borgmann
Status: newopen

What is your output for

ffmpeg -f avfoundation -list_devices 1 -i "" -f null -

?

comment:2 by Frank Plowman, 9 days ago

2024-05-10 12:57:56.851 ffmpeg[50953:1803116] WARNING: Add NSCameraUseContinuityCameraDeviceType to your Info.plist to use AVCaptureDeviceTypeContinuityCamera.
[AVFoundation indev @ 0x13a7047f0] AVFoundation video devices:
[AVFoundation indev @ 0x13a7047f0] [0] FaceTime HD Camera
[AVFoundation indev @ 0x13a7047f0] [1] Capture screen 0
[AVFoundation indev @ 0x13a7047f0] AVFoundation audio devices:
[AVFoundation indev @ 0x13a7047f0] [0] BlackHole 2ch
[AVFoundation indev @ 0x13a7047f0] [1] MacBook Air Microphone

I only get the

objc[31518]: class `NSKVONotifying_AVCaptureScreenInput' not linked into application

when using the screen capture device. The

WARNING: Add NSCameraUseContinuityCameraDeviceType to your Info.plist to use AVCaptureDeviceTypeContinuityCamera.

appears regardless.

Note: See TracTickets for help on using tickets.