Retrieves properties and metadata for picture and video files — dimensions, camera, GPS coordinates (and reverse-geocoded place when available), duration for video, timestamps, and related Shell / EXIF-style fields. This page documents the media-info helper only; Photo_Project management workflows are not covered here yet.
Get-MediaInfo returns a cMedia04 object with fields such as:
FullPath, Directory, Name, Extension, Found, MediaKind (Image | Video | Other), FileSize, Created, LastWriteWidth, Height, HorizontalResolution, VerticalResolution, RawFormat, PixelFormat, BitDepthCameraMaker, CameraModel, DateCreatedLatitude / Longitude (DMS), refs, decimal degrees, Altitude, plus City, State, Country when reverse geocode succeedsDuration (timespan; Shell duration property, video only)| Name | Required | Default | Purpose |
|---|---|---|---|
FullPath | Yes | — | Full path to an image or video file |
UseBitmap | No | off | Force System.Drawing.Bitmap decode for resolution / PixelFormat when Shell metadata is thin |
# Dotsource once per session
. "C:\Scripts\Media\Media_2026-0923-04.ps1"
# Basic: properties for one photo
$File = Get-MediaInfo "D:\Photos\sample.jpg"
$File | Format-List
# Video duration + frame size
$Clip = Get-MediaInfo "D:\Video\clip.mp4"
$Clip.Duration
$Clip.Width; $Clip.Height
# Force Bitmap decode when Shell dims are missing
$File = Get-MediaInfo "D:\Photos\sample.jpg" -UseBitmap
cMedia04 is compiled once per dotsource (not on every call).$global:MediaGeoCache caches Nominatim reverse lookups by rounded lat/long; polite delay only on cache miss.Get-PlaceFromGps, Convert-Dms (also used inline on the hot path)..ps1 as the source of truth; the Script source page is for reading/sharing.Media_2026-0923-04.ps1