Genymobile / Genymobile/scrcpy

Can scrcpy executed using Runtime java?

Open
#3,597 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
150k
Forks
13.7k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

Hello, everyone,

Can scrcpy executed using Process Builder? specifically, the screen record. Thanks in advanced!

ProcessBuilder processBuilder = new ProcessBuilder();
// Windows
processBuilder.command("cmd.exe", "/c", "scrcpy -s DEVICE ID --no-display --record=C:\\scrcpy\\test123.mp4");

try {

Process process = processBuilder.start();

BufferedReader reader =
new BufferedReader(new InputStreamReader(process.getInputStream()));

String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}

int exitCode = process.waitFor();
System.out.println("\nExited with error code : " + exitCode);

} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository files or tests are named in the issue. Start by reproducing the Windows ProcessBuilder command with scrcpy's --record option, then verify whether the process exits successfully and creates test123.mp4.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
cli, mobile
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.