Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[solved] How to use Ices in conjunction with other apps?

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
dash123



Joined: 20 Jul 2010
Posts: 13

PostPosted: Fri Oct 28, 2011 12:33 pm    Post subject: [solved] How to use Ices in conjunction with other apps? Reply with quote

Hi,

i would like to know how to use Ices in conjunction with other applications? I found this documentation where is written (http://www.icecast.org/docs/ices-2.0.0/faq.html)

Code:
Ices can still be used in conjunction with other applications such as xmms by making ices read from the say the dsp (eg oss, alsa etc), that way anything that is played by that other application is encoded and sent to icecast.


I think ices can't stream from standard alsa output, but only from Mic.
Thanks for answers!


Last edited by dash123 on Tue Nov 01, 2011 2:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Oct 28, 2011 12:56 pm    Post subject: Reply with quote

oss is more limited here, but the dmix handling in alsa should work well enough.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dash123



Joined: 20 Jul 2010
Posts: 13

PostPosted: Fri Oct 28, 2011 1:32 pm    Post subject: Reply with quote

karlH wrote:
oss is more limited here, but the dmix handling in alsa should work well enough.

karl.


I don't understand this. I create second slave device using dmix and send data there with xmms (for example). After that i somehow configure Ices to capture sound from dmix? Or what?

Could you provide me some documentation, where is this described?
Just could you please explain me principle?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Oct 28, 2011 3:47 pm    Post subject: Reply with quote

you just supply the alsa name for the dmix as the entry in

<module>alsa</module>
<param name="device">mixed</param>

assumes "mixed" is the name instead of default or hw:0,0. It would be just the name that you would supply to arecord to capture the raw audio.

You may find that pulseaudio can do the mixing and you just use the alsa name to get access to pulseaudio.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dash123



Joined: 20 Jul 2010
Posts: 13

PostPosted: Fri Oct 28, 2011 9:39 pm    Post subject: Reply with quote

Alsa handle (using dmix plug-in) mixing streams and Ices connects to these streams and capture, right? But i still can't get it. When i run ices with dmix plugin, it outputs
Quote:
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream

I tried to run with dsnoop plug-in and it works, but it's capturing only Mic. So i search more and find out asymed plug-in. If i run ices with asymed, it works. After that i wanted to capture wav file (using ices) playing to asymed, but it outputs
Quote:
aplay -D asymed Downloads/test.wav
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
aplay: main:660: audio open error: Device or resource busy


I am confused now, how can i arrange my goal? Could you please point me on right direction? Thanks!

Here is my .asoundrc
Code:

pcm.!default {
        type plug
        slave.pcm "asymed"
}

#asym fun start here. we define one pcm device called "dmixed"
pcm.dmixed {
        ipc_key 1025
        type dmix
        slave.pcm "hw:0,0"
}

#one called "dsnooped" for capturing
pcm.dsnooped {
        ipc_key 1027
        type dsnoop
        slave.pcm "hw:0,0"
}

#and this is the real magic
pcm.asymed {
        type asym
        playback.pcm "dmixed"
        capture.pcm "dsnooped"
}

#a quick plug plugin for above device to do the converting magic
pcm.pasymed {
        type plug
        slave.pcm "asymed"
}

#a ctl device to keep xmms happy
ctl.pasymed {
        type hw
        card 0
}

#for aoss:
pcm.dsp0 {
        type plug
        slave.pcm "asymed"
}

ctl.mixer0 {
        type hw
        card 0
}
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Oct 29, 2011 1:55 am    Post subject: Reply with quote

you're right, dsnoop is for capture, not dmix. Haven't looked in alsa for some time as most of these issues were supposed to of been resolved by now. I know I haven't had to do anything on my setup for some time.

You didn't say so, but I'm assuming the system-wide configuration is not allowing the multiple apps using the 'default' pcm name? and that you are using a reasonably recent alsa lib.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dash123



Joined: 20 Jul 2010
Posts: 13

PostPosted: Tue Nov 01, 2011 10:35 am    Post subject: Reply with quote

karlH wrote:
you're right, dsnoop is for capture, not dmix. Haven't looked in alsa for some time as most of these issues were supposed to of been resolved by now. I know I haven't had to do anything on my setup for some time.

You didn't say so, but I'm assuming the system-wide configuration is not allowing the multiple apps using the 'default' pcm name? and that you are using a reasonably recent alsa lib.

karl.

Of course system-wide configuration is allowing the multiple apps using the 'default' pcm name. Here is my ALSA version.

Code:
[I] media-libs/alsa-lib
     Installed versions:  1.0.24.1(08:44:21 PM 10/14/2011)(alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mmap_emul alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol -alisp -debug -doc -python -static-libs)
     Homepage:            http://www.alsa-project.org/
     Description:         Advanced Linux Sound Architecture Library

[I] media-sound/alsa-headers
     Installed versions:  1.0.24!b!s(01:37:13 PM 08/20/2011)
     Homepage:            http://www.alsa-project.org/
     Description:         Header files for Advanced Linux Sound Architecture kernel modules


I think it's not possible to do what you said with dmix/dsnoop/asym. If you have working configuration using dmix/dsnoop/asym, please send it to me. Anyway I found one "working" manual on the Internet.
http://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge
Using loopback audio device i routed audio from output to input. But streaming audio is slower than in reality Sad I am keep working on the solution. Do you have any idea why this is happening?

EDIT: It's working! I realized i have some other issues not related with this. Cheers!

I tried to use pulse, but there was many issues with inserting JACK modules (module-jack-sink and module-jack-source). This is problematic usually.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber