question udpsrc pipeline improvements
Sirbu, Dan
Dan.Sirbu at nuance.com
Sun Mar 20 18:52:24 UTC 2022
Hi,
I need to increase performance on an application that uses gstreamer. The original pipeline used was:
"udpsrc name=udpsrc retrieve-sender-address=false reuse=false port=0 caps="application/x-rtp, media=(string)audio, payload=0, clock-rate=(int)8000" ! rtppcmudepay ! queue ! appsink name=appsink emit-signals=true sync=false async=false"
With that pipeline, I would get every 20ms a buffer size of 160 bytes. The initial developer has written in the callback a procedure to accumulate that buffer up to a certain size before processing it.
Since the app in java (and even if it was not), calling a callback every 20ms is a no go - for me at least.
The app does not need to process the audio and it's main role is to convert the rtp pkt into a grpc pkt to be sent out to Azure cloud for processing etc...
I'm looking for such a way that the appsink callback is executed when a certain size (configurable possibly) is available. From my colleagues I got the following pipeline:
"udpsrc name=udpsrc address="${application.gstreamer.ipAddress}" retrieve-sender-address=false reuse=false port={port} caps="application/x-rtp, media=(string)audio, payload=0, clock-rate=(int)8000" timeout=10000000000 ! rtppcmudepay ! rawaudioparse sample-rate=48000 num-channels=1 ! audiobuffersplit output-buffer-duration=1/2 ! appsink name=appsink emit-signals=true sync=false async=false"
Which improved the buffer size. But I'm uncomfortable with it for few reasons:
* 1st - I do not see why I need to parse the audio
* 2nd - the audiobuffersplit does not allow me have different buffer size in appsink
I just need a pipeline that extracts the audio from the RTP packet and adds each buffer upto a certain size then pass that buffer to appsink which will be sent out via grpc.
I've tried different cases but I failed to find the correct pipeline. Any suggestions ?!? Thank you.
BR,
Dan S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220320/9bedfee6/attachment.htm>
More information about the gstreamer-devel
mailing list