macos 下 ffmpeg -f avfoundation -i 1 -r 30 out.yuv 录制失败

来源:2-4 FFmpeg录制命令实战

qq_慕雪7269359

2020-03-25

ffmpeg version 4.2.git Copyright © 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.29)
configuration: --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-libspeex --enable-videotoolbox --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --cc=clang --host-cflags= --host-ldflags=
libavutil 56. 42.101 / 56. 42.101
libavcodec 58. 76.100 / 58. 76.100
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.100 / 7. 77.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[AVFoundation indev @ 0x7fb4cb40ce80] Configuration of video device failed, falling back to default.
[avfoundation @ 0x7fb4cb808200] Selected pixel format (yuv420p) is not supported by the input device.
[avfoundation @ 0x7fb4cb808200] Supported pixel formats:
[avfoundation @ 0x7fb4cb808200] uyvy422
[avfoundation @ 0x7fb4cb808200] yuyv422
[avfoundation @ 0x7fb4cb808200] nv12
[avfoundation @ 0x7fb4cb808200] 0rgb
[avfoundation @ 0x7fb4cb808200] bgr0
[avfoundation @ 0x7fb4cb808200] Overriding selected pixel format to use uyvy422 instead.
2020-03-25 22:33:13.230 ffmpeg[21478:91665] -[AVCaptureScreenInput transportControlsSupported]: unrecognized selector sent to instance 0x7fb4cb70bc50
2020-03-25 22:33:13.230 ffmpeg[21478:91665] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[AVCaptureScreenInput transportControlsSupported]: unrecognized selector sent to instance 0x7fb4cb70bc50’
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2e3c4d07 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff670e95bf objc_exception_throw + 48
2 CoreFoundation 0x00007fff2e443c97 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff2e32957b forwarding + 1427
4 CoreFoundation 0x00007fff2e328f58 _CF_forwarding_prep_0 + 120
5 libavdevice.58.dylib 0x00000001011a587a avdevice_list_output_sinks + 12890
6 libavdevice.58.dylib 0x00000001011a4502 avdevice_list_output_sinks + 7906
7 libavformat.58.dylib 0x000000010187fa3f avformat_open_input + 1231
8 ffmpeg 0x000000010115106e ffmpeg_parse_options + 3374
9 ffmpeg 0x0000000101150691 ffmpeg_parse_options + 849
10 ffmpeg 0x000000010115045d ffmpeg_parse_options + 285
11 ffmpeg 0x0000000101174ae8 main + 296
12 libdyld.dylib 0x00007fff68290cc9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

写回答

3回答

名字一定要很长才不会被别人抢注

2020-04-08

这个问题需要怎么才能解决呢?mac 下尝试了 brew install ffmpeg 也不行

0
1
李超
到课程QQ群里问,并把你的环境详细说一下
2020-05-09
共1条回复

李超

2020-03-25

你这个和另外一个同学的很像呀,你用brew install ffmpeg 的方法安装一下ffmpeg 看看是否可以

0
2
qq_慕雪7269359
用brew install ffmpeg 安装 可以了
2020-03-26
共2条回复

李超

2020-03-25

把.yuv 换为.mp4 试试,你可以加到课程的我QQ群中讨论

0
1
qq_慕雪7269359
改成mp4 还是不行,但是mp4 可以录制摄像头的 我系统版本是 10.15.4 今天刚刚升级的
2020-03-25
共1条回复

经典再升级-FFmpeg5.0核心技术精讲,打造音视频播放器

学好FFmpeg核心技术,做高效,高薪,有竞争力的音视频工程师

2726 学习 · 814 问题

查看课程