Slow Encoding Issue with Gstreamer Jpegenc

Sulthan Amanu sulthan4380 at gmail.com
Sun Jul 23 03:38:15 UTC 2023


Dear Team,

I hope this email finds you well. I am writing to seek your assistance in
resolving a performance issue related to the Gstreamer pipeline with the
Jpegenc element. I have been working on capturing frames from an imx8 board
camera device and encoding them using Gstreamer. However, when I use the
Jpegenc element, I am experiencing a significant decrease in the frame rate.

Below, I have provided three different pipeline commands and their
corresponding frame rates:

*1. Without Jpegenc (Frame Rate: 8)*

gst-launch-1.0 v4l2src device=/dev/video0 !
video/x-raw,width=4192,height=3120 ! videoconvert ! tee name=t ! queue !
fpsdisplaysink sync=false

=false4192,height=3120 ! videoconvert ! tee name=t ! queue ! fpsdisplaysink
sync
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:44.370671000
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
*Total showed frames (357), playing for (0:00:44.370925250), fps (8.046).*

*2. With Tee branch and without jpegenc (Frame Rate: 4.6)*

gst-launch-1.0 v4l2src device=/dev/video0 !
video/x-raw,width=4192,height=3120 ! videoconvert ! tee name=t ! queue !
fpsdisplaysink sync=false t. ! queue  ! fakesink

etting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:33.713813875
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
*Total showed frames (156), playing for (0:00:33.714091500), fps (4.627).*
Freeing pipeline ...

*3. With Jpegenc (Frame Rate: 0.4)*

gst-launch-1.0 v4l2src device=/dev/video0 !
video/x-raw,width=4192,height=3120 ! videoconvert ! tee name=t ! queue !
fpsdisplaysink sync=false t. ! queue ! jpegenc ! fakesink

=false t. ! queue ! jpegenc ! fakesink! tee name=t ! queue ! fpsdisplaysink
sync
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:23.952335250
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
*Total showed frames (14), playing for (0:00:23.952648750), fps (0.584).*

*The following elements are affected by the fakesink and fpsdisplaysink.*

As you can see, the frame rate drops significantly when using Jpegenc. I
have even tried adjusting the `idct-method` and `quality` properties, but
the results are not as expected.

The details of my system are as follows:
- Gstreamer version: 1.14
- Linux version: Bionic

I am seeking your expertise to help identify the cause of this slowdown and
suggest possible solutions to resolve the issue. Your assistance in this
matter is highly appreciated.

Looking forward to your prompt response.

Thank you and best regards,
Sulthan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230723/9c5b778a/attachment.htm>


More information about the gstreamer-devel mailing list