Home Apple macos – 15 second delay with ffmpeg when recording from MacBook Professional’s onboard microphone

macos – 15 second delay with ffmpeg when recording from MacBook Professional’s onboard microphone

0
macos – 15 second delay with ffmpeg when recording from MacBook Professional’s onboard microphone

[ad_1]

I’m dealing with a difficulty with ffmpeg on my MacBook Professional. When I attempt to file audio from the onboard microphone utilizing ffmpeg, there is a constant delay of about 15 seconds earlier than it begins recording.

Here is a recording: https://asciinema.org/a/9I7r5KaZw6J6KuUYsws4SWCM5

Command Used:

ffmpeg -v debug -f avfoundation -i ":0" output.wav

Output:

ffmpeg model 6.0 Copyright (c) 2000-2023 the FFmpeg builders
  constructed with Apple clang model 14.0.3 (clang-1403.0.22.14.1)
  configuration: --prefix=/decide/homebrew/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  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
  libpostproc    57.  1.100 / 57.  1.100
Splitting the commandline.
Studying possibility '-v' ... matched as possibility 'v' (set logging degree) with argument 'debug'.
Studying possibility '-f' ... matched as possibility 'f' (drive format) with argument 'avfoundation'.
Studying possibility '-i' ... matched as enter url with argument ':0'.
Studying possibility 'output.wav' ... matched as output url.
Completed splitting the commandline.
Parsing a gaggle of choices: international .
Making use of possibility v (set logging degree) with argument debug.
Efficiently parsed a gaggle of choices.
Parsing a gaggle of choices: enter url :0.
Making use of possibility f (drive format) with argument avfoundation.
Efficiently parsed a gaggle of choices.
Opening an enter file: :0.
[avfoundation @ 0x126f049c0] audio machine 'MacBook Professional Microphone' opened
[avfoundation @ 0x126f049c0] All data discovered

It hangs on Opening an enter file: :0., and [avfoundation @ 0x126f049c0] audio machine 'MacBook Professional Microphone' opened is what appears to be taking the time.

System Data:

  • MacBook Professional 14-inch, 2021
  • macOS model: Ventura 13.4.1
  • ffmpeg model: 6.0

Observations:

  • This delay is constant each time I run the command.
  • I’ve examined the onboard microphone with different apps (like QuickTime) and it begins recording immediately.
  • The issue appears to be distinctive to ffmpeg or my utilization of it.

Does anybody have any thought what is perhaps inflicting this delay, or has anybody encountered an identical situation earlier than? Any insights or options can be significantly appreciated!

Thanks!

[ad_2]