So I think the title explains most of this, I am trying to record my screen on macOS catalina using ffmpeg while directing the audio in using blackhole
I am getting audio in but the sound is crackling, almost sounds like a lag or buffer or something like that.
I am using the command:
ffmpeg -f avfoundation -list_devices true -i ""
Which gives me:
[AVFoundation indev @ 0x7fcf87f06480] AVFoundation video devices:
[AVFoundation indev @ 0x7fcf87f06480] [0] FaceTime HD Camera (Built-in)
[AVFoundation indev @ 0x7fcf87f06480] [1] Capture screen 0
[AVFoundation indev @ 0x7fcf87f06480] [2] Capture screen 1
[AVFoundation indev @ 0x7fcf87f06480] AVFoundation audio devices:
[AVFoundation indev @ 0x7fcf87f06480] [0] BlackHole 2ch
[AVFoundation indev @ 0x7fcf87f06480] [1] Built-in Input
[AVFoundation indev @ 0x7fcf87f06480] [2] BlackHole 16ch
I then run
ffmpeg -f avfoundation -pix_fmt yuyv422 -i "1:0" -ac 2 -ar 48000 -t 20 -vf crop=1280:720:1:65 -r 30 /Users/XXX/Desktop/ScreenRecordings/test2.mkv
which records as expected video is good but it has the bad sound as described.
Note:
- Audio recording with quiktime works perfectly
- Yes, I am rerouting the computer's audio to blackhole 2ch before I run the ffmpeg command
- In the midi sound devices menu I set the output to 48,000 for blackhole 2ch
Does anyone know how to fix the audio?