Discussion:
Remove metadata from MP4 on Windows
(too old to reply)
Oliver
2024-10-15 05:57:07 UTC
Permalink
What's the best way on Windows to offline remove all the identifying MP4
metadata before uploading a short video clip to a web site?

Is there something offline that is better than right clicking on the MP4
file to select Properties and then Details and then Remove Properties and
Personal Information?

This site suggests Microsoft's "Document Inspector" but the link is dead.
https://safecomputing.umich.edu/protect-privacy/consider-metadata
http://office.microsoft.com/en-us/word-help/remove-hidden-data-and-personal-information-by-inspecting-documents-HA010354329.aspx?CTT=1

A search comes up with the Microsoft Document Inspector, but is that the
best way to remove all the metadata from an MP4 file on Windows?
https://learn.microsoft.com/en-us/office/vba/library-reference/concepts/using-the-document-inspector

This suggests using VLC offline to remove the metadata on Windows.
https://pcdots.com/blog/remove-metadata-from-video/

This suggests using FFMPEG or AVCONV to strip metadata from MP4 files.
https://superuser.com/questions/441361/strip-metadata-from-all-formats-with-ffmpeg

What method do you use to strip unnecessary metadata from an MP4 file?
Is there any metadata that is necessary?
Alan Browne
2024-10-15 13:53:20 UTC
Permalink
Post by Oliver
What's the best way on Windows to offline
exiftool

Free. Powerful. Hard to use - but there are a lot of examples to do
what you want to do.

In your case:

exiftool -all= <filename>

Filename can be a complete path; or in terminal (CMD on Windows),
navigate to the folder (sub directory?) and run the command.

exiftool -all= *.mp4
exiftoll -all= *.MP4 <- it may be case sensitive - don't recall

https://exiftool.org
--
"It would be a measureless disaster if Russian barbarism overlaid
the culture and independence of the ancient States of Europe."
Winston Churchill
Alan Browne
2024-10-15 14:01:52 UTC
Permalink
Post by Alan Browne
Post by Oliver
What's the best way on Windows to offline
exiftool
Free.  Powerful. Hard to use - but there are a lot of examples to do
what you want to do.
exiftool -all= <filename>
Filename can be a complete path; or in terminal (CMD on Windows),
navigate to the folder (sub directory?) and run the command.
exiftool -all= *.mp4
exiftoll -all= *.MP4      <- it may be case sensitive - don't recall
https://exiftool.org
I should add that a lot of the so-called tools out there with window
interfaces, actually incorporate exiftool under the hood.
--
"It would be a measureless disaster if Russian barbarism overlaid
the culture and independence of the ancient States of Europe."
Winston Churchill
Oliver
2024-10-16 04:23:22 UTC
Permalink
Post by Alan Browne
exiftool -all= <filename>
Filename can be a complete path; or in terminal (CMD on Windows),
navigate to the folder (sub directory?) and run the command.
exiftool -all= *.mp4
exiftoll -all= *.MP4 <- it may be case sensitive - don't recall
https://exiftool.org
Thank you for that suggestion of exiftool-12.98_64 which I installed,
renamed, and ran in the command line (noting that spaces are critical).

copy with_exif_data.mp4 no_exif_data.mp4
exiftool<space>-all=<space>no_exif_data.mp4
1 image files updated

The problem is now I need to test what the difference is in exif data.

The first program I tried was MediaInfo Version 24.06 from
https://mediaarea.net/en/MediaInfo

Certainly there was a difference but the need is for a program to reliably
spit out ALL the metadata so that we can be sure any remaining identifying
metadata is wiped clean before a video is uploaded to the web.

Is there an offline program to spit out all the metadata in a comparable
format (like csv or text) so that two outputs can be compared side by side?
Paul
2024-10-16 10:47:15 UTC
Permalink
Post by Oliver
Post by Alan Browne
exiftool -all= <filename>
Filename can be a complete path; or in terminal (CMD on Windows), navigate to the folder (sub directory?) and run the command.
exiftool -all= *.mp4
exiftoll -all= *.MP4      <- it may be case sensitive - don't recall
https://exiftool.org
Thank you for that suggestion of exiftool-12.98_64 which I installed,
renamed, and ran in the command line (noting that spaces are critical).
copy with_exif_data.mp4 no_exif_data.mp4
exiftool<space>-all=<space>no_exif_data.mp4
   1 image files updated
The problem is now I need to test what the difference is in exif data.
The first program I tried was MediaInfo Version 24.06 from
https://mediaarea.net/en/MediaInfo
Certainly there was a difference but the need is for a program to reliably
spit out ALL the metadata so that we can be sure any remaining identifying
metadata is wiped clean before a video is uploaded to the web.
Is there an offline program to spit out all the metadata in a comparable
format (like csv or text) so that two outputs can be compared side by side?
If you want to study video, you can have your video dumped as packets.
Since your video sample is short, the output won't take up a lot of space.
If you try this on a two hour movie, you'll run out of space on D: :-)

C:\FFMPEG\bin\ffprobe -show_packets -show_data F:\high.mp4 > D:\Temp\high_ffprobe_out.txt

When you do "show_packets", there should be audio packets and video packets,
as separate items. The packets are interleaved (so the sound track follows
the video and is lip-synced after a fashion).

If there are any packet types other than those, that you can see, those
packets could be metadata.

The larger size of one of the video packets, is the key frame. Every 12th or 15th frame,
should be a key frame. The frames in between, are encoded as differences and
the size of those frames should be smaller.

It's hard to say where the metadata would be. The beginning and end of the
recording are logical places, but not a guarantee they won't try something else.

If the packets have 4CC codes, you can use those to sort the packets, with
grep perhaps.

Start with the un-stripped video first, so you have a "rich" sample
to analyze. Then move to the stripped video, to see what remains.

Even if someone were to write the tool you describe, chances are it
would not be complete. How many years did the ExifTool person work
on that software, honing it ? It took forever, to do a good job. Any
of the other developers who just dash off some code in half-an-hour,
they won't even be remotely close to being thorough.

You have to decide, whether the "Title" inside the video, is worth
chasing or not. That might not be as easy to access or view in a trace
or with a hex editor. It's always possible that in-band metadata could
be compressed, but generally, developers don't like to do that. There
is a preference for easier to parse presentations. But it's childs play
for them, to stream decoders for that sort of thing, and not a problem
to compress the stuff anyway. But historically, a preference for readable
fields is there.

You can look at Mozilla bookmarks as an example. Started as .json,
ended up as .jsonlz4 , which means the text is compressed with a
light compressor. The compressor is inefficient enough, you can
still read the text! Now, why would an idiot do that ??? Fuck knows.
Either you compress the living shit out of something... to save space.
Or, you don't compress something (it's too small to bother).
Well, why would you half-compress something ? I couldn't figure that out.

Paul
Paul
2024-10-15 17:07:19 UTC
Permalink
What's the best way on Windows to offline remove all the identifying MP4 metadata before uploading a short video clip to a web site?
Is there something offline that is better than right clicking on the MP4 file to select Properties and then Details and then Remove Properties and Personal Information?
This site suggests Microsoft's "Document Inspector" but the link is dead.
https://safecomputing.umich.edu/protect-privacy/consider-metadata
http://office.microsoft.com/en-us/word-help/remove-hidden-data-and-personal-information-by-inspecting-documents-HA010354329.aspx?CTT=1
A search comes up with the Microsoft Document Inspector, but is that the best way to remove all the metadata from an MP4 file on Windows?
https://learn.microsoft.com/en-us/office/vba/library-reference/concepts/using-the-document-inspector
This suggests using VLC offline to remove the metadata on Windows.
https://pcdots.com/blog/remove-metadata-from-video/
This suggests using FFMPEG or AVCONV to strip metadata from MP4 files.
https://superuser.com/questions/441361/strip-metadata-from-all-formats-with-ffmpeg
What method do you use to strip unnecessary metadata from an MP4 file?
Is there any metadata that is necessary?
This line looks interesting. The "-c copy" is an attempt to not modify the
video and audio stream, then the "map" options are attempts to edit the
4CC in the movie containing metadata. Anything the CODEC does not recognize,
is ignored, and that's how you store metadata, is make a 4CC that won't
cause grief to the CODEC.

ffmpeg -y -i "test.mkv" -c copy -map_metadata -1
-metadata title="My Title" -metadata creation_time=2016-09-20T21:30:00 -map_chapters -1 "test.mkv"

And obviously, some amount of metadata is needed for the movie to function,
and these would be fields that are "in-band" and not "out-of-band". That
is likely why the command is attempting to edit the Title. And the Title
might show up in a Windows Properties dialog. Microsoft is only interested
in certain fields, for the purposes of Search Indexer and other fields are
ignored. I think they know what most all of the metadata is, but they
won't write tools for it. Only a certain amount works in search.

Generally, 4CC packets are length sensitive, and if you want to use a
hex editor to expunge something, make sure you don't change the length.
If the word was "Hello", you would replace it with "XXXXX".

As for ownership of content, steganography or watermarking, there are
some effective methods out there that are hard to remove. with the right
tool, it might print on the screen "Property of Paramount Pictures".
Metadata is the more "obvious" marking, but is not the only means.
With a good watermark, even conversion from one CODEC to another, will
not remove the marking.

Paul
Isaac Montara
2024-11-06 02:35:35 UTC
Permalink
Post by Paul
This line looks interesting. The "-c copy" is an attempt to not modify the
video and audio stream, then the "map" options are attempts to edit the
4CC in the movie containing metadata. Anything the CODEC does not recognize,
is ignored, and that's how you store metadata, is make a 4CC that won't
cause grief to the CODEC.
ffmpeg -y -i "test.mkv" -c copy -map_metadata -1
-metadata title="My Title" -metadata creation_time=2016-09-20T21:30:00 -map_chapters -1 "test.mkv"
And obviously, some amount of metadata is needed for the movie to function,
and these would be fields that are "in-band" and not "out-of-band". That
is likely why the command is attempting to edit the Title. And the Title
might show up in a Windows Properties dialog. Microsoft is only interested
in certain fields, for the purposes of Search Indexer and other fields are
ignored. I think they know what most all of the metadata is, but they
won't write tools for it. Only a certain amount works in search.
Generally, 4CC packets are length sensitive, and if you want to use a
hex editor to expunge something, make sure you don't change the length.
If the word was "Hello", you would replace it with "XXXXX".
As for ownership of content, steganography or watermarking, there are
some effective methods out there that are hard to remove. with the right
tool, it might print on the screen "Property of Paramount Pictures".
Metadata is the more "obvious" marking, but is not the only means.
With a good watermark, even conversion from one CODEC to another, will
not remove the marking.
https://herrbischoff.com/2020/09/how-to-remove-metadata-from-mp4-files/
ffmpeg -i input.mp4 -map 0 -map_metadata -1 -c copy output.mp4

Matti Haveri
2024-10-20 09:12:50 UTC
Permalink
Delete all movie data and set time stamps to 0000:00:00 00:00:00:

exiftool -api LargeFileSupport=1 -All= -Time:All= .
--
Matti Haveri <mattiDOThaveriATgmailDOTeiroskaaDOTcom> remove ei roskaa
Loading...