Help - Search - Members - Calendar
Full Version: HOWTO: Skype and jackd
Skype Community > English > Skype for Linux
scottjw_
I thought I would post on my success in using Skype with jackd (and how to do it!)

It should be noted that this was drawn from other examples on the forum, but I could not find a jack specific post.

First make sure jackd is running use "qjackctl" or a command line like this

CODE
jackd -R -dalsa -dhw:0 -r44100 -p1024 -n2


Second start artsd (v.1.3.2) and start Skype using artsdsp with a script like the following:

CODE


#!/bin/bash



if [ -z "`pidof artsd`" ]; then



       # run with alsa and dmix support        

       #artsd -F 15 -S 128 -r 44100 -b 16 -s 30 -a alsa -d -D asymed &



       #but we use the built in jack support in artsd

       #artsd -F 15 -S 128 -r 44100 -b 16 -s 30 -a jack -d &



       #edit from snappermorgan, the more than 30 second fix!

       artsd -F 15 -S 128 -r 44100 -a jack -d &



       sleep 1

fi



artsdsp -m /usr/bin/skype





Now we can move audio in and out of skype with jack.
snappermorgan_
This has been a holy grail for me. I have spent HOURS trying to get this to work. The artsd approach would not work for until I realized that my distro (ubuntu) did not come with an akode jack plugin. I searched and it looks like most distros do not bundle this plugin with kde or arts. So, I downloaded the source for both arts and kdemultimedia and compiled them both, as they do include jack support.

And it works! but only for around 30 seconds. I have qjackctl runing so I can see the jack connections and artsd shows up as a connection. I can even run skype and get sound to work, and it works beautifully, but alas, after around 30 second, the jack connection for artsd disappears as if the jack plugin seg faults on me.

I have one more package to install and that is kdelibs, which is part of the arts package. I should have compiled and installed it also, but I was impatient. Maybe it has something in it that the plugin needs.

Note: When compiling kdemultimedia, it placed artsd in /usr/share/kde/bin, which is different from the other artsd binary path. I make a symbolic link is usr/bin so as to runt he correct version.

Hope this helps others on there quest for skype-jack interoperatability
scottjw_
I run debian testing and use the following package from that distrobution:
arts 1.3.2-3 which is current.

It seems to include jack support as I did not have to compile anything, but have only tested with echo123 which does not last longer than 30 seconds I think.

Pay attention to the jackd options, as I have had to toggle them at random to find the working config.

CODE
scott@alubox:~$ uname -a



Linux alubox 2.6.8-2-k7 #1 Mon Jan 24 03:29:52 EST 2005 i686 GNU/Linux



CODE


scott@alubox:~$ artsd -v



artsd 1.3.2





CODE


scott@alubox:~$ artsd -A



possible choices for the audio i/o method:



 oss       Open Sound System

 alsa      Advanced Linux Sound Architecture

 null      No Audio Input/Output

 esd       Enlightened Sound Daemon

 jack      Jack Audio Connection Kit

 nas       Network Audio System

 toss      Threaded Open Sound System



snappermorgan_
Holy Batman I got it to work!

The command you list in your example has an option that auto suspends after 30 seconds. I just removed that aoption and it stays up and stable! Here is what I use to launch artsd with jack:

artsd -F 15 -S 128 -r 44100 -a jack -d &

Thanks so much for your help. This is the best thing that's happened in a while for my skype experience. I will be posting my trials and tribulations and hope it helps others.

ciao!
scottjw_
Ha, I am glad it worked, I never tested with more than the echo123 user on skype so I never ran into that problem!

Will they make this thread sticky? Does skype like the audio in/out being used?
scottjw_
This moving audio in and out of Skype without it using the sound card is the first step in my plan.

Next is writting a chan_skype module for asterisk that uses the Skype API for call setup, and passes audio with jack is my next step.

I need to test the audio path more I guess before going further.
snappermorgan_
First, I am not a linux power user. I have used it on and off for several years and only this year have I switched 100% over from Windows. I have recently gotten into podcasting and I wanted to be able to record my skype calls. This board helped me do it with the skype-rec program, and its fantastic for post production, but I wanted to do a live recording using Jack to cut down on production time.

It took me HOURS to figure it out, but I finally have a working solution. I hope that this post will put you on the right path because I had to learn a lot about linux in order to get all the modules working. Here is what I discovered in the process. Your distro will be different and there is no guarantee this will work on your setup, but at least you will have a direction.

1. This first thing you need, of course, is to make sure Skype works. I assume this is the case. No crackles, no hisses, no mickey mouse affect. My skype has worked flawlessly and the sound quality for recording is outstanding.
2. Make sure Alsa is configured correctly. Go to the alsa home page for tips. Read the section on using the asoundrc file. This isn't essential for Skype but it helps in your understanding of the Linux Sound architecture. Before this, I had no idea what the difference was between Jack, Alsa and OSS. Now I do.
3. Install Jack. Do it from source so that you have all the development files for other applications to use. This will help if you need to compile Arts from source with jack support.

Make sure jack is working and also make sure you have it outputing to the alsa driver, not the oss. Our goal is to avoid oss completely. This may not make a difference but it allows you to manipulate your audio streams for any future use using the asoundrc file.

Gettng jack to run is a major hassle. When it works, it works great, but you have to do some major work to get low latency performance. For me, it was a ton of trial and error, but here is what I use for jack.

    A. Ubuntu Hoary 5. This comes with the latest Kernels 2.6+ which allows for jack to run using low latency. This is essential. If you have the 2.4+ kernel you will need to patch it and that is a pain. Its easier just to update your kernel. I recommend a debian system, and Ubuntu is a real charm to use. Out of the box I was able to get Jack to work, but not well. I had to tweak the settings to get good sound.
    B. Qjackctl. This is a graphical app that conrols jack. It is your best friend and allows for making audio stream connections between apps very easily. If you don't get this you are only causing yourself a lot of time and effort.
    C. XMMS with the jack output plugin. I use this app for both testing and production. When you install the plugin, you can go under the preferences and select Jack as the output. This allows you to test your jack setup.


      At first, I could only get clear output with jack by setting it to use the OSS driver. Alsa was crap and worthless. After much tweaking, here is what I found worked.

      CODE
      /usr/bin/jackd -v -m -dalsa -dhw:0 -r48000 -p1024 -n2 -s


      This was the magic sequence that gets me clear sound. testing with xmms confirms this.

      4. artsd and akode. This sound server comes with kde. Its on its way out, but right now this is the only way we can pipe skype over to jack. I could not get this method to work at all, due to the fact that my distro does not include the jack plugin for akode, the system that arts uses for plugins. Check your distro, specifically the akode package for a jack sink plugin. If you can't find it, then do what I did, which was compile it from source. You can get the packages from the main kde site. Be sure you get these two.

        a. arts (latest version)
        b. kdemultimedia

          Compile them both and you should now have jack support. NOTE: your newly compiled version of artsd may have been installed in a different place. My was installed in /usr/local/kde/bin, so I moved them over to my /usr/bin folder and replaced the old ones there. To check whether artsd has jack support, issue this command in your shell:

          CODE
          artsd -A


          This should list all the output plugins. If you see Jack, then you're golden.

          5. You will need a jack aware application to record Skype to. I use the excellent Ardour application. It takes a while to learn, but man it sure is powerful. Install it and learn it. It might take a few days, but you will understand how jack routes sound and the power this gives you. Linux Audio Professionals say this is the only way to record on linux.

          So, here is my sequence. You can put all this into a shell script if you want. Its your choice.

          A. launch jack using Qjackctl. Start Jack server.
          B. launch artsd with jack output using command:

          CODE
          artsd -F 15 -S 128 -r 44100 -a jack -d &


          C. launch skype using artsdsp

          CODE
          artsdsp -m skype  


          You should now see artsd in your qjactctl connections window.

          D. launch ardour. Create tracks and connect artsd to one of the tracks.

          And that's it! Whew!

          Please, I encourage any and all to contribute to this post and hopefully this can be made a sticky.
fast_rizwaan_
Thanks to your suggestion to arts and jackd, I changed it a bit and tried recording Skype conversation.

I used ALSA instead of jackd (I didn't try jackd yet). Anyways a very userfriendly application which can help you record your conversation is this "khdrecord"

http://www.kde-apps.org/content/show.php?content=23699

Thank you again!!!
bonbons_
For those interested, there is oss2jack upcoming which might help get around a lot of issues we have with artsd and esd.

This tools uses fusd to create "userspace character devices" and thus works similar to kernel OSS emulation, but pipes the audio back to userspace for processing by jackd.

oss2jack Homepage

I'm looking for getting it able to offer capture channel and a few more options. Currently only basic playback is possible, but when it works it works fine (depends on what IOCTLs the playback software uses, as oss2jack does not yet support all IOCTLs)

The big advantage is that this dsp allows more than one paralell audiostream, in fact as many as jackd can handle! And all the LD_PRELOAD issues are past story with this! (the tricks used by dsphijacker, artsd, esd, aoss and friends)
xboxrulz_
I use artsdsp right now, so if I just plug-in a microphone and speak, would arts automatically do the voice-in and start sending my voice thru the internet?

xboxrulz
snappermorgan_
[quote=xboxrulz]I use artsdsp right now, so if I just plug-in a microphone and speak, would arts automatically do the voice-in and start sending my voice thru the internet?

xboxrulz[/quote]

Is this question directed at the Jack post or the oss2jack post?
Alexandrer
Hello,
I'm trying to use skype and jackd on Fedora Core 6... Unfortunately, it does not work...

CODE

$ /usr/bin/jackd -v -m -dalsa -dhw:0 -r48000 -p1024 -n2 - s&
$ getting driver descriptor from /usr/lib/jack/jack_dummy .so
getting driver descriptor from /usr/lib/jack/jack_alsa.so
jackd 0.101.1
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
server `default' registered
loading driver ..
registered builtin port type 32 bit float mono audio
new client: alsa_pcm, id = 1 type 1 @ 0x8280a98 fd = -1
apparent rate = 48000
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|soft-mode|32bi t
control device hw:0
configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
Note: audio device hw:0 doesn't support a 32bit sample format so JACK will try a  24bit format instead
Note: audio device hw:0 doesn't support a 24bit sample format so JACK will try a  16bit format instead
nperiods = 2 for capture
nperiods = 2 for playback
new buffer size 1024
registered port alsa_pcm:capture_1, offset = 4096
registered port alsa_pcm:capture_2, offset = 8192
registered port alsa_pcm:playback_1, offset = 0
registered port alsa_pcm:playback_2, offset = 0
registered port alsa_pcm:playback_3, offset = 0
registered port alsa_pcm:playback_4, offset = 0
registered port alsa_pcm:playback_5, offset = 0
registered port alsa_pcm:playback_6, offset = 0
registered port alsa_pcm:playback_7, offset = 0
registered port alsa_pcm:playback_8, offset = 0
++ jack_rechain_graph():
client alsa_pcm: internal client, execution_order=0.
-- jack_rechain_graph()
29080 waiting for signals
load = 0.0117 max usecs: 5.000, spare = 21328.000
load = 0.0223 max usecs: 7.000, spare = 21326.000
load = 0.0275 max usecs: 7.000, spare = 21326.000
load = 0.0255 max usecs: 5.000, spare = 21328.000
load = 0.0292 max usecs: 7.000, spare = 21326.000
load = 0.0333 max usecs: 8.000, spare = 21325.000
load = 0.0307 max usecs: 6.000, spare = 21327.000
load = 0.0294 max usecs: 6.000, spare = 21327.000



Then, when i try to run skype appear an message: ”Problem with sound device”

Can you help me?

QUOTE(scottjw @ Tue May 3 2005, 02:16) [snapback]119479[/snapback]


CODE


#!/bin/bash
if [ -z "`pidof artsd`" ]; then
        # run with alsa and dmix support        

        #artsd -F 15 -S 128 -r 44100 -b 16 -s 30 -a alsa -d -D asymed &
        #but we use the built in jack support in artsd

        #artsd -F 15 -S 128 -r 44100 -b 16 -s 30 -a jack -d &
        #edit from snappermorgan, the more than 30 second fix!

        artsd -F 15 -S 128 -r 44100 -a jack -d &
        sleep 1

fi
artsdsp -m /usr/bin/skype



Alex
thelinuxfr
Do not function with version 1.3… If?
guysoft
Hi all,
I have been trying to get this running myself this morning.
I got as far as running skype and artsd, and when i run skype i get no sound and:
CODE
guy@golem3:~$  /usr/bin/skype
ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dsnoop.c:574:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
....


I ran the following commands:
CODE
root@golem3:/home/guy# jackd -R -dalsa -dhw:0 -r44100 -p1024 -n2
jackd 0.109.2
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback

Then
CODE
root@golem3:/home/guy# artsd -F 15 -S 128 -r 44100 -a jack -d
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.