New question #668968 on Sikuli:
https://answers.launchpad.net/sikuli/+question/668968

I would like to capture my sikulix script run on video - would be very helpful 
when something failed.

I managed to run a video recording with ffmpeg:
https://www.ffmpeg.org/

and the following .bat command launched from sikulix:
D:\ffmpeg.exe -y -rtbufsize 100M -f gdigrab -framerate 30 -offset_x 0 -offset_y 
0 -video_size 1920x1200 -draw_mouse 1 -i desktop -c:v libx264 -r 30 -preset 
ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -movflags +faststart 
"D:\1.mp4"

The problem is that sikulix App.close() and CMD taskkill commands cannot stop 
the recorder.
I need to execute CTRL+C command before or after App.close() or taskkill 
commands - otherwise ffmpeg continues to record.
I know it's possible ti run CTRL+C from sikuli but since my script opens and 
closes lots of windows I'm afraid that .CMD windows could be out of focus when 
it's executed. Sikuli App.focus() method also doesn't work with CMD.exe being 
started by the .bat file.

The other problem that I see in the future is that if something fails and the 
script doesn't get to the commands that would stop the recorder, the recording 
will not stop. Is there a way to run a command that would stop the recording if 
script failed?

I would be happy to hear if someone already get through this and let me know 
how to do it.
I'm not tied to ffmpeg-software, it's just the first thing I tried, if there is 
a better solution I would love to try it.

Thanks in advance.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to