Raw input->JPEGENC - starts out at 50% CPU, slowly goes up to 100% and starts dropping frames

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Raw input->JPEGENC - starts out at 50% CPU, slowly goes up to 100% and starts dropping frames

chazz
Debian 8.6, gstreamer 1.4.4. I know it's not the newest, and I can upgrade if
necessary.

Using the pipeline:

gst-launch-1.0 -e v4l2src device=/dev/video0 !
video/x-raw,width=1920,height=1080,framerate=30/1 ! queue ! jpegenc
quality=95 ! multifilesink location=./tmp/frame%010d.jpg

Input is a magwell USB HDMI capture device.

I normally get CPU usage of about 50% and get roughly 100% of the frames,
writing to a tmpfs location. I analyze some of the JPEGs and throw most out.
After running for about 2 days, the CPU usage of the gstreamer process
creeps up to 100% and it starts dropping about 50% of the frames.

It didn't seem to have a serious memory leak. Any ideas what might be
causing the problem? Also is there any way to speed up this pipeline in
general but achieve the same results?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Raw input->JPEGENC - starts out at 50% CPU, slowly goes up to 100% and starts dropping frames

chazz
Upon reloading gstreamer pipeline and taking notes, and comparing to the old
memory usage readings when it was messing up, I've found that it definitely
has a very slow but probably indeterminate memory leak. Hopefully updating
debian/gstreamer to the latest versions will fix this memory leak.

RES for gst-launch-1.0 at program start is ~10MB, RES after 2 days is
apparently 490MB. After an hour or two it's crept back up to 18MB. However,
it still says that I had a good 500MB memory free, so I'm not sure why it
slowed down so much. It doesn't seem like it should have dipped into swap,
just dumped some cache. Oh well.

I'm currently in the middle of a project and I can't update any software
until it's done. Closing the pipeline/device and reloading it isn't very
reliable for whatever reason (intermittently will hang or fail to open the
device), though, so I can't do that on a regular basis without physically
being around to manually reset or unplug/replug the USB capture card. I
guess I'll just have to do this every couple days until it's finished,
probably within a week.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel