Page 1 of 1
Replace MP4 Meta Tags?
Posted: 24 Mar 2017 20:32
by mrbosco
If I have a movie file in mp4 format I can go to properties...details...title and change whatever is there to the filename of the movie.
Is there anyway to automate this with a script?
Thanks.
Re: Replace MP4 Meta Tags?
Posted: 25 Mar 2017 06:42
by bdeshi
select the movie file, paste this code into the addressbar and press ENTER.[code]::$title = property('System.Title', <curitem>); if ($prop) {renameitem($prop, <curitem>, 1);};[/code]I got it the other way around. You want to put the filename as the title.
Re: Replace MP4 Meta Tags?
Posted: 25 Mar 2017 09:48
by mrbosco
Exactly.
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 13:01
by admin
Check out scripting command id3tag().
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 14:51
by highend
for .mp4 video files?
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 15:38
by admin
Help:
"Works with all files that support ID3v1 tags, e.g. MP3, MP4, M4A. "
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 16:08
by highend
But this is not about standard id3 tags
What he wants to change is this title:
properties.png
IPropertyStorage is the keyword here
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 16:35
by admin
Oh, sorry. No, that's not supported.
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 16:56
by mrbosco
Is it possible to add it to a wish list of future features?
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 17:03
by admin
Hmm, this is really from the dark side of Windows, I would guess the Office people are responsible for it. So, I will probably always find something better to do than torture myself with this horrific interface.
Re: Replace MP4 Meta Tags?
Posted: 27 Mar 2017 19:20
by mrbosco
OK, thanks anyway.
The reason I'm trying to do this is Plex Media player uses these fields (if present) over the actual filename for its scanner.
So if there's garbage in these fields, Plex screws up. There really should be a way of telling plex to ignore these fields but I can't seem to find one.
Thought if XYPlorer gave me an easy way to populate the fields or blank them out that would solve my problem.
Thanks for your help and the timely responses.
:-)
Re: Replace MP4 Meta Tags?
Posted: 28 Mar 2017 16:03
by totmad1
You can automate by using ffmpeg.It achieves this by "remuxing" i.e. copying while putting in the metadata.
Code: Select all
$ffmpeg="%porta%\ffmpeg\bin\ffmpeg.exe";
$genre="Action";
$SelectedItems = get("SelectedItemsPathNames","|");
foreach($Item, $SelectedItems,"|") {
$base= gpc("$Item", "base");
$path= gpc("$Item", "path");
$ext= gpc("$Item", "ext");
$cmdline = <<<CMD_LINE
cmd /c ""$ffmpeg" -i "$Item" -metadata title="$base" -metadata genre="$genre" -acodec copy -vcodec copy "$path\ $base _NEW.$ext""
CMD_LINE;
$cmdline = Replace($cmdline, "<crlf>", ' ');
Run($cmdline, , 0, 0);
wait 500;
}
In this case it puts "Action" as Genre.
Re: Replace MP4 Meta Tags?
Posted: 01 Apr 2017 01:02
by highend
I just stumbled upon "prop":
https://prop.codeplex.com/releases/view/11675
The Vista version still works fine on Windows 10.
To set a title you have to use:
prop.exe set "<full path to file>" System.Title="<base name of your file>"
Only 105 KB large^^
Code: Select all
$prop = "D:\Tools\@Command Line Tools\prop\Vista\prop.exe";
foreach($item, <get SelectedItemsPathNames |>, , "e") {
if (gpc($item, "ext") != "mp4") { continue; }
$baseName = gpc($item, "base");
runret("""$prop"" set ""$item"" System.Title=""$baseName""");
status "Setting base name for '" . gettoken($item, -1, "\") . "'";
}