Created
December 2, 2021 01:40
-
-
Save n3k0lai/699f79d054061fc9c2a3a900dd025bdd to your computer and use it in GitHub Desktop.
mirrorandroid.ps1
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
# this script runs an android mirroring | |
# program optimized for capture by stream | |
# https://github.com/Genymobile/scrcpy | |
$scrcpyDir = 'C:\Program Files\scrcpy-win64\' | |
$recordingsDir = 'D:\phone recordings\' | |
# --no-display | |
$AllArgs = @('--max-size', '1920', '--bit-rate', '2m') | |
# if big drive is connected, then record | |
If (Test-Path D:) { | |
$filename = Get-Date -UFormat "recording-%Y-%m-%d-%H:%M:%S" | |
$AllArgs += '--record' | |
$AllArgs += $recordingsDir + $filename | |
} | |
cd $scrcpyDir | |
& $scrcpyDir'scrcpy.exe' $AllArgs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment