Streaming in stereo in OPUS

Peter Maersk-Moller pmaersk at gmail.com
Wed Jul 19 07:54:12 UTC 2017


Use the verbose flag to see what is produced

        gst-launch-1.0 -v ....

then you can see if you produce stereo at all.

Raspberry Pi does not have audio input so you added an external audio
capture device I assume. Does it offer stereo?
Even if it does not offer stereo, audioconvert can change channels from
something to stereo if you specify it. The module opusenc will take from
1-8 channels so if your alsasrc is mono, it will take that. You need to
specify that opusenc should ask for stereo.

To force opusenc to encode in stereo, add a format string after
audioconvert.

        gst-launch-1.0 -v audiotestsrc is-live=1 ! audioconvert !
audio/x-raw,channels=2 ! opusenc ! fakesink

If you wan to ensure your source captures in stereo add a format string
before audioconvert

        gst-launch-1.0 -v audiotestsrc is-live=1 ! audio/x-raw,channels=2 !
audioconvert ! opusenc ! fakesink

You may want to add rate to format as well. Not all rates are supported by
opusenc (like 44100) is not supported.
Obviously, you need to replace audiotestsrc with alsasink.

Regards
Peter


On Tue, Jul 18, 2017 at 5:41 PM, TouchOfDestiny <davide.caldelari at gmail.com>
wrote:

> Hi all,
>
> I'm a total newbie here, and I was just wondering how you can stream in
> stereo with the opus encoding. I've done this:
>
> gst-launch-1.0 alsasrc device=hw:1,0 ! audioconvert ! opusenc
> bitrate=128000
> ! rtpopuspay pt=98 ! udpsink host=127.0.0.1 port=8002 videotestsrc ! vp8enc
> ! rtpvp8pay ! udpsink host=127.0.0.1 port=8004
> (in Raspberry with Debian)
>
> But it seems that no stereo is produced. Only mono.
>
> Do you have any idea?
>
> Thank you very much.
> David
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.
> n4.nabble.com/Streaming-in-stereo-in-OPUS-tp4683854.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170719/9f995458/attachment.html>


More information about the gstreamer-devel mailing list