Strange behavior: Identical images output

Marcus N Schmidt at
Sat Apr 26 14:43:02 PDT 2014


First, I should mention I’m a Gstreamer nub, so there’s a good chance I’m simply missing something...

I’m currently working on an embedded device and am seeing some strange, albeit rare, behavior. Normally, my pipeline pulls buffers from a camera and passes them via appsink to an analyzer. If the buffer meets certain conditions, the analyzer passes it on for encoding to jpeg and then saves to file.

But on rare occasion during high system load, I may find within a set of roughly 100 total image files, 25-30 are literally identical. The only thing differing is the file name… even the checksum is the same between these visually identical images. Also, the file name is simply the system time in milliseconds, which is taken when appsink emits “new-buffer". Now when I look at the file name (e.g. buffer timestamp) for these identical images, I find they all occurred within one second. 

So my questions, if anyone has any ideas, are:

1. How is the pipeline able to send as many as 30 buffers in one second when max-rate=5?
2. When this happens, why are the encoded image files identical in every way, save for the file name?

# pipeline
v4l2src device=/dev/video0 queue-size=8 always-copy=false ! video/x-raw-gray,width=1920,height=1080,framerate=5/1 ! videorate max-rate=5 ! tee name=rawdattee ! queue name=mainrawframeq max-size-buffers=5 ! appsink name=framesink max-buffers=1 emit-signals=true rawdattee. ! queue name=streamingqueue max-size-buffers=2 leaky=2 ! jpegenc ! multipartmux boundary=abcd ! appsink name=streamingsink max-buffers=1 emit-signals=true

# if buffer meets certain conditions, it is then encoded to jpeg and saved to file...
appsrc name=src is-live=true ! jpegenc quality=75 ! appsink name=jpgsink

All thoughts are greatly appreciated.


More information about the gstreamer-devel mailing list