View previous topic :: View next topic |
Author |
Message |
bastibasti Guru

Joined: 27 Nov 2006 Posts: 559
|
Posted: Thu Jan 30, 2014 8:34 am Post subject: Piping Alsa output to ffmpeg and ffserver?? |
|
|
Hi I have a remote PC and some software that I use does not allow redirecting sound to network stream.
Is it possible that everything that the PC outputs (sound) is piped to a ffmpeg process? (Which will then use ffserver to forward the sound via network)?? |
|
Back to top |
|
 |
wildhorse Tux's lil' helper


Joined: 16 Mar 2006 Posts: 149 Location: Estados Unidos De América
|
Posted: Thu Jan 30, 2014 6:56 pm Post subject: |
|
|
You did not provide us a lot of coherent information. Is this about gladiator movies? Perhaps PulseAudio is what you are looking for. |
|
Back to top |
|
 |
bastibasti Guru

Joined: 27 Nov 2006 Posts: 559
|
Posted: Thu Jan 30, 2014 7:03 pm Post subject: |
|
|
I use this machine as a remote sdr receiver. unfotunately not all software supports pulse. also if I could setup like a virtual soundcard that would pipe into ffmpeg, it would save a lot of messing about with each program. |
|
Back to top |
|
 |
Dominique_71 Veteran


Joined: 17 Aug 2005 Posts: 1598 Location: Switzerland (Romandie)
|
Posted: Fri Jan 31, 2014 1:00 am Post subject: |
|
|
What kind of network is it? If it is a fast network, you can try with netjack (part of jack-audio-connection-kit). With a few lines into ~/.asoundrc, it is possible to interface ALSA and JACK: Using the ALSA JACK PCM plugin. _________________ [[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]] |
|
Back to top |
|
 |
bastibasti Guru

Joined: 27 Nov 2006 Posts: 559
|
Posted: Fri Jan 31, 2014 4:54 pm Post subject: |
|
|
mmhh the line has 60kbytes upstream so it needs to be compressed |
|
Back to top |
|
 |
Dominique_71 Veteran


Joined: 17 Aug 2005 Posts: 1598 Location: Switzerland (Romandie)
|
Posted: Fri Jan 31, 2014 6:37 pm Post subject: |
|
|
JACK can use the opus codec. Anyway, with any ALSA software, the problem is you cannot redirect an ALSA output device to a software. But you can use the snd_loopback module to create a virtual sound card and define it as first sound card. That way, all the ALSA software will use it per default.
When done, you can use the other end of that virtual card to feed ffmpeg or mpd. With mpd, you can even use multiple outputs, as example 1 output for the second and regular ALSA card so you can hear the sound, and another one to stream on the network. I would use mpd for that: http://www.musicpd.org/ _________________ [[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]] |
|
Back to top |
|
 |
bastibasti Guru

Joined: 27 Nov 2006 Posts: 559
|
Posted: Wed Feb 05, 2014 8:03 am Post subject: |
|
|
Hi all,
I got it working using snd-aloop module and ffserver. Excellent! |
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 17123
|
Posted: Thu Feb 06, 2014 12:08 am Post subject: |
|
|
Nice. Congratulations. _________________ I can saw a woman in two, but you won't want to look in the box when I'm through.
For my next trick, I'll need a volunteer. |
|
Back to top |
|
 |
|