weixin_39726971
2020-12-08 22:29 阅读 29

AVFoundation input device @ 0x7f95d350a000] Configuration of video device failed, falling back to default.

Summary

AVFoundation input device @ 0x7f95d350a000] Configuration of video device failed, falling back to default.

Debug Info

I am trying to run tests with notes, but as I see it, the problem is in an undefined video device. How to determine?

  • Operating system - macOS.
  • Ruby 2.7.0
  • screen-recorder version - ffmpeg version 4.2.2
  • Recorder parameters

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[AVFoundation input device @ 0x7f95d350a000] Configuration of video device failed, falling back to default.
  • Set ScreenRecorder.logger.level = Logger::DEBUG,

2020-05-08 17:32:03 ScreenRecorder - DEBUG - Command: /usr/local/bin/ffmpeg -y -f avfoundation -pix_fmt uyvy422 -framerate 15.0 -i 1 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" /Users/vitalii-artec3d/Desktop/Work/CRM_specs/downloads/recording.mkv 2> ffmpeg.log

Expected Behavior

Run tests and record test run video

Actual Behavior

The test passes, but the video file is empty


.stop
=> #<:movie:0x00007fd3265c84c8>{:code=>-1094995529, :string=>"Invalid data found when processing input"}},
 ="/Users/vitalii-artec3d/Desktop/Work/CRM_specs/downloads/recording.mkv">
</:movie:0x00007fd3265c84c8>

**~ ffmpeg -f avfoundation -list_devices 1 -i ""**
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[AVFoundation input device @ 0x7fbcd2c01480] AVFoundation video devices:
[AVFoundation input device @ 0x7fbcd2c01480] [0] FaceTime HD Camera
[AVFoundation input device @ 0x7fbcd2c01480] [1] Capture screen 0
[AVFoundation input device @ 0x7fbcd2c01480] [2] Capture screen 1
[AVFoundation input device @ 0x7fbcd2c01480] AVFoundation audio devices:
[AVFoundation input device @ 0x7fbcd2c01480] [0] Built-in Microphone
: Input/output error

该提问来源于开源项目:kapoorlakshya/screen-recorder

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

4条回答 默认 最新

  • weixin_39572316 weixin_39572316 2020-12-08 22:29

    Thanks for the bug report. I'm able to reproduce the error on macOS, but haven't had time to figure out the root cause.

    I'll look into it further in the coming days.

    点赞 评论 复制链接分享
  • weixin_39572316 weixin_39572316 2020-12-08 22:29

    Can you give it another try? I am unable to reproduce the issue today on the same Macbook using the exact same ffmpeg version 4.2.2, and the unit tests pass as well. It's weird... I am still seeing the following warning in the log, but ffmpeg continues with the default device, whatever that is:

    
    Configuration of video device failed, falling back to default.
    

    The resulting file is playable in VLC as well. This is definitely an issue with ffmpeg and not the gem, but I'll look into it further if you're still experiencing this issue.

    点赞 评论 复制链接分享
  • weixin_39726971 weixin_39726971 2020-12-08 22:29

    I understand the problem. In the mac os catalina system, you need to play with the rights for terminals - - Goto System Preferences (Apple sign on top left corner, then menu item System Preferences...), click on the - Security & Privacy item, then on the Privacy tab. - If the Terminal app is listed and is unchecked, click the checkbox, then restart Terminal.app. or Rubymine

    I fixed the problem, the gem works

    点赞 评论 复制链接分享
  • weixin_39572316 weixin_39572316 2020-12-08 22:29

    Ah, that's it! I am able to reproduce it using the Terminal , which doesn't have screen recording permissions, but works fine using RubyMine, which does have the permission.

    Glad you figured it out! Closing ticket.

    点赞 评论 复制链接分享

相关推荐