Last active
October 25, 2022 16:29
-
-
Save krokofant/83d9cd1ffd1f2075d8abf8c58883174d to your computer and use it in GitHub Desktop.
Show camera settings
This file contains hidden or 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
<# Show camera settings #> | |
New-Module -ScriptBlock { | |
function Show-CameraSettings { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory, ValueFromPipeline)] | |
[ArgumentCompleter({ | |
param ( | |
[string]$CommandName, | |
[string]$ParameterName, | |
[string]$WordToComplete = '', | |
[System.Management.Automation.Language.CommandAst]$CommandAst, | |
[System.Collections.IDictionary]$FakeBoundParameters | |
) | |
(Get-PnpDevice -PresentOnly -Class Camera,Video,Image).Name | Where-Object { $_ -like "*$($WordToComplete.Trim("'"))*" } | ForEach-Object { "'$_'" } | |
})] | |
[string]$CameraName | |
) | |
# ffmpeg -list_devices true -f dshow -i dummy -hide_banner | |
ffmpeg -f dshow -show_video_device_dialog true -i video="$CameraName" -loglevel panic | |
} | |
} | Import-Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment