4

I was able to remove metadata titles in mkv files through mkvtoolnix with this code

@echo off
for /r %%g in (*.mkv) do ("D:\Programs\MKVToolsNix\mkvpropedit" "%%~g" --tags all:"" --delete title )

I want to do the same thing with mp4 files too which probably cant be done with mkvtoolnix. How do I do it?

2 Answers 2

7

You can try FFMpeg. There are examples showing how to strip all metadata and removing just a single item isn't much different.

Try
ffmpeg -i in.mp4 -metadata title= -c:v copy -c:a copy out.mp4

This can also be done with exiftool as of version 11.39. Exiftool can also do it in batch without need of a script.
exiftool -ext mp4 -Title= /path/to/files/
This command creates backup files. Add -overwrite_original to suppress the creation of backup files. Add -r to recurse into subdirectories.

4
  • But what I want is to only edit the file not create a new one. can it be done? MKVtoolnix can do it.
    – spamman
    Commented Mar 8, 2019 at 19:41
  • I don't know of any program that can easily edit such metadata for an MP4.
    – StarGeek
    Commented Mar 8, 2019 at 19:45
  • Try mp4box.......
    – Gyan
    Commented Mar 9, 2019 at 6:14
  • To follow up on @Gyan's comment, see superuser.com/a/970713/314998
    – StarGeek
    Commented Mar 9, 2019 at 18:20
1

In Windows, you can right click on an MP4 file, ensure it's not set as read only (uncheck Read Only->apply if it's set), then click the details tab. At the bottom of the details tab there is a clickable option "Remove Properties and Personal Information." Click that then select the "Remove the following properties from this file" radio button and check Title (and any other properties like Comments that you want removed" then click Okay. This process will remove the title property from .mp4 files.

For MKV you can use mkvpropedit like you've been doing, but in powershell you can do it recursively for all files. I use Plex, so my Movies dir has a child dir with the title and year, with the mkv and related files in that child dir. With this script you only have to point it to the Movies dir and it will recursively clear up the title attribute on all of the mkv files in all of the child directories (Obvs, be sure to change your -Path to the root dir where all your media files exist):

get-ChildItem -Path "D:\movies\" -Recurse -Filter *.mkv |
foreach-Object {
    & “C:\Program Files\MKVToolNix\mkvpropedit.exe” $filename -d title
}

Hope this helps anyone who landed here after a google//Duck Duck Go search!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.