Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Vito300187 opened this issue May 8, 2020 · 7 comments

Comments

@Vito300187
Copy link

Vito300187 commented May 8, 2020

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

@recorder.stop
=> #<FFMPEG::Movie:0x00007fd3265c84c8
 @duration=0,
 @invalid=true,
 @metadata={:error=>{:code=>-1094995529, :string=>"Invalid data found when processing input"}},
 @path="/Users/vitalii-artec3d/Desktop/Work/CRM_specs/downloads/recording.mkv">
**~ 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
Copy link
Owner

@Vito300187 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.

@kapoorlakshya
Copy link
Owner

kapoorlakshya commented May 14, 2020

@Vito300187 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.

@Vito300187
Copy link
Author

Vito300187 commented May 15, 2020

@kapoorlakshya 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

@kapoorlakshya
Copy link
Owner

@Vito300187 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.

@alexhaha123
Copy link

@kapoorlakshya 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

thanks, i fixed the problem use your method!

@speeder179
Copy link

@kapoorlakshya 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

it works for me.
thanks

@slhck
Copy link

slhck commented Sep 3, 2024

In recent versions this has been changed, see Screen & System Audio Recording:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants