sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #16037
Re: [Question #221924]: Observe video event in a region using Sikuli
Question #221924 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/221924
Status: Open => Answered
RaiMan proposed the following answer:
The main feature of Sikuli is to detect, wether a given image is present
on the screen (image search).
Depending on size of image and search region (the smaller the search
region and the smaller the difference between size of image and size of
search region the faster the search) one search takes on average some
hundreds of milliseconds.
So to work with Sikuli you need some screen content, that changes its
pixels at a very slow rate or even only by user action. This is why
Sikuli mainly is used for GUI testing and automation.
This is what you could do on video content in a region:
Every second you take a shot of the region and compare it to the shot one second ago. If it has changed, the video might still be running, otherwise it might have stopped.
With the features of Sikuli, you cannot say anything about the quality of an arbitrary video. If you stream some known test image with a steady content, you might be able to check wether some predefined patterns match or not and say something about the streaming quality this way.
running/stopped example:
reg = some_region # the region containing the video content
checkRate = 1 # we check every second
lastContent = capture(reg) # we take a shot
lastCheck = time.time()
while True:
while checkRate > time.time() - lastCheck:
wait(0.1)
if reg.exists(lastContent, 0): # compare
print "video might have stopped"
break # leave the loop
# it seems to run, so lets look again
lastContent = capture(reg)
lastCheck = time.time()
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.