Audio SOX没有从SoundFlower那里得到任何东西

Audio SOX没有从SoundFlower那里得到任何东西,audio,ffmpeg,sox,Audio,Ffmpeg,Sox,由于某些原因,在某些comps SoundFlower上无法捕捉音频。 也就是说,有SoundFlower,但当我将输入\输出切换到SoundFlower时,我无法获得任何声音。我得到的只是没有声音的空文件 好吧,我是如何尝试获得声音的 仅供参考: $system_分析器SPSoftwareDataType 要检查的是AV基础工程: $./ffmpeg-h解复用器=avfoundation 好的,我们在设备中安装了SoundFlower: [AVFoundation输入设备@0x7fda4042

由于某些原因,在某些comps SoundFlower上无法捕捉音频。 也就是说,有SoundFlower,但当我将输入\输出切换到SoundFlower时,我无法获得任何声音。我得到的只是没有声音的空文件

好吧,我是如何尝试获得声音的

仅供参考:

$system_分析器SPSoftwareDataType

要检查的是AV基础工程:

$./ffmpeg-h解复用器=avfoundation

好的,我们在设备中安装了SoundFlower:

[AVFoundation输入设备@0x7fda40421000][2]Soundflower(2ch)

然后我运行AppleScript,它将切换到“SoundFlower(2ch)”:

启用SF(“输入”)

enableSF(“输出”)

其中enableSF(stdname)为:

结果我得到了这个:

input Internal Microphone
input Line In
input Digi CoreAudio Device
input Soundflower (2ch)

        !!! FOUND SF for input Soundflower (2ch)

output Headphones
output Digi CoreAudio Device
output Soundflower (2ch)

        !!! FOUND SF for output Soundflower (2ch)
这意味着我们将切换到SoundFlower。实际上,同样的事情也可以手工完成,但脚本对我来说更可靠

好的,接下来我们可以尝试通过SOX保存一些音频:

$/Applications/sox-14.3.2/sox-d~/Desktop/out.wav

正如你所见,SOX给了我一个空文件。相反,它给出了数据,但没有声音

这在10.10到10.11.6的所有操作系统上都会发生。正常输出应为以下类型:

In:0.00% 00:00:00.28 [00:00:00.00] Out:8.19k [======|======]        Clip:0      
...
...
...
In:0.00% 00:00:04.37 [00:00:00.00] Out:188k  [ -====|===== ] Hd:1.1 Clip:0 
...
...
...     
In:0.00% 00:00:08.82 [00:00:00.00] Out:385k  [======|=====-] Hd:1.1 Clip:0      
In:0.00% 00:00:09.01 [00:00:00.00] Out:393k  [-=====|=====-] Hd:1.1 Clip:0      
In:0.00% 00:00:09.20 [00:00:00.00] Out:401k  [======|======] Hd:1.1 Clip:0 
ffmpeg version 3.1.1-tessus Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[AVFoundation input device @ 0x7fda40421000] AVFoundation video devices:
[AVFoundation input device @ 0x7fda40421000] [0] Built-in iSight
[AVFoundation input device @ 0x7fda40421000] [1] Capture screen 0
[AVFoundation input device @ 0x7fda40421000] AVFoundation audio devices:
[AVFoundation input device @ 0x7fda40421000] [0] Soundflower (64ch)
[AVFoundation input device @ 0x7fda40421000] [1] Built-in Microphone
[AVFoundation input device @ 0x7fda40421000] [2] Soundflower (2ch)
[AVFoundation input device @ 0x7fda40421000] [3] Built-in Input
: Input/output error
on enableSF(stdname)    
    tell application "System Preferences"   
        -- activate 
        tell anchor stdname of pane "com.apple.preference.sound" to reveal  
        tell application "System Events"    
            tell application process "System Preferences"   
                tell tab group 1 of window 1    
                    delay 2 
                    set rowslist to selected of row of table 1 of scroll area 1 
                    set counter to 0    
                    repeat with id in rowslist  
                        set counter to counter + 1  
                        set rowName to (value of text field 1 of row counter of table 1 of scroll area 1)   
                            
                        set output to stdname & " " & rowName   
                        set scrpt to "echo \"" & output & "\" >> ~/Desktop/ds.log"  
                        do shell script scrpt   
                            
                        if (rowName is equal to "Soundflower (2ch)") then   
                            set selected of row counter of table 1 of scroll area 1 to true 
                                
                            set output to "
                            !!! FOUND SF for " & stdname & " " & rowName    
                            set scrpt to "echo \"" & output & "\" >> ~/Desktop/ds.log"  
                            log output  
                            do shell script scrpt
                            exit repeat 
                        end if  
                    end repeat  
                end tell    
            end tell    
        end tell    
    end tell    
end enableSF    
input Internal Microphone
input Line In
input Digi CoreAudio Device
input Soundflower (2ch)

        !!! FOUND SF for input Soundflower (2ch)

output Headphones
output Digi CoreAudio Device
output Soundflower (2ch)

        !!! FOUND SF for output Soundflower (2ch)
Input File     : 'default' (coreaudio)
Channels       : 2
Sample Rate    : 44100
Precision      : 32-bit
Sample Encoding: 32-bit Signed Integer PCM


In:0.00% 00:00:00.00 [00:00:00.00] Out:0     [      |      ]        Clip:0    
...
...
... 
In:0.00% 00:00:02.51 [00:00:00.00] Out:106k  [      |      ]        Clip:0    
...
...
...
In:0.00% 00:00:11.80 [00:00:00.00] Out:516k  [      |      ]        Clip:0    /Applications/sox-14.3.2/sox WARN coreaudio: coreaudio: unhandled buffer overrun.  Data discarded.
...
...
...    
In:0.00% 00:00:12.35 [00:00:00.00] Out:545k  [      |      ]        Clip:0    /Applications/sox-14.3.2/sox WARN coreaudio: coreaudio: unhandled buffer overrun.  Data discarded.
...
...
...
In:0.00% 00:00:13.28 [00:00:00.00] Out:582k  [      |      ]        Clip:0    
Aborted.
In:0.00% 00:00:00.28 [00:00:00.00] Out:8.19k [======|======]        Clip:0      
...
...
...
In:0.00% 00:00:04.37 [00:00:00.00] Out:188k  [ -====|===== ] Hd:1.1 Clip:0 
...
...
...     
In:0.00% 00:00:08.82 [00:00:00.00] Out:385k  [======|=====-] Hd:1.1 Clip:0      
In:0.00% 00:00:09.01 [00:00:00.00] Out:393k  [-=====|=====-] Hd:1.1 Clip:0      
In:0.00% 00:00:09.20 [00:00:00.00] Out:401k  [======|======] Hd:1.1 Clip:0