Skip to content

Instantly share code, notes, and snippets.

@krokofant
Last active October 25, 2022 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krokofant/83d9cd1ffd1f2075d8abf8c58883174d to your computer and use it in GitHub Desktop.
Save krokofant/83d9cd1ffd1f2075d8abf8c58883174d to your computer and use it in GitHub Desktop.
Show camera settings
<# 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