So depending upon your configuration simply changing your audio bit depth to 16 should work with the basic capture syntax:įfmpeg -f avfoundation -i "1:0" Screen. Given that the Soundflower options are recognized as AV Foundation audio devices and are displayed in the output generated by the ffmpeg avfoundation -listdevices command, a basic capture of your desktop ( 1 Capture screen 0) and stereo system sound ( 0 Soundflower (2ch)) would be: ffmpeg -f avfoundation -i '1:0' Screen.mov. Use the avfoundation device: ffmpeg -f avfoundation -listdevices true -i '' This will enumerate all the available input devices including screens ready to be captured. To see all audio tracks in the file youll need to import it into an editor that handles multiple tracks (FCPX, DaVinci Resolve, etc). In the resulting file, ordinary video players will ONLY play one track at a time (like VLC). Note, in Audio Midi Setup.app your "system audio" device will be indicated by a Finder icon and Speaker icon - I use an external monitor through my thunderbolt port and the "system" audio is routed to that device, not the Built-in Speakers. ffmpeg -videosize 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 -f pulse -ac 2 -i default output.mkv macOS. Recording can have multiple audio tracks, but you must enable each individually in Settings > Output > Recording. As far as I know FFmpeg will default to the bit depth of the source. You could change your "speakers" in Audio Midi Setup.app > Audio Devices::Built-in Output::Format until you find something that works, or you could specify the bit depth in the FFmpeg line command to match your settings.
Likely, your audio recording sounds poor because bits are getting truncated.Īs Sarge Borsch notes, your Audio Midi Setup will show you what your bit depth and sample frequency are and give you some options. Indicates that ffmpeg has these formats and bit depths available: u8 8 I suspect that the reason your audio doesn't sound good is due to a bit depth discrepency. Note that the "1:0" is " Capture screen 0: Soundflower (2ch)" Given that the Soundflower options are recognized as AV Foundation audio devices and are displayed in the output generated by the ffmpeg avfoundation -list_devices command, a basic capture of your desktop ( Capture screen 0) and stereo system sound ( Soundflower (2ch)) would be:įfmpeg -f avfoundation -i "1:0" Screen.mov "Speaker" audio is your system audio - what Soundflower is giving you access to.
Is there a way to get output audio? $ ffmpeg -f avfoundation -list_devices true -i ""Ĭonfiguration: -prefix=/usr/local -enable-gpl -enable-nonfree -enable-libass -enable-libfdk-aac -enable-libfreetype -enable-libmp3lame -enable-libopus -enable-libtheora -enable-libvorbis -enable-libvpx -enable-libx264 -enable-libxvid
There are tools available, out of the box, for both and there are lots of great third-party apps too. I am trying to use ffmpeg recording screen as well as incoming audio on mac, but in the input device lists, there is no "speaker". Recording audio or video on macOS is incredibly simple.