Play same audio stream on 2 different audio device

Tim Müller tim at centricular.com
Fri Feb 13 14:59:12 PST 2015


On Fri, 2015-02-13 at 14:14 -0800, ge_keep wrote:

Hi,

> Is it possible to define 2 alsa sinks to play the same audio stream to 2
> different audio devices (or 2 sound cards)?
> For example, if I have 2 audio devices in my system, I would like to be able
> to do something like this:
> 
> gst-launch filesrc location=test.wav ! wavparse ! *alsasink device="hw:0,0"
> ! alsasink device="hw:1,0".*
> 
> will this work? Or can you correct my syntax(pipeline) if you spot the
> problem?

That should be possible. Try something like this:

gst-launch filesrc location=test.wav ! decodebin ! tee name=t \
  t. ! queue ! audioconvert ! audioresample ! alsasink device=hw:0,0 \
  t. ! queue ! audioconvert ! audioresample ! alsasink device=hw:1,0

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list