netjack over the internet and minimizing bandwidth

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

netjack over the internet and minimizing bandwidth

Craig Albrecht

Very impressed with the latest implementation of celt compression into netjack. Running jack 0.116.1-1. Working like a champ after working a while with alsa_out settings to get them to where there are very few audio hiccups, even while running over a vpn connection. My question is this: on the master computer, when setting up jack_netsource, if I attempt to disable the midi options by using –I 0 and –o 0, jack_netsource soon gets zombified and shuts down. After playing with it a bit, I found that jack_netsource definitely does not like running with the midi option –o 0 specified, although the lowest I can get the audiostream’s bandwidth with midi enabled is around 120kbps. Disabling it cuts about 80kbps from the stream, but the stream soon dies.

 

If I can get midi disabled for the netjack linkage so the bandwidth requirement can stay around 60kbps, I hope to be able to use it for live remote broadcasts via a broadband cellular data link that may be able to sustain the 120kbps stream, but if I can knock it back to around 60 kbps by setting celt option –c 48 with midi disabled, the stream stands a far better chance of being sustained.

 

Any suggestions would be appreciated.

 

I am currently using jack_netsource –h 192.168.xxx.xxx –C 0 –P 1 –o 0 –l 200 –c 32 and ending up with a 136bps netjack stream. If I add –i 0 to that line, jack_netsource either dies immediately or in less than 20 seconds of being connected, but for the few moments that the stream stays alive, the bitrate was around 70-80kbps if I remember correctly, which would be ideal for a radio remote broadcast if it could be sustained.

 

Thanks,

 

Craig Albrecht

WBCL Radio Network

Taylor University Broadcasting, Inc.

Fort Wayne, IN   USA


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Craig Albrecht
I am new to using svn but here's how I did it - hope it is correct: Downloaded jack-audio-connection-kit-0.116.2 (since I had been running 116.1) and then copied the new netjack driver folder from the svn tree into the drivers/netjack folder of the 116.2 package and replaced all identical filenames using the versions from svn. Recompiled and installed the modified 116.2 package, and tried using "-i 0" when launching jack_netsource on the master machine. That part worked great - no jack_netsource crash. When I recompiled the modified 116.2 package on the slave machine, however, things looked good and I was able to get through doing '/usr/local/bin/jackd -d net -c 256' and invoking 'alsa_out' just fine, but when I went to qjackctl to make the connections so I could hear audio, there were no audio devices in qjackctl for me to connect. I had to downgrade back to 116.1 to be able to see audio devices again in qjackctl.

I think the problem with not seeing audio devices is a 116.2 problem rather than a problem with your fix for the netjack -i issue, though. If I compile and install the unmodified 116.2 package, I still don't see audio devices in qjackctl. Don't know why.
I will add your updated netjack driver to the 116.1 source package and recompile and use that for bandwidth testing for now.

I am wondering if I should start using jack2 since it looks like jack1 is going to be made obsolete eventually (if I understand correctly.)

Thanks again... will keep you posted on how it goes. Any clue about not having audio devices displayed with 116.2 in qjackctl 0.2.21-1ubuntu1?

Craig Albrecht
WBCL Radio Network
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Thursday, February 12, 2009 5:12 AM
To: Craig Albrecht
Subject: Re: [Jack-Devel] netjack over the internet and minimizing bandwidth

On Tue, Feb 03, 2009 at 12:59:38PM -0500, Craig Albrecht wrote:

> Very impressed with the latest implementation of celt compression into
> netjack. Running jack 0.116.1-1. Working like a champ after working a
> while with alsa_out settings to get them to where there are very few
> audio hiccups, even while running over a vpn connection. My question is
> this: on the master computer, when setting up jack_netsource, if I
> attempt to disable the midi options by using -I 0 and -o 0,
> jack_netsource soon gets zombified and shuts down. After playing with it
> a bit, I found that jack_netsource definitely does not like running with
> the midi option -o 0 specified, although the lowest I can get the
> audiostream's bandwidth with midi enabled is around 120kbps. Disabling
> it cuts about 80kbps from the stream, but the stream soon dies.
>
>
>
> If I can get midi disabled for the netjack linkage so the bandwidth
> requirement can stay around 60kbps, I hope to be able to use it for live
> remote broadcasts via a broadband cellular data link that may be able to
> sustain the 120kbps stream, but if I can knock it back to around 60 kbps
> by setting celt option -c 48 with midi disabled, the stream stands a far
> better chance of being sustained.

uhuu :)
i should really get around to reducing the packet header size.
right now the header is taking 48 bytes, the same size as your audio
data.

please keep me updated on your progress.
i tend to get demotivated when i have the impression nobody is using
it anyways.

>
>
>
> Any suggestions would be appreciated.

use svn :)

found the bug. committing to svn as i speak.
thanks for the report.

bah. i should have read jack-dev more frequently.
it would have made it into jack-0.116.2


>
>
>
> I am currently using jack_netsource -h 192.168.xxx.xxx -C 0 -P 1 -o 0 -l
> 200 -c 32 and ending up with a 136bps netjack stream. If I add -i 0 to
> that line, jack_netsource either dies immediately or in less than 20
> seconds of being connected, but for the few moments that the stream
> stays alive, the bitrate was around 70-80kbps if I remember correctly,
> which would be ideal for a radio remote broadcast if it could be
> sustained.
>
>
>
> Thanks,
>
>
>
> Craig Albrecht
>
> WBCL Radio Network
>
> Taylor University Broadcasting, Inc.
>
> Fort Wayne, IN   USA
>

> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org


--
torben Hohn
http://galan.sourceforge.net -- The graphical Audio language
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Paul Davis


On Thu, Feb 12, 2009 at 6:50 PM, Craig Albrecht <[hidden email]> wrote:
I am new to using svn but here's how I did it - hope it is correct: Downloaded jack-audio-connection-kit-0.116.2 (since I had been running 116.1) and then copied the new netjack driver folder from the svn tree into the drivers/netjack folder of the 116.2 package and replaced all identical filenames using the versions from svn.

can you explain why you took these extraordinarily complex and odd steps?  if you want to use svn, then just build the svn tree itself. in addition, it isn't clear whether you installed the new hybrid version that you built *over* the original on your system or next to it. i don't know how we can make it more clear that you can never have two versions of JACK installed on the same machine.  i also don't know how we make it more clear that almost all debian-derived distributions have a botched packaging of JACK that frequently causes problems when people try to install a new version from source.



_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Craig Albrecht

I’m using RapidSvn gui. Checked out a new working copy of the tree, tried to start the build with ./configure , but got the error that there was no configure.in. I don’t know enough about the process to know what configure.in is exactly, but I saw that the full download of .116.2 has the configure.in files which apparently the build process on debian was looking for.  I am probably misunderstanding something in the build process, but I could not get the working copy from the tree to build so I copied the modified source for the netjack driver to the .116.2 version which would compile.

 

I do all invocations of jackd on the computer by specifying /usr/local/bin/jackd to make sure that the newly created version of jackd is the one that the computer is running.

 

Found the problem with qjackctl not showing the jack .116.2 audio devices – seems to be a problem with my installation not having libqt4 which the latest version of qjackctl wants. Oddly qtjackctl on that machine works fine with .116.1. Due to dependency issues, I have not upgraded that rig to libqt4 as yet. However, running .116.2 on UbunstStudio Intrepid works fine and qjackctl works properly with it, presumably because qtjackctl is a newer version on that distro and libqt4 is installed by default.

 

Surely there is an easier way to build the svn version but in my lack of experience using svn I have not found any other way to do it due to the seemingly missing configure.in files in the svn version.

 

From: Paul Davis [mailto:[hidden email]]
Sent: Friday, February 13, 2009 4:11 AM
To: Craig Albrecht
Cc: [hidden email]
Subject: Re: [Jack-Devel] netjack over the internet and minimizing bandwidth

 

 

On Thu, Feb 12, 2009 at 6:50 PM, Craig Albrecht <[hidden email]> wrote:

I am new to using svn but here's how I did it - hope it is correct: Downloaded jack-audio-connection-kit-0.116.2 (since I had been running 116.1) and then copied the new netjack driver folder from the svn tree into the drivers/netjack folder of the 116.2 package and replaced all identical filenames using the versions from svn.


can you explain why you took these extraordinarily complex and odd steps?  if you want to use svn, then just build the svn tree itself. in addition, it isn't clear whether you installed the new hybrid version that you built *over* the original on your system or next to it. i don't know how we can make it more clear that you can never have two versions of JACK installed on the same machine.  i also don't know how we make it more clear that almost all debian-derived distributions have a botched packaging of JACK that frequently causes problems when people try to install a new version from source.

 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Craig Albrecht
In reply to this post by Paul Davis

PS – in my reply I accidently called qjackctrl by the wrong name qtjackctl a couple of times. I meant qjackctl.

 

From: Paul Davis [mailto:[hidden email]]
Sent: Friday, February 13, 2009 4:11 AM
To: Craig Albrecht
Cc: [hidden email]
Subject: Re: [Jack-Devel] netjack over the internet and minimizing bandwidth

 

 

On Thu, Feb 12, 2009 at 6:50 PM, Craig Albrecht <[hidden email]> wrote:

I am new to using svn but here's how I did it - hope it is correct: Downloaded jack-audio-connection-kit-0.116.2 (since I had been running 116.1) and then copied the new netjack driver folder from the svn tree into the drivers/netjack folder of the 116.2 package and replaced all identical filenames using the versions from svn.


can you explain why you took these extraordinarily complex and odd steps?  if you want to use svn, then just build the svn tree itself. in addition, it isn't clear whether you installed the new hybrid version that you built *over* the original on your system or next to it. i don't know how we can make it more clear that you can never have two versions of JACK installed on the same machine.  i also don't know how we make it more clear that almost all debian-derived distributions have a botched packaging of JACK that frequently causes problems when people try to install a new version from source.

 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Paul Davis
In reply to this post by Craig Albrecht


On Fri, Feb 13, 2009 at 2:37 PM, Craig Albrecht <[hidden email]> wrote:

I'm using RapidSvn gui. Checked out a new working copy of the tree, tried to start the build with ./configure , but got the error that there was no configure.in

it is conventional among most software projects to not commit generated files (like configure) into the repository. therefore, you will find in most project's svn checkout a script called "autogen.sh" or "auto.svn" or something similar that is intended to be run to generate the files that would appear in a regular tarball source release. this includes, for example, ./configure. 

I do all invocations of jackd on the computer by specifying /usr/local/bin/jackd to make sure that the newly created version of jackd is the one that the computer is running.

this is not sufficient. it is very hard to get people to understand that JACK is both a server application AND a library. it is critically important that both the server and the library used by applications come from the same build/release. just because you start jackd using an explicit path does not stop a jack client from using the jack library from some other installation.
 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Craig Albrecht
In reply to this post by Paul Davis

Last correction (I hope) – /home/craig/Desktop/jack-audio-connection-kit-0.116.2 /configure is what seemed to be missing from the svn version to be able to build directly from it. (not configure.in – I was typing from memory and remembered wrong) – sorry about that. I am probably missing something very obvious in order to be able to build the version from svn, but don’t know what.

 

Craig

 

From: Paul Davis [mailto:[hidden email]]
Sent: Friday, February 13, 2009 4:11 AM
To: Craig Albrecht
Cc: [hidden email]
Subject: Re: [Jack-Devel] netjack over the internet and minimizing bandwidth

 

 

On Thu, Feb 12, 2009 at 6:50 PM, Craig Albrecht <[hidden email]> wrote:

I am new to using svn but here's how I did it - hope it is correct: Downloaded jack-audio-connection-kit-0.116.2 (since I had been running 116.1) and then copied the new netjack driver folder from the svn tree into the drivers/netjack folder of the 116.2 package and replaced all identical filenames using the versions from svn.


can you explain why you took these extraordinarily complex and odd steps?  if you want to use svn, then just build the svn tree itself. in addition, it isn't clear whether you installed the new hybrid version that you built *over* the original on your system or next to it. i don't know how we can make it more clear that you can never have two versions of JACK installed on the same machine.  i also don't know how we make it more clear that almost all debian-derived distributions have a botched packaging of JACK that frequently causes problems when people try to install a new version from source.

 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

John Rigg-3
On Fri, Feb 13, 2009 at 05:55:20AM -0800, Craig Albrecht wrote:
> Last correction (I hope) - /home/craig/Desktop/jack-audio-connection-kit-0.116.2 /configure is what seemed to be missing from the svn version to be able to build directly from it. (not configure.in - I was typing from memory and remembered wrong) - sorry about that. I am probably missing something very obvious in order to be able to build the version from svn, but don't know what.

To build from svn, first run ./autogen

Then run ./configure --prefix=/usr  
(assuming you want it in /usr and not /usr/local).

It's the same as compiling from a tarball except for the extra
./autogen step at the beginning.

John
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Craig Albrecht
Hey thanks!!

-----Original Message-----
From: John Rigg [mailto:[hidden email]]
Sent: Friday, February 13, 2009 9:26 AM
To: Craig Albrecht
Cc: [hidden email]
Subject: Re: [Jack-Devel] netjack over the internet and minimizing bandwidth

On Fri, Feb 13, 2009 at 05:55:20AM -0800, Craig Albrecht wrote:
> Last correction (I hope) - /home/craig/Desktop/jack-audio-connection-kit-0.116.2 /configure is what seemed to be missing from the svn version to be able to build directly from it. (not configure.in - I was typing from memory and remembered wrong) - sorry about that. I am probably missing something very obvious in order to be able to build the version from svn, but don't know what.

To build from svn, first run ./autogen

Then run ./configure --prefix=/usr
(assuming you want it in /usr and not /usr/local).

It's the same as compiling from a tarball except for the extra
./autogen step at the beginning.

John
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

torbenh
On Fri, Feb 13, 2009 at 06:17:02AM -0800, Craig Albrecht wrote:
> Hey thanks!!

so did you succeed with the svn build now ?
the current fix in svn is for every netjack instance which wants to
receive a stream with 0 channels.

i would also be interested in how alsa_out in svn works for you currently.
i changed somestuff, and it got much better in syncing to a local
soundcard.

i did not conduct tests for a clock passing through an internet link.


--
torben Hohn
http://galan.sourceforge.net -- The graphical Audio language
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Craig Albrecht
In reply to this post by Craig Albrecht
Well, as I have time I am continuing to work with this with the hope of having it ready to use for the kickoff of our spring/summer/fall remote broadcast season in May. The concept of incorporating celt in netjack is what has me so excited about using linux on the equipment that we take out on the road. Had previously tried LDAS (low delay audio streamer) developed by a couple of people at the Norwegian University of Science and Technology as a real time audio ip transport research package for Linux. I don't think this project is currently under active development. The crowning jewel of this project would have been celt integration, but my programming skills are not at a point at which I feel ready to tackle something like that. The Llcon audio software, (Low-Latency (Internet) Connection tool) appears to possibly be a windows port of the LDAS concept, successfully combined with data compression. I have not been able to find a Linux version of that, however, and since I am tr
 ying to become as familiar with Linux audio architecture as I can in the time that I have to devote to it, I am trying to stick with Linux for setting up a "remote laptop" this year as a personal learning project. Thanks to John Rigg and Paul Davis for the helpful pointers along the way as I stumble through learning how to use svn and such.

Using Torben's mod, bidirectional audio bandwidth is running at around 80 kbps up and down using a celt compression setting of -c 24 when starting jack_netsource. I found that running this on a real time kernel is definitely important, and I am running the audio through 4000 miles of 256 bit AES encrypted vpn internet linkage with delay of only about 2 tenths of a second from one end of the connection to the other, which is fabulous.  We ordered the field laptop yesterday on which the system will be permanently installed. Planning to use an evdo cellular pcmcia card on the remote laptop along with some sort of USB mic preamp. M-Audio makes a decent one that we are using for another purpose.

One thing I do not understand as well as I want to is the in's and out's of alsa_in and alsa_out. In order to get acceptably stable audio on the remote end, I need to start alsa_out with a command such as this: "alsa_out -d hw:0 -p 4092 -f 1200000000 -m 2048", and a jack_netsource command such as "jack_netsource -h xxx.xxx.xxx.xxx -C 1 -P 1 -i 0 -o 0 -l 1000 -c 128 -R 2". I found those alsa_out numbers by hours of trial and error, and still get occasional audio hiccups which may be inevitable with low delay UDP/IP.

What I don't exactly understand (or even vaguely, for that matter) is exactly what the alsa_out -f setting is and does, (what is "catch factor"?) and why I need to use such a high number for it. Whatever it is and does, tweaking it seems to have a very significant effects in terms of getting stable audio via the netjack connection. What is its range of settings? Same for -m ("max_diff"). Don't understand what it does beyond the very helpful info found at http://trac.jackaudio.org/wiki/WalkThrough/User/NetJack and http://trac.jackaudio.org/wiki/WalkThrough/User/AlsaInOut ,but finding just the right setting for it seems essential for stable audio over a prolonged period of time.

I have had remarkably stable -c 256 stereo audio constantly for more than 12 hours over a vpn between my house and the radio station using alsa_out -d hw:0 -p 4092 -f 1200000000 -m 2048. Seems like different -c settings in jack_netsource require some corresponding adjustment of the -f and/or -m settings in alsa_out in order to get stable audio for prolonged periods of time. I am guessing that -f may have something to do with jitter buffering, but I can't say for sure. I would definitely like to know what -f and -m adjustments actually do, though. Same for the latency factor of 1000 in the nack_netsource line. It seems to significantly help stabilize the audio and minimize clicks and pops without adding noticeable additional latency. Any guidance along the lines of what alsa_out's -f and -m parameters actually do would be very much appreciated.

Also, what kind of timeframe until jack 2.0 is out? Looks like the automatic MTU adjustments could make a potentially good improvement for remote radio broadcasting applications via cellular data networks in particular. How similar will jack 2.0 be to the current jack 0.116 release particularly in terms of netjack and celt? Wondering if I should just wait for jack 2.0 or go ahead and invest the time to dial in the settings that work best for stable low delay audio on evdo networks on that remote laptop. So far all of my testing has been on broadband wired internet connections and I suspect that the evdo "broadband" cellular internet service on the laptop will be vastly less stable in terms of dropped packets and jitter.

Thanks for a job well done and a fine work in progress.

Thanks for finding that midi bug, Torben. Made a big difference. Will post again when the system is tweaked up on the laptop.

Craig Albrecht
WBCL Radio Network / Taylor University
Fort Wayne, Indiana USA


-----Original Message-----
On Tue, Feb 03, 2009 at 12:59:38PM -0500, Craig Albrecht wrote:

> Very impressed with the latest implementation of celt compression into
> netjack. Running jack 0.116.1-1. Working like a champ after working a
> while with alsa_out settings to get them to where there are very few
> audio hiccups, even while running over a vpn connection. My question is
> this: on the master computer, when setting up jack_netsource, if I
> attempt to disable the midi options by using -I 0 and -o 0,
> jack_netsource soon gets zombified and shuts down. After playing with it
> a bit, I found that jack_netsource definitely does not like running with
> the midi option -o 0 specified, although the lowest I can get the
> audiostream's bandwidth with midi enabled is around 120kbps. Disabling
> it cuts about 80kbps from the stream, but the stream soon dies.
>
>
>
> If I can get midi disabled for the netjack linkage so the bandwidth
> requirement can stay around 60kbps, I hope to be able to use it for live
> remote broadcasts via a broadband cellular data link that may be able to
> sustain the 120kbps stream, but if I can knock it back to around 60 kbps
> by setting celt option -c 48 with midi disabled, the stream stands a far
> better chance of being sustained.

uhuu :)
i should really get around to reducing the packet header size.
right now the header is taking 48 bytes, the same size as your audio
data.

please keep me updated on your progress.
i tend to get demotivated when i have the impression nobody is using
it anyways.

>
>
>
> Any suggestions would be appreciated.

use svn :)

found the bug. committing to svn as i speak.
thanks for the report.

bah. i should have read jack-dev more frequently.
it would have made it into jack-0.116.2


>
>
>
> I am currently using jack_netsource -h 192.168.xxx.xxx -C 0 -P 1 -o 0 -l
> 200 -c 32 and ending up with a 136bps netjack stream. If I add -i 0 to
> that line, jack_netsource either dies immediately or in less than 20
> seconds of being connected, but for the few moments that the stream
> stays alive, the bitrate was around 70-80kbps if I remember correctly,
> which would be ideal for a radio remote broadcast if it could be
> sustained.
>
>
>
> Thanks,
>
>
>
> Craig Albrecht
>
> WBCL Radio Network
>
> Taylor University Broadcasting, Inc.
>
> Fort Wayne, IN   USA
>

> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org


--
torben Hohn
http://galan.sourceforge.net -- The graphical Audio language
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: netjack over the internet and minimizing bandwidth

Susan_84
This post has NOT been accepted by the mailing list yet.
In reply to this post by Craig Albrecht
I also need VPN service which is fast and offers multiple logins so I can share it with my online working team of three people. Is there anyone who can help me buy suggesting the top vpn for windows at affordable price?
Loading...