rainer
rainer

Reputation: 7099

gstreamer pipeline only generates mono stream

I'm trying to get UPNP streaming to work. Rygel runs fine, however, all I get is a mono stream, even if the input is stereo. Doing some debugging, I replicated Rygel's gstreamer pipeline with

gst-launch-1.0 pulsesrc device=upnp.monitor num-buffers=100 ! audioconvert ! lamemp3enc target=quality quality=6 ! filesink location=test.mp3

where the problem is also apparent:

mp3info -x test.mp3
...
Media Type:  MPEG 1.0 Layer III
Audio:       Variable kbps, 44 kHz (mono)
...

Where does this pipeline lose the second channel? How can I debug this?

Upvotes: 0

Views: 2336

Answers (2)

ensonic
ensonic

Reputation: 3440

You never ask for stereo:

gst-launch-1.0 pulsesrc device=upnp.monitor num-buffers=100 ! "audio/x-raw,channels=2" ! audioconvert ! lamemp3enc target=quality quality=6 ! filesink location=test.mp3

Upvotes: 1

Havard Graff
Havard Graff

Reputation: 2840

Add a -v to the launch-line to see all the caps negotiated on all pads of the pipeline. Look for "channels" and see where it goes from 2 to 1.

Upvotes: 0

Related Questions