FLAC-encoded audio via WebRTC

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FLAC-encoded audio via WebRTC

Soebirk, Thorsten Nordholm

Hello,

 

I have two Gstreamer applications communicating via WebRTC where one application sends audio and video to the other. Audio is currently encoded using OPUS, but I would like to change it to FLAC. The only info I have been able to find about using FLAC and WebRTC is this old thread: http://gstreamer-devel.966125.n4.nabble.com/RTP-payload-for-FLAC-audio-format-td4665972.html, which suggests using rtpgstpay, but I am not sure how to get this to work.

 

My current sender audio pipeline (later connected to webrtcbin) is:

appsrc ! audio/x-raw, channels=1, rate=16000, format=S16LE, layout=interleaved ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! queue ! capsfilter caps=application/x-rtp,media=audio,encoding-name=OPUS,payload=96

 

I have tried changing it to:

appsrc ! audio/x-raw, channels=1, rate=16000, format=S16LE, layout=interleaved ! audioconvert ! audioresample ! queue ! flacenc ! rtpgstpay ! queue ! capsfilter caps=application/x-rtp,media=audio,encoding-name=FLAC,payload=96

 

But this fails with error message:

could not link queue7 to capsfilter6

 

Any idea what I need to do differently?

 

Best regards,

Thorsten

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: FLAC-encoded audio via WebRTC

Tim Müller
On Mon, 2020-08-31 at 09:50 +0000, Soebirk, Thorsten wrote:

Hi Thorsten,

> I have tried changing it to:
>
> appsrc ! audio/x-raw, channels=1, rate=16000, format=S16LE,
> layout=interleaved ! audioconvert ! audioresample ! queue ! flacenc !
> rtpgstpay ! queue ! capsfilter caps=application/x-
> rtp,media=audio,encoding-name=FLAC,payload=96
>

rtpgstpay will output

   application/x-rtp,media=application,encoding-name=X-GST

Note that rtpgstpay is something that will only work with GStreamer
clients, browsers won't be able to handle it.

Cheers
 Tim

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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: FLAC-encoded audio via WebRTC

Soebirk, Thorsten Nordholm
Thanks Tim.

I've changed the pipeline to:

... ! queue ! flacenc ! rtpgstpay ! queue ! capsfilter caps=application/x-rtp,media=application,encoding-name=X-GST

Now I don’t get any errors, but the streams never start. ICE negotiation takes place as usual, but the receiving side no longer gets pad-added signals - neither for audio nor video (which is unchanged). The sending side uses a blocking appsrc to send the audio. The program now pushes buffers for only a few seconds before being blocked - another indication that nothing is streaming.

Am I overlooking something additional that needs to be changed or added on either the sending or receiving side?

Thanks!

/ Thorsten

-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Tim Müller
Sent: 31 August 2020 13:51
To: Discussion of the development of and with GStreamer <[hidden email]>
Subject: Re: FLAC-encoded audio via WebRTC

On Mon, 2020-08-31 at 09:50 +0000, Soebirk, Thorsten wrote:

Hi Thorsten,

> I have tried changing it to:
>
> appsrc ! audio/x-raw, channels=1, rate=16000, format=S16LE,
> layout=interleaved ! audioconvert ! audioresample ! queue ! flacenc !
> rtpgstpay ! queue ! capsfilter caps=application/x-
> rtp,media=audio,encoding-name=FLAC,payload=96
>

rtpgstpay will output

   application/x-rtp,media=application,encoding-name=X-GST

Note that rtpgstpay is something that will only work with GStreamer clients, browsers won't be able to handle it.

Cheers
 Tim

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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel