1

I've been trying to find a way to edit the "Tags" section by swapping it with the "Title" section for MP4.

The problem is that I can't do this with ExiftTool, MP3Tag, MediaMonkey, and it's a nightmare trying to manually right click and change the Tags for every single file.

Example Of File Properties

The closest I came was an app called MP4 Video & Auto Tag Editor since it lets you edit Microsoft Xtra Atoms, but alas...it doesn't have a way to do this for an entire directory

I found this PowerShell script, and it shows all the metadata.

However, I don't know how to exactly edit the "Tags" section to actually customize and trade values. I know ExiftTool could only "read' and not "write" so my biggest fear is that I face the same issue.

The SRCDIRECTORY represents the directory I'm using...

Function Get-MP3MetaData 
{ 
    [CmdletBinding()] 
    [Alias()] 
    [OutputType([Psobject])] 
    Param 
    ( 
        [String] [Parameter(Mandatory=$true, ValueFromPipeline=$true)] $Directory 
    ) 
 
    Begin 
    { 
        $shell = New-Object -ComObject "Shell.Application" 
    } 
    Process 
    { 
 
        Foreach($Dir in $Directory) 
        { 
            $ObjDir = $shell.NameSpace($Dir) 
            $Files = gci $Dir| ?{$_.Extension -in '.mp3','.mp4'} 
 
            Foreach($File in $Files) 
            { 
                $ObjFile = $ObjDir.parsename($File.Name) 
                $MetaData = @{} 
                $MP3 = ($ObjDir.Items()|?{$_.path -like "*.mp3" -or $_.path -like "*.mp4"}) 
                $PropertArray = 0,1,2,12,13,14,15,16,17,18,19,20,21,22,27,28,36,220,223 
             
                Foreach($item in $PropertArray) 
                {  
                    If($ObjDir.GetDetailsOf($ObjFile, $item)) #To avoid empty values 
                    { 
                        $MetaData[$($ObjDir.GetDetailsOf($MP3,$item))] = $ObjDir.GetDetailsOf($ObjFile, $item) 
                    } 
                  
                } 
             
                New-Object psobject -Property $MetaData |select *, @{n="Directory";e={$Dir}}, @{n="Fullname";e={Join-Path $Dir $File.Name -Resolve}}, @{n="Extension";e={$File.Extension}} 
            } 
        } 
    } 
    End 
    { 
    } 
} 


ForEach($item in ("SRCDIRECTORY" |Get-MP3MetaData)){ 
    $itemTitle = $item.Title 
    $itemTags = $item.Tags
}
  • You could try [ffmpeg](http://ffmpeg.org/ffmpeg.html#Main-options) with switch `-metadata`. – Theo Dec 10 '20 at 10:38
  • @Theo, I don't believe ffmpeg can edit the Microsoft Xtra atoms. – StarGeek Dec 10 '20 at 15:39
  • After googling around and playing with `exiftool` and `ffmpeg`, can confirm, neither of those will work. exiftool _can_ write to _a_ category tag...just not the `Microsoft:Category` tag. I also couldn't find any programming libraries or anything that would work either. – Chad Baldwin Dec 10 '20 at 16:27
  • Same...I just tried to use TagLib, and even then it doesn't allow me to update that information. In fact, it doesn't show anything at all. The only thing that came close to doing what I want was an app called MP4 Video & Auto Tag Editor but didn't allow a way to edit every file at once. –  Dec 10 '20 at 20:25

0 Answers0