[Feature Req] Strip Metadata/Set Metadata

All your suggestions, requests and ideas for future development
Post Reply
thantik
Posts: 2
Joined: 09 Jul 2016, 20:24

[Feature Req] Strip Metadata/Set Metadata

Post by thantik »

Lots of files I have and have used FileBot for renaming have this tendency to have garbage metadata. Most notably "Title" and "Comments", usually have some stupid tag added to them. An option for stripping metadata entirely, or setting the title/comments to a custom value would be handy. When these are set, some of my software for organization looks for the Title/Comments first, before the filename for organization - being able to strip this through filebot would save a lot of time. As it is right now, I use filebot to rename, and then have to use other utilities to strip the metadata.

Seems like a simple request - but I understand how difficult it would be to implement. Different filetypes, metadata formats, risk of corrupting files - totally understand if you're reluctant to tackle it.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Feature Req] Strip Metadata/Set Metadata

Post by rednoah »

You're talking about mkv/mp4 tags. That's part of the file content. By design, FileBot will never modify files for the aforementioned reasons, so it can't strip those tags.

Other tools may help and it should be fairly easy to automate this process:
https://mkvtoolnix.download/doc/mkvpropedit.html

Not sure if there's a single tool that can deal with all formats...
:idea: Please read the FAQ and How to Request Help.
thantik
Posts: 2
Joined: 09 Jul 2016, 20:24

Re: [Feature Req] Strip Metadata/Set Metadata

Post by thantik »

rednoah wrote:Not sure if there's a single tool that can deal with all formats...
Yep, that's my problem. I fully understand the reasoning behind not wanting this feature or deeming it out-of-scope. Thank you for your time and consideration.
khsefbh
Posts: 4
Joined: 18 Dec 2016, 09:38

Re: [Feature Req] Strip Metadata/Set Metadata

Post by khsefbh »

I respect your decision to not modify the files' contents, and I understand that there is no single tool that can accomplish this. Could you please implement something half-way though? Here's what I have in mind: when a user scans a file and asks for it to be renamed (assuming the identification went well), could you please create a .ini file with the same basename as the video file? The .ini file should contain all the info that you have in your database about it. I can script the next step for myself, and fill in the tags using other tools. The choice of .ini is a matter of taste, of course. I would be just as happy with a JSON file.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Feature Req] Strip Metadata/Set Metadata

Post by rednoah »

FileBot does store all metadata as JSON to filesystem extended attributes (if supported).

You may use the xattr script (or any other xattr tool) to view xattr.
:idea: Please read the FAQ and How to Request Help.
khsefbh
Posts: 4
Joined: 18 Dec 2016, 09:38

Re: [Feature Req] Strip Metadata/Set Metadata

Post by khsefbh »

@rednoah I did not know that! Thank you for pointing it out to me. I'll proceed with writing my custom scripts now.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Feature Req] Strip Metadata/Set Metadata

Post by rednoah »

Make sure to share them here afterwards. ;)
:idea: Please read the FAQ and How to Request Help.
flick
Posts: 1
Joined: 15 May 2018, 15:31

Re: [Feature Req] Strip Metadata/Set Metadata

Post by flick »

khsefbh wrote: 18 Dec 2016, 18:23 @rednoah I did not know that! Thank you for pointing it out to me. I'll proceed with writing my custom scripts now.
@khsefbh Did you ever post your scripts anywhere? I'm very interested in doing this as well. Thanks!
underrepresented
Posts: 15
Joined: 15 Nov 2015, 21:38

Re: [Feature Req] Strip Metadata/Set Metadata

Post by underrepresented »

rednoah wrote: 10 Jul 2016, 04:53 You're talking about mkv/mp4 tags. That's part of the file content. By design, FileBot will never modify files for the aforementioned reasons, so it can't strip those tags.

Other tools may help and it should be fairly easy to automate this process:
https://mkvtoolnix.download/doc/mkvpropedit.html

Not sure if there's a single tool that can deal with all formats...
ffmpeg will strip all metadata.

I use iffmpeg myself. You can simply do a passthru to wipe just the metadata or or recode to any format you choose.

Code: Select all

ffmpeg -i "$1" -c:v copy -c:a copy -map_metadata -1 -metadata output.mpg
or /mov/mp3/avi/mkv etc.
Sauron99
Posts: 1
Joined: 04 Jan 2019, 17:15

Re: [Feature Req] Strip Metadata/Set Metadata

Post by Sauron99 »

MP3TAG allows batch stripping/modifying metadata from video files including MP4. You can also preserve the file timestamp.

https://help.mp3tag.de/index.html
https://www.videohelp.com/software/Mp3tag
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Feature Req] Strip Metadata/Set Metadata

Post by rednoah »

Are you using the CLI or the GUI?

If you're using the CLI, then 3rd party tools can easily be integrated using the -exec option:
viewtopic.php?f=4&t=5047
:idea: Please read the FAQ and How to Request Help.
Post Reply