Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Piping Alsa output to ffmpeg and ffserver??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 495

PostPosted: Thu Jan 30, 2014 8:34 am    Post subject: Piping Alsa output to ffmpeg and ffserver?? Reply with quote

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
View user's profile Send private message
wildhorse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2006
Posts: 148
Location: Estados Unidos De América

PostPosted: Thu Jan 30, 2014 6:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 495

PostPosted: Thu Jan 30, 2014 7:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Fri Jan 31, 2014 1:00 am    Post subject: Reply with quote

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
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 495

PostPosted: Fri Jan 31, 2014 4:54 pm    Post subject: Reply with quote

mmhh the line has 60kbytes upstream so it needs to be compressed
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Fri Jan 31, 2014 6:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 495

PostPosted: Wed Feb 05, 2014 8:03 am    Post subject: Reply with quote

Hi all,

I got it working using snd-aloop module and ffserver. Excellent!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16104
Location: Colorado

PostPosted: Thu Feb 06, 2014 12:08 am    Post subject: Reply with quote

Nice. Congratulations.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall 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