Created
April 13, 2017 00:04
-
-
Save tillig/ff14af21c865be0c717c33799ca97b3b to your computer and use it in GitHub Desktop.
Find SD movies in a file location
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
$fileLocation = "\\diskstation\video\Movies\" | |
# This is the CLI version of MediaInfo | |
# https://mediaarea.net/en/MediaInfo | |
$mediaInfoLocation = "C:\util\MediaInfo.exe" | |
Get-ChildItem $fileLocation -Filter *.m4v -Recurse | %{ | |
$path = $_.FullName | |
[xml]$info = & $mediaInfoLocation --Output=XML "$path" | |
$video = $info.Mediainfo.File.track | Where-Object { $_.type -eq "Video" } | |
$width = [int]$video.Width.Replace(" pixels", "").Replace(" ", "") | |
$height = [int]$video.Height.Replace(" pixels", "").Replace(" ", "") | |
# HD is 1900 x 1080 | |
# SD is 720 x 480 | |
# Assume anything less than about 1100 is | |
# SD, depending on how it's been ripped/shot | |
if($width -lt 1100) | |
{ | |
Write-Output "$path ($width x $height)" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment