Strip title and comment metadata from video files?

Started by Lu10ntDn, May 24, 2017, 04:01:03 PM

Previous topic - Next topic

Lu10ntDn

Hi,

I'm not much of a power user of anything.  Can anyone tell me if ExifTool can be used to strip out the Title and Comment metadata from all types of video files (mp4, avi, wmv, mkv, etc.)?  If so, what would be the command to do this recursively on Windows 10?

Would it just be:

exiftool -r -overwrite_original -all= -tagsfromfile @ -title -comment *.*

Many thanks!

StarGeek

That command would attempt to strip all metadata but leave title and comment tags.

To strip title and comment tags you would want
exiftool -r -title= -comment= -ext mp4 -ext avi -ext wmv -ext mkv Directory

But there are some problems.  First, exiftool has limited functionality with regards to video files.  This may work on some (probably MP4) but unlikely to work on others (avi and wmv).

You might have better luck with FFMpeg.  Unfortunately, FFMpeg metadata editing isn't very well documented.  Additionally, it only operates on individual files, with no batch or recursive abilities.  It would need scripting.  And I'm not sure about it's ability to non-destructively edit metadata for avi and wmv files.

I've used a command like this to change metadata without reencoding for MP4 and MKV files
ffmpeg -i input.mkv -metadata title= -c copy output.mkv


"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Lu10ntDn

I did some testing myself and realized that after I ran an iteration of the command I listed above that it actually seemed to REMOVE the tags altogether on an MP4 file.  I guess I should have been more clear in that I just want to set the values for Title and Comment to a blank string and not actually remove them.  I'll try what you suggested and see if that does the trick for me. I'll also take a look at ffmpeg.

Thanks!

Lu10ntDn

OK, I separated the command into 4 different lines (one for each type) in a .bat file and your suggestion worked as intended for MP4 files - they just get cleared out. 

For WMV files, I got the error: Error: Writing of WMV files is not yet supported

For AVI and MKV files, I didn't get any kind of acknowledgment at all.

I also noticed that the one test MP4 file I used took a LONG time to update (close to 30 seconds).  I just can't understand how if you do a right-click on the file in Windows File Explorer, change the title and comment metadata and click on OK, it just updates immediately.

StarGeek

Quote from: Lu10ntDn on May 24, 2017, 06:06:56 PM
I also noticed that the one test MP4 file I used took a LONG time to update (close to 30 seconds).  I just can't understand how if you do a right-click on the file in Windows File Explorer, change the title and comment metadata and click on OK, it just updates immediately.

Exiftool rewrites the entire file.  I'm just guessing but I think Windows might be editing the file directly.  What exiftool does is safer in case of something catastrophic, such as a power failure.  But then, that would also be something fairly rare.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype