I use IMatch to manage all my photos and home videos. The 2021 release introduced a feature that will merge what were originally sidecar .xmp files into .mp4 and .mov files. In other words, the metadata can now sit inside the video file, rather than in a separate file beside it.
For whatever reason (likely me doing too much at once on the PC) there were files getting missed. That meant any metadata changes went into the .xmp file, which then got ignored so the changes were apparently lost. A merge of the missed file fixed it.
Too many directories to check by hand, so I wrote this little PowerShell script to find them for me.
For every .mov or .mp4 file it finds, it checks for a matching .xmp. If that exists, I get told about it. Then into IMatch to fix it.
$filelist = Get-ChildItem -recurse -include *.mov, *.mp4
foreach($file in $fileList) {
$xmpFile = $file.FullName -replace [System.IO.Path]::GetExtension($file.FullName), ".xmp"
if (Test-Path -literalPath "$xmpFile") {
write-host $file.FullName
}
}