2016-03-29 46 views
0

我正試圖在2個樹莓皮之間傳輸低延遲音頻。 gstreamer和ffmpeg都會爲我造成2+秒的延遲。無法通過LAN獲取JACK Audio/Netjack

我已經和Jack Audio一起玩過,並且在一個單獨的pi上玩得很開心。我可以將麥克風輸入路由到本地揚聲器,而且幾乎是瞬間的。

但是,我一直無法讓它在使用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。 Netjack 1,我已經與-dnet標誌結果試圖在單個Not Connected消息從jack_netsource和:

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 

從客戶端jackd。

+0

您是否曾經使用過該產品?我想嘗試這個解決方案進行遠程在線排練。 – cayblood

+0

我認爲Jack對網絡延遲非常敏感。我不認爲傑克適用於遠程或無線設置 – James

回答

0

首先在樹莓派上,確保啓用了mmap(check here)。

一旦jackd的設置是否正確,這是基本的方法來獲取jackd2連接主機和從機之間:

在主... jackd -d ALSA jack_load netmanager 在奴隸... jackd -r -d net -a ipaddress

此時應該正常工作,不要忘記將netjack的端口連接到主站上的系統輸入和輸出。您可以使用JackPortMonitor或JackPortMonitorGui在主設備上爲您自動連接這些設備。在這種情況下,主啓動看起來像這樣: jackd -d alsa jack_load netmanager JackPortMonitorGui