1

I have a requirement in which I have to maintain 5 independent pipelines simultaneously.

These pipelines are similar and look like this:

udpsrc -> rtppcmadepay -> alawdec -> audioconvert -> audioresample -> voamrwbenc -> rtpamrpay -> udpsink

I have a few questions regarding that:

1, When I am sending one stream (initiate one pipeline), The audio from udpsink is very clear after encoding and decoding. But, as soon as 2 streams are originated (initiated 2 streams), a lot of noise and Jitter is introduced.

Question: Are these 5 pipelines accessing the same udpsrc or other elements (even though I have created them each time for every pipeline), and thus introduction the jitter or noise?

2, In such a encoding-decoding call, may you please tell me the amount of CPU that this is suppose to take? In my case, it varies from 4-7% in one call (input streams) and nearly 50-80% for 5 calls (input streams).

Is this behavior normal?

Shouldn't the increase in CPU be linear as each pipeline is expected to take the same amount of CPU provided? The elements in each of them are same and the work for them is also same.

Thanks for the help in advance and pardon for grammar.

nayana
  • 3,787
  • 3
  • 20
  • 51
  • This can be many reasons, you should tell us more about your implementation. Programming language, how do you separate the pipelines (classes? modules? threads? processes?). No the "same" udpsink is not shared. But if you do not separate the event loops (not sure what you use) or run all this in one thread the processing of each pipeline will keep interupting each other. For experiment, please try adding "queue2" into each pipeline after udpsrc or after audioresample (to separate decoding and encoding stages). The queue elements are creating another thread for the rest of pipeline. – nayana Feb 06 '21 at 18:23
  • I am using C as a language, I have created a structure which contains 3 elements (Pipeline, GMainLoop, and status_of_that_pipeline[ Free or Occupied ]). As soon as I receive a request, I set the state of GST_PLAYING for say pipeline[i], after setting necessary variables of udpsink and udpsrc corresponding to the pipeline[i] and start the GmainLoop corresponding to that pipeline[i]. Ofcourse, the queue element is added just after the udpsrc for each pipeline, but that does not make any difference to the performance. – Piyush Badkul Feb 07 '21 at 18:51
  • Each pipeline is different but they contains the same name of elements as "udpsrc0". Can that cause a problem? All the pipelines are opened a single process, We are not explicitly opening any threads to run the pipeline (depending only on queues) Is there any more information i can provide to you? – Piyush Badkul Feb 07 '21 at 19:08
  • hm, are you using different udp ports for the input and output? yes you can: https://stackoverflow.com/help/minimal-reproducible-example please understand that this can be a problem in your architecture, how will I know what you are doing just based on the list of elements you use and rough explanation? Unless you put effort in more debugging and provide details of your findings nobody will help you :) – nayana Feb 08 '21 at 11:27

0 Answers0