wait_for_motion doesn't detect motion

23 views
Skip to first unread message

martin...@kentor.se

unread,
Mar 1, 2018, 11:05:55 AM3/1/18
to stb-tester
Hi,

I'm configuring stbt on a new computer using a Magewell Pro Capture HDMI card. It's working fine so far but when I use the wait_for_motion method it times out without detecting motion even though there is clearly video playing and the red rectangles are displayed and all. Even with noise_threshold set to 0.98 it won't work properly. I suspect this is an issue with my gstreamer config. My pipeline looks like this:

source_pipeline = v4l2src device=/dev/video0 ! capsfilter caps="video/x-raw, width=1920, height=1080"

Any recommendations are welcome.

/ Martin

martin...@kentor.se

unread,
Mar 1, 2018, 11:17:41 AM3/1/18
to stb-tester
I changed my pipeline to this and it's better but still not good enough. It's still too unsensitive to motion.

source_pipeline = v4l2src device=/dev/video0 ! videoscale ! video/x-raw,width=1920,height=1080,pixel-aspect-ratio=1/1

Lewis Haley

unread,
Mar 2, 2018, 5:41:48 AM3/2/18
to stb-tester
What does the debug look like? It might be that the capture card is capturing frames faster that the video actually changes, i.e. video is 25fps and your capturing faster than that. this means the motion detection algorithm will be analysing what it this are consecutive but are actually the *same* frame, thus not detecting motion. The debug output will look something like:
- Found motion
- Didn't find motion
- Found motion
- Didn't find motion

In which case, the solution is to force the framerate in your pipeline.

martin...@kentor.se

unread,
Mar 2, 2018, 5:45:41 AM3/2/18
to stb-tester
Yes, you are absolutely right. I changed frame rate in my pipeline this morning and now it's working fine. Makes a lot of sense really. Thanks! :)
Reply all
Reply to author
Forward
0 new messages