我试图在2个覆盆子pis之间传输低延迟音频。 gstreamer和ffmpeg都会为我造成2秒以上的延迟。
我和杰克音频一起玩过,在一个单独的本地游戏看起来很有希望。我可以在本地将麦克风输入路由到扬声器,它几乎是瞬间完成的。
但是,我一直无法使用Netjack在设备之间进行路由。
# ON SERVER
jackd -P70 -p16 -t2000 -dalsa -dhw:1 -p128 -n3 -r44100 -s
# ON CLIENT
jackd -v -R -P70 -dnetone -i1 -o1 -I0 -O0 -r44100 -p128 -n3
# ON SERVER
jack_netsource -H < ip address of client >
jack_lsp # list availible connection ports
>system:capture_1
>system:playback_1
>system:playback_2
>netjack:capture_1
>netjack:capture_2
>netjack:capture_3
>netjack:playback_1
>netjack:playback_2
>netjack:playback_3
jack_connect system:capture_1 system:playback_1 # this works
jack_connect system:capture_1 netjack:playback_1 # this doesn't work :(
我从这里提取的大部分启动选项http://wiki.linuxaudio.org/wiki/raspberrypi#using_jack。说实话,我真的不知道他们做了什么。
客户端jackd输出显示
等消息Jack: data not valid
Jack: data not valid
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 6
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
netxruns... duration: 139ms
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 6
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
服务器jack_netsource输出看起来像
current latency 114
current latency 20
current latency 27
current latency 29
current latency 48
current latency 23
current latency 33
current latency 28
current latency 41
current latency 84
current latency 44
并且服务器jackd输出看起来像
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = netjack was not finished, state = Triggered
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = netjack was not finished, state = Triggered
JackEngine::XRun: client = netjack was not finished, state = Triggered
我相信-dnetone
标志表示使用Netjack2。我尝试使用-dnet
标志的Netjack 1会从jack_netsource发出一条Not Connected
条消息,并且:
Jack: CatchHost fd = 5 err = Resource temporarily unavailable
Jack: CatchHost fd = 5 err = Resource temporarily unavailable
Jack: CatchHost fd = 5 err = Resource temporarily unavailable
Jack: CatchHost fd = 5 err = Resource temporarily unavailable
Jack: CatchHost fd = 5 err = Resource temporarily unavailable
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 6
来自客户端的。
答案 0 :(得分:0)
首先在树莓派上,确保你启用了mmap(check here)。
一旦设置好jackd,这是在主设备和从设备之间连接jackd2的基本方法:
在主人身上...... 杰克-d alsa jack_load netmanager 在奴隶...... jackd -r -d net -a ipaddress
此时应该正常工作,不要忘记将netjack上的端口连接到主设备上的系统输入和输出。您可以使用JackPortMonitor或JackPortMonitorGui为您在主服务器上自动连接这些。在这种情况下,主启动看起来像这样: 杰克-d alsa jack_load netmanager JackPortMonitorGui