Get-MediaInfo
Get-MediaInfo copied to clipboard
Piping Get-ChildItem to Get-MediaInfoValue causes errors but no breakage
gci | gmiv -kind video -parameter CodecID | ogv
New-Object: D:\Documentos\PowerShell\Modules\Get-MediaInfo\3.7\Get-MediaInfo.psm1:193
Line |
193 | … $mi = New-Object MediaInfoSharp -ArgumentList (Convert-Path -Li …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling ".ctor" with "1" argument(s): "Error MediaInfo_Open"
InvalidOperation: D:\Documentos\PowerShell\Modules\Get-MediaInfo\3.7\Get-MediaInfo.psm1:194
Line |
194 | $value = $mi.GetInfo($Kind, $Index, $Parameter)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
InvalidOperation: D:\Documentos\PowerShell\Modules\Get-MediaInfo\3.7\Get-MediaInfo.psm1:195
Line |
195 | $mi.Dispose()
| ~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
I think the problem is it tries to process any input like folders and non-media files.