How to improve throughput #269
-
PurposeCreate a microservice using gst1 to split videos into image frames and audio. questionHow to use it to improve throughput? processCan GST. init() ->pipeline. init ->pipeline. start ->pipeline. stop ->GST. quit ->GST. deinit() But every time GST is initialized and destroyed in this way, pipline is also. optimizationSo it was transformed into GST. init()&pipeline. init. Pass in parameters when calling. Pipline. start ->GST. main() GST. quit()&pipeline. stop at end or exception questionDoes this method have concurrency issues? What other ways to improve throughput? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Moved to discussions as this is more a series of questions than an issue. Firstly, never, ever call You can create a pipeline per request, or cache and reuse pipelines. Start with the first, and prove you have a throughput issue first. GStreamer will use its own threads for processing anyway - there shouldn't be any concurrency issues with running multiple pipelines at the same time. However, it is highly recommended to use If this is for a commercial project, we can provide additional help with our bindings via www.codelerity.com |
Beta Was this translation helpful? Give feedback.
Moved to discussions as this is more a series of questions than an issue.
Firstly, never, ever call
Gst::deinit
! Please see https://javadoc.io/static/org.freedesktop.gstreamer/gst1-java-core/1.4.0/org/freedesktop/gstreamer/Gst.html#deinit-- CallGst::init
once when you start up - not per pipeline.You can create a pipeline per request, or cache and reuse pipelines. Start with the first, and prove you have a throughput issue first.
GStreamer will use its own threads for processing anyway - there shouldn't be any concurrency issues with running multiple pipelines at the same time. However, it is highly recommended to use
Gst::invokeLater
orGst::getExecutor
to run all Java code interacting …