在avformat_open_input()处报错

来源:6-9 从音频设备中读取音频数据

weixin_慕斯卡8568554

2023-08-14

xcode打印如下

2023-08-14 23:46:32.691423+0800 myapp[13092:5032347] Metal API Validation Enabled
2023-08-14 23:47:16.478459+0800 myapp[13092:5032347] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000025e100> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2023-08-14 23:47:16.571563+0800 myapp[13092:5032347] HALC_ShellDriverPlugIn::Open: Can’t get a pointer to the Open routine
2023-08-14 23:47:16.657498+0800 myapp[13092:5032347] [] CMIO_DAL_PlugInManagement.cpp:191:Initialize Missing device-camera entitlement
[AVFoundation indev @ 0x102409a40] Invalid audio device index

其中,用ffmpeg -f avfoundation -list_devices true -i ““打印可用的设备中,内建麦克风是1,devicename=”:1”

$ ffmpeg -f avfoundation -list_devices true -i ""
ffmpeg version 6.0 Copyright © 2000-2023 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.29)
configuration: --prefix=/usr/local/ffmpeg --enable-debug=3 --enable-shared --disable-static
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
[AVFoundation indev @ 0x7f9a8d40d2c0] AVFoundation video devices:
[AVFoundation indev @ 0x7f9a8d40d2c0] [0] FaceTime HD Camera
[AVFoundation indev @ 0x7f9a8d40d2c0] [1] Capture screen 0
[AVFoundation indev @ 0x7f9a8d40d2c0] AVFoundation audio devices:
[AVFoundation indev @ 0x7f9a8d40d2c0] [0] ZoomAudioDevice
[AVFoundation indev @ 0x7f9a8d40d2c0] [1] Built-in Microphone
[AVFoundation indev @ 0x7f9a8d40d2c0] [2] WeMeet Audio Device
: Input/output error

写回答

1回答

李超

2023-08-15

到课程的git 上下载我上传的工程,试试是否是ok 的

0
4
李超
回复
weixin_慕斯卡8568554
课程里有将,你没有顺序看吧?或者百度一下,搜索 “mac 证书 自签名”应该就可以搜到
2023-08-17
共4条回复

音视频小白系统入门课 音视频基础+ffmpeg原理

掌握音视频采集、编解码、RTMP传输协议等核心基础

2318 学习 · 813 问题

查看课程