Skip to main content

record

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Record the screen to a video: start, stop with a path to save it, or omit the action to ask whether a recording is running. These call app_record.

record​

def record(action: str | None=None, path: str | None=None) -> dict

Record the screen: action "start", or "stop" with path to save the video; neither asks whether one is running.

Stop returns the saved file's frames and duration read from its own header. A still screen is one frame on Android, which is not a failure. Raises when a recording could not be finished.

Examples​

Start recording the screen​

device.record("start")

The same call from the command line, mobium record start, printed on an Android 15 emulator:

recording — stop it with action "stop" and a path

Stop, and save the video​

video = device.record("stop", path="flow.mp4")
print(video["frames"], video["duration"])

The same call from the command line, mobium record stop -o flow.mp4, printed on an Android 15 emulator:

saved …/flow.mp4: 54 frames, 1.605s of video, recorded over 1.705s