Last active
August 29, 2015 13:56
-
-
Save mjdorma/9045317 to your computer and use it in GitHub Desktop.
pyvbox: Video capture to file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""pyvbox: Video capture to file. | |
""" | |
import os | |
import time | |
import virtualbox | |
# Assume machine is already running. | |
vbox = virtualbox.VirtualBox() | |
machine = vbox.find_machine("win7") | |
session = machine.create_session() | |
# Capture 60 seconds of video from the display. | |
session.machine.video_capture_file = os.path.abspath("test.webm") | |
session.machine.video_capture_enabled = True | |
time.sleep(60) | |
session.machine.video_capture_enabled = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment