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​

func (d *Device) Record(ctx context.Context, action, path string) (Recording, error)

Record starts ("start") or stops ("stop", saving to path) a screen recording, or with an empty action asks whether one is running. A relative path is this process's: mobium pipe resolves it before the daemon sees it.

Examples​

Start recording the screen​

if _, err := dev.Record(ctx, "start", ""); err != nil {
return err
}

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​

rec, err := dev.Record(ctx, "stop", "flow.mp4")
if err != nil {
return err
}
fmt.Println(rec.Path, rec.Frames, "frames")

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