I’m running a pipeline for processing multiple jpeg images using “appsrc”,
a simple example pipeline:
pipeline = “appsrc ! jpegdec ! videoconvert ! nvvideoconvert ! videoconvert ! jpegenc ! fakesink”
It woks when I send 1,000 images (bytes format) to “appsrc” with "“end-of-stream”
snippets of codes:
(1) .emit(“push-buffer”, buffered_image)
However, I had to wait until “appsrc” receive “end-of-stream” signal.
The pipeline paused/stalled if I don’t send “end-of-stream” signal at the end of 1,000 images.
It seems like “loop.run()” is waiting for this “end-of-stream” signal to start processing… not sure.
Is there a way to “appsrc” start processing immediately it receive the first image?
My environments are:
- Jetson AGX Orin
- JetPack 5.0.2 (L4T R35.1.0)
- Python 3.8
Could you try to use multifilesrc?
Thanks for reply. Well… however it seems like I cannot use multifilesrc because multifilesrc is reading image files from the local file system, so it doesn’t have a built-in mechanism for receiving image bytes via REST API calls – I need to use xx.emit(“push-buffer”, buffered_image) with rest api call.
Only the thing is that I can send multiple .emit(“push-buffer”, buffered_image) with .emit(“end-of-stream”) at the end, but without .emit(“end-of-stream”) the pipeline (with loop.run()) does not work.
Any suggestions will be appreciated!
And, I also removed “loop.run()” and tried to use rest api call but it requires very strict calls of gst-streamer built-in functions – eventually, it failed.
Is there anyone who successfully run a pipeline without loop.run() when using rest api call (Flask) ?
You can refer to our demo code
Appsrc is driven by callback functions.
g_signal_connect (data.app_source, "need-data", G_CALLBACK (start_feed),
g_signal_connect (data.app_source, "enough-data", G_CALLBACK (stop_feed),
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.