请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

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

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

3回答

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

0 回复 有任何疑惑可以回复我~
  • 李超 #1
    到课程QQ群里问,并把你的环境详细说一下
    回复 有任何疑惑可以回复我~ 2020-05-09 08:36:29
李超 2020-03-25 23:35:34

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

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_慕雪7269359 #1
    好的,谢谢老师我去试试
    回复 有任何疑惑可以回复我~ 2020-03-25 23:36:59
  • 提问者 qq_慕雪7269359 #2
    用brew install ffmpeg 安装 可以了
    回复 有任何疑惑可以回复我~ 2020-03-26 15:14:34
李超 2020-03-25 22:51:57

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

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_慕雪7269359 #1
    改成mp4 还是不行,但是mp4 可以录制摄像头的 我系统版本是 10.15.4  今天刚刚升级的
    回复 有任何疑惑可以回复我~ 2020-03-25 22:57:17
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信