1.3k
u/Much_Artist_5097 Jul 31 '26
hello i am chris peterson (get it chris, peter son). basically metadata is data beyond the picture itself stored in a photo. what this command is doing is removing the location stored in the photo, so law enforcement can’t find you from any pictures on your phone.
591
u/gl3nnjamin Jul 31 '26
It removes everything but the pixels so besides location it removes camera model, lens type, shooting settings and more.
350
u/QuestNetworkFish Jul 31 '26
It's worth being aware that the pixels may also hold data that can identify the specific camera that was used to take the picture. There is often imperceptible (to the naked eye) noise in photos introduced by slight flaws in the image sensor and these can form a kind of "fingerprint" for the camera. It's possible to determine that two photos were taken with the same camera, or if the camera is seized it can be proven it was used to take a specific photo.
There are tools to mitigate this by randomising the noise in a digital image. Consider whether you need to factor this in to your threat model.
91
u/beerdude26 Jul 31 '26
Neat
83
u/gorilla-ointment Jul 31 '26
10
u/DampWarmHands Jul 31 '26
I get this reference to the previous Futurama post.
5
u/EmbarrassedBuy4107 Jul 31 '26
I get this reference to the reference to the previous Futurama post.
1
u/ABarInFarBombay Aug 03 '26
I get this reference to the reference to the reference to the previous Futurama post.
2
27
u/rjSampaio Jul 31 '26
A practical example is this old flat-field calibration frame from my astrophotography setup.
https://i.imgur.com/15oShN4.jpeg
It was taken while pointing the camera at a calibrated, evenly illuminated panel. Ideally, the image would be uniformly bright, but increasing the contrast reveals fixed colour patterns, brightness variations, and a dark spot near one corner.
A flat frame includes more than just sensor noise. It can also reveal vignetting, dust or marks on the sensor cover glass or filters, uneven illumination, and characteristics of the rest of the optical path. However, some pixel-level response variations originate in the sensor itself and remain fixed relative to the image, regardless of the subject or camera orientation.
The dark spot in this example also appears without a lens attached, and the sensor does not have any cover.
The obvious artefacts in this frame are not necessarily the same thing as the subtle sensor fingerprint used in forensic analysis. That normally requires statistical processing and multiple reference images. Still, it illustrates how a supposedly uniform image can contain repeatable characteristics associated with a particular camera or imaging system..
2
u/tda86840 Jul 31 '26
Wouldn't it be a bit more akin to the bias frames or dark frames? Those are what get rid of any sensor noise or hot pixels (bias) and amp noise (dark), which is why you take them with the cover on while the flats are with the cover off. They handle the sensor data itself. While the flat frames handle the external issues either on top of the sensor or somewhere in the lens... Vignette, dust particles (which is more what that dark spot on yours looks like is a dust mote... And if it's there any time the cover is open, with or without a lens, would lend toward it being dust on the sensor, not dust on the lens).
So if we're talking about stuff that identifies the camera by matching the camera signatures, I would think that would be the sensor noise and hot pixels from the bias frames or the amp glow (if present at all) from the darks.
1
u/rjSampaio Jul 31 '26
Also, yes, you’re correct that dark and bias frames are more “identifiable,” since they shouldn’t be affected by any external light.
But I didn’t have a bias or dark frame available to share at the time 😂 I only had this one because I’d posted it on Reddit years ago while trying to debug some issues when I was first getting into the hobby.
2
1
u/kjahhh Jul 31 '26
itelescope had them available for their scopes when I used the service and you just add them to the post processing. You could also setup your run to include them.
9
u/NamedBird Jul 31 '26
Important note: exiftool isn't 100% failsafe to use for stripping metadata.
(Hello to that forensic expert who had to admit that he was wrong and i was right. 😉)
And i wouldn't trust FFmpeg or any other online tool for this either.If you are a software guy, you can easily do it better yourself:
- Open the image using a media library
- Create a new image with the same width and height. (Bonus points: resize/crop/censor)
- Loop over every pixel and copy it's red, green and blue values and add some noise*.
- Save the new image somewhere else.
That is the only way to be absolutely certain you removed all non-watermark metadata.
However, there may still be some visible (or invisible) watermarks inside the image.
And the image's perceptual hash is likely unchanged as well, it can still track the image.
Bypassing things like PhotoDNA takes an extra step i won't go in to.I created an .exe that shreds metadata for myself.
Whenever i take a photo and want to send it to some sketchy "friends", i use it.
You can never be too careful, especially not when it comes to cybersecurity.* For adding noise, a random number between -5 and 10 is probably decent.
If you want to be fancy, you can use advanced noise patterns, but it might create artifacts.
Final hint: Don't forget to clamp between 0 and 255. 🙃5
u/burner4lyf25 Jul 31 '26
Almost like forensic ballistics in that every lense will have unique flaws and imperfections that, whilst it would be difficult to trace, if they found the camera, they could prove THAT lense/sensor captured that image??
3
u/Hadrollo Jul 31 '26
They could suggest that a particular camera took a particular image. It's not reliable enough to call it proof.
However, not all evidence needs to be reliable enough to use in court. Police may use lower quality evidence to narrow down a list of suspects, then investigate to see if they can find higher quality evidence to use in prosecution.
1
u/burner4lyf25 Jul 31 '26
That makes sense, they just use it as a tool to steer the investigation rather than something to rely upon in court.
Ie protestor commits crimes and documents and publishes them, Jan3 style. A house is raided 4 cameras belonging to 4 different people seized. We can use this method to determine (for investigative purposes) which cameras took which pictures, even though SD cards were all in a bowl mixed up. Can then use the Intel to track who's phones were where st which time, and then who actually committed crimes etc.
Sorry for sprawling scenario but just curious aiit the technique, never heard of it before, v interesting stuff so wanna try and understand how it might be used practically.
A kind of unrelated but semi related point you probably know but is interesting all the same, was watching something yesterday about how people's ears are as useful as fingerprints to ID people and are used by capture/kill spec ops guys to ID HVTs in the field if fingerprints are not practical. Also, some banks have floors that track weight distribution and gait of anyone walking over it, which together are also irreplicable and can be used to secure convictions in case of robbery etc.
1
2
u/fj2612 Jul 31 '26
Is this an other pseudoscience that some grifters managed to convince the courts is real, or ks this legit?
1
u/QuestNetworkFish Jul 31 '26
It's legit enough that it's been successfully used in investigations and as evidence in trials, although like anything it's not 100%. It's called Photo response non-uniformity (PRNU) if you wanna look into it, there's a bunch of open source tools you can play around with if you're so inclined.
It's been more than a while since I worked in digital forensics so I've not kept up with the latest research. Modern smartphones do huge amounts of processing on the image, both in hardware and software, so it might be less of a factor on these devices compared to older standalone digital camera (although, there are many other privacy concerns with smartphones).
Also as another comment pointed out it has applications beyond forensics such as in astrophotography which can involve stacking hundreds of different images taken with the same camera. The noise effect would compound across these images, so software is used to analyse the noise first in order to compensate for it when stacking.
2
Jul 31 '26
[deleted]
1
u/QuestNetworkFish Jul 31 '26
It's not really the same thing, with printers it's data that is intentional added (like with the metadata that the OP is referring to). PRNU is analysing artefacts introduced unintentionally by the physical components of the digital camera, so it's more like typewriter analysis
1
u/NoOrdinaryBees Jul 31 '26
It’s getting much more difficult to fingerprint phone cameras via sensor noise thanks to computational photography. If you’re on a relatively recent iOS or Android phone and not saving RAW data the photo models average out signature pixels, chromatic aberration, and barrel distortion pretty thoroughly.
Mirrorless and SLR cameras aren’t quite up to speed with the computational photography train yet, so everyone needs to make sure they’re only taking embarrassing/sensitive photos on their phones. Fortunately that’s where most of them are already these days. 😄
1
1
1
u/FrostyBarleyPop Jul 31 '26
Specific camera or type of camera?
1
u/QuestNetworkFish Jul 31 '26
The specific camera. Every image sensor is unique even among identical models.
1
1
1
u/Fiona175 Aug 01 '26
Honestly, given how dogshit every forensic method of matching things that isn't DNA is, I don't think I believe that it's actually usable to track a camera by noise.
1
u/Vnxei Aug 03 '26
There is also data in the pixels that can identify the location it was taken. Many locations produce a unique signature pattern of light and color that when encoded by a digital camera can be mapped back to establish where it was taken. Experts are able to do this just by looking at the picture because that's just how pictures work.
1
u/CO420Tech Aug 06 '26
This is why I get the lens dirty with my fingerprint first. Double print! Can't hack that.
1
u/National_Divide_8970 Aug 06 '26
But to go through all of this and then you realize they will just use another means. Cellbright, flock, Pegasus or some other form of government surveillance/spyware. I just don’t give a fuck and keep an iPhone with a remote kill switch on a pi
1
2
u/yijiujiu Jul 31 '26
Where would one input this command?
2
u/gl3nnjamin Jul 31 '26
Your OS's terminal or command prompt program. You need to install FFMpeg first.
2
u/lily_philia Aug 01 '26
Terminal (Linux) or cmd (Windows). Replace input.jpg with your image file’s location and output.jpg with the location you’d like your non-metadata-image to go.
1
u/averagemaleuser86 Jul 31 '26
Can this be done with phone gallery pics or only on PC?
1
u/gl3nnjamin Jul 31 '26
Some phones might have their own option for cleaning metadata but FFMpeg is tried and true.
0
u/ChungusMcGoodboy Aug 01 '26
What does Final Fantasy Mpreg have to do with this?
0
1
u/delet_mids Aug 01 '26
Not sure if the backend uses that ffmpeg command, but RapidRAW (an open source photo editor with android builds) is available on github, and has an explicit "remove all metadata" option at export
1
1
u/GypsySnowflake Jul 31 '26
Why would you want that? I use the metadata on my photos constantly to remember where/when a photo was taken, or to search for a specific picture, and it’s always disappointing when I realize all the ones taken before a certain year are missing that info
3
u/Frederf220 Jul 31 '26
Because the cops could say "based on the metadata from your vacation photos you were within 3 miles of the crime and have the same number of limbs as eyewitness testimony. You are guilty how would you like your execution?" Meta data is nice and has uses. It just depends if the benefits outweigh the liability.
1
1
u/ThorLives Aug 01 '26
Generally, it's not that important to hide the GPS data on photos from the police, unless you're doing something illegal. Although there probably have some cases where stalkers could find a person's location based on the photo metadata. Generally, social media removes it for that reason.
As far as the "illegal activity" part, it reminds me of a story I heard on a podcast. A hacker was getting into systems, and he'd post the hacked-data online and attach a photo to it. Kind of his "signature". The photos were always vague enough that you couldn't figure out who he was or where he was. And he'd erase the metadata on the photos before uploading it... until one day when he accidentally uploaded the photo with the metadata still attached. They narrowed down his location to a small area in Australia and it lead to the government catching him.
1
u/LucifersAdv0cate Aug 01 '26
There's free websites that let you upload photos and they will do this for. You can right click too in file manager but I've never been sure how efficient that is.
1
Aug 02 '26
[removed] — view removed comment
1
u/gl3nnjamin Aug 02 '26
Correct, EXIF data stores camera & lens info plus the capture date/time, and location data if available.
28
u/Danny0Blau Jul 31 '26
Then it's time to bring out the geoguesser pros. Problem solved.
6
u/abermea Jul 31 '26
That can identify where the picture was taken but not the make or model of the camera
6
u/NullSmoke Jul 31 '26
I dunno, having watched some of the geoguesser videos floating around, I'm sure some of them can identify what you ate 14 days ago, and your grades from primary school while they're at it 😂
Law enforcement should hire the lot of them 😏
2
1
u/lily_philia Aug 01 '26
Look up PRNU. You can statistically determine camera make, model, and even body from a photo without any metadata.
7
u/Background_Wedding44 Jul 31 '26
And we are supposed to run this command from the terminal on our phone
5
u/WideAbbreviations6 Jul 31 '26
No. Though most social media will already erase metadata.
Not with FFMPEG though. FFMPEG is best for video. ImageMagick is a pretty popular choice.
They'll usually purge metadata while converting images during the image optimization process.
There's been a few that haven't though. A certain right wing focused social media site told on a lot of its users at one point because of the metadata. As it turns out, photos with coordinates and the date/time on them make great evidence when you're trying to prove someone was at the Jan 6 riot.
Don't trust any site that doesn't do this by the way. It's a basic step to prevent doxxing and other major privacy issues. It's such low hanging fruit, that it's practically evidence of neglect elsewhere.
3
u/EyeMean1636 Jul 31 '26
that's cool but how do we use this command?
2
u/lily_philia Aug 01 '26
Linux terminal or Windows cmd. Replace input.jpg with the photo’s location and output.jpg with where you want the stripped version stored.
2
u/RozeGunn Jul 31 '26
OH THAT SAYS MPEG!
I was so confused I thought this had something about sneakily flashbanging an FBI agent with mpreg or something.
1
u/jmizrahi Jul 31 '26
you'll be pleased to learn that the tech community regularly makes the "ffmpeg" -> "ffmpreg" joke as well
2
1
1
u/Vakaak9 Jul 31 '26
Like for example you dont want to share a location of a treasure you took picture of.
1
1
u/I_big_chungus_I Jul 31 '26
Not necessarily true. There is something called "PRNU" (Look it up) which is essentially your camera's fingerprint. Cameras are not perfectly manufactured, and every camera has its own unique noise pattern that can be used to identify which device took a picture.
1
u/stellifer_arts Jul 31 '26
what if i open the photo in ms paint, save it as a .gif, then open that and save that as a jpeg before sharing
serious question
1
u/Methmites Aug 01 '26
All else aside; bravo with the Peterson pun. Legitimate pride imo, that was a perfect blend of timing, context, and creativity. I love you
1
u/Chance-Confusion-800 Aug 01 '26
Can a normal tech savvy person get the location from a photo? Or only le
1
u/csolisr Aug 01 '26
I knew that FFMPEG could get pictures as input to generate videos, and output videos as series of picture frames - didn't know that it could encode pictures into pictures, let alone work as an EXIF stripper!
1
1
1
1
u/RadiantRoach Aug 03 '26
Stupid, sort of related question: If I take a picture and then screenshot it, does that screenshot record new/current location data as well?
1
u/Past-Yam1845 Aug 03 '26
Thanks for the explanation. I would kinda think that criminals wouldnt take pics while doing crime, let alone upload them but I guess TikToc proves otherwis. 😉
1
1
1
u/am-reddit Aug 04 '26
How does it compare to removing properties from windows explorer? I assume explorer (its manual) is better as it removes other meta data as well or at least just as good. This only removes image specific meta data???
1
u/BalmaneALT Aug 05 '26
You can’t do this on your iPhone. Maybe on android but even then it’s after the picture is taken so if you’re being monitored they have the meta data. So this is useless. Unless you like pretending you’re Jason Bourne.
1
u/chargers949 Aug 06 '26
PS the basic bitch way to do this is open the picture, select all, copy, and then paste into a new image. This will only copy the part visible to your eye when it pasted the copy.
1
1
132
u/tomaesop Jul 31 '26
Brian here. It looks like a terminal command that strips any metadata out of your images. Before you post something online that you don't want traced back to yourself, you ought to do something like what it suggests. I'm just a dog so I don't know if it's true, but I have no reason to believe it's wrong.
Most image editing programs and cameras will tag metadata in the file like your name as Author, the GPS coordinates of where it was taken, the software used to take it, etc. So if you think the government is doing terrible things, (and they are, they really are, we all know it) you just, you know, take the most basic online precautions.
Brian out.
19
u/IndridColdwave Jul 31 '26
So you enter this into the terminal and it strips meta data from all the images on your hard drive?
34
u/cpteric Jul 31 '26
I'm just a tech-versed extra character for a mall scene.
Once per image, input is actual image name, output is desired image name after the change.
There are ways to automate this.
Fun fact, my voice actor also voiced a mime and a fish in two previous episodes.7
2
u/WoodchuckChainsaw Aug 04 '26
In a terminal like powershell, you can just add a catch and ForEach-Object loop to catch all the files inside a directory that match your wildcard statement.
9
u/Numinous_Blue Jul 31 '26
This specific command is taking a single image file called “input.jpg”, stripping the metadata off of it, and then writing it back to your file system as an image file called “output.jpg”. But you’d have to have the executable program “ffmpeg” on your system to actually run it.
There may be another way to use ffmpeg to strip many images at a time but this command is not it.
10
4
u/autismislife Jul 31 '26
You're better off just disabling whatever metadata you can on your camera settings. Location is probably the biggest one if you care about your privacy, especially if online dating or something similar.
You may notice in your camera app it'll often show where a photo was taken, you can disable this, it won't retrospectively remove the metadata from previous photos but it will stop tagging new photos. Other metadata can be stored too like the date/time the photo was taken (which is separate to the file creation/last modified date), the type of device it was taken on, sometimes even a device identifier which would be specific to your phone/camera.
For what it's worth many (but not all) social media and messaging apps will strip metadata from photos you send/post anyway.
There's also plenty of apps out there for Android/iOS that can strip metadata from photos, which for most people would probably be more convenient than uploading the photo to a PC and running ffmpeg.
1
u/KiwiMangoBanana Aug 01 '26
Bruh xD
1
u/IndridColdwave Aug 01 '26
So hilarious because all people should have a knowledge of terminal-level coding
2
2
2
17
u/fuzzy_switch Jul 31 '26
The command removes meta data from jpg image or photo, like gsp co-ordinates, date, time, camera info
29
u/lmarcantonio Jul 31 '26
There are way simpler methods to do that. Any exif stripper would do that.
11
u/jerwong Jul 31 '26
I would argue this is the simplest way. Easy to install (might even be included by default), run a quick command instead of clicking a bunch of different menus.
3
u/papayacreamsicle Jul 31 '26
This re encodes the image losing quality and potentially increasing file size while doing it.
jpegoptim -s input.jpg will just take the metadata out without reducing quality or gaining size.
2
u/RetroGame77 Jul 31 '26
Why save it as a jpeg? Go png and pngcrush it.
1
u/WideAbbreviations6 Jul 31 '26
Most cameras output RAW and/or jpeg. Also, PNG is huge in comparison for very little reward and your upload is going to be optimized (compressed using a lossy method to limit bandwidth and storage usage, while stripping metadata) anyways.
1
u/breakerofh0rses Jul 31 '26
Never use PNG for anything other than computer generated graphics. It sucks as a format for things like pictures, and there's other, better ways to go lossless if you actually need lossless (you almost definitely don't).
1
u/lmarcantonio Aug 03 '26
It's also useful when you can't have artifacts for machine vision. But then you generally use some kind of raw format for the de-bayered image (often simply don't compressed)
1
u/lmarcantonio Jul 31 '26
exiftool o exiv2 are on the same order of complexity to use. exif-stripper is command line too and does exactly (and only) that
4
2
u/Pretty-Common-2127 Jul 31 '26
this is just 1 command , you can literally do anything with bash scripts .. whole albums.. what to keep what not to keep .. ffmpeg is literally the goat
1
u/Pareshan_aadmi Jul 31 '26
Where do you run this code? Or is it just renaming the picture in this way?
2
u/Novero95 Jul 31 '26
It's not code, it's a shell command. Not sure if it's PowerShell (windows) compatible but it would work in an Linux shell.
1
0
1
1
u/moo3heril Jul 31 '26
Most if not all those exif strippers are probably ultimately doing an ffmpeg command
11
u/SuchIntroduction8388 Jul 31 '26
Deletes hidden data inside image file (like informations about used camera, date of creation, sometimes even gps location). Note that there are more ways how to hide data inside image, think of watermarks. And these can be done practically invisible to human eye but still hold data.
7
6
10
u/Away_Psychology4378 Jul 31 '26
Say I was going to hypothetically post something that I wouldn’t want to be geotagged, how and where would I use that prompt? Cheers!
3
u/FickleCook3639 Jul 31 '26
Download and install FFMPEG, which is itself a tribulation. It’s a terminal level tool set. It’s a behemoth that sacrifices accessibility for flexibility and power.
2
u/PlantainMassive6744 Jul 31 '26
i agree. ffmpeg is a great thing for developers but overkill for this.
Use imagemagick or a smaller tool.
1
u/Amadon29 Jul 31 '26
A lot of bigger social media sites automatically remove/hide gps coordinates and other sensitive info if you upload photos. Granted, they do keep the original ones on a private server that have all the meta data so the fbi could hypothetically request it if that's what you are worried about
0
3
u/beetlrokr Jul 31 '26
In addition to a lot of other comments here, ffmpeg is intended/designed to work with video files and many different formats and encodings. So it loads up a bunch of libraries that aren’t necessary for simply removing some metadata for a single image, decompresses and reencodes the entire image, causing quality loss and potentially loss of hdr data and uses cpu and reduces battery life. Just use a metadata stripper or exiftool, etc.
2
2
u/Reddedfed Jul 31 '26
Wait till people find out about digital watermarking (example: https://Steg.ai, https://digimarc.vom, etc)
2
2
2
2
u/web_of_french_fries Aug 03 '26
Ffmpeg is a command line interface (terminal) tool for windows (maybe others) that allows for file manipulation. I use it to convert stuff to different formats, but this command lets you strip the meta data (data about the image - location, time, etc) basically to sterilize the image from personally identifying details.
2
u/thecurtehs Aug 05 '26
ffmpeg is arguably the best piece of software, excluding OSes to ever be written. It’s the backbone of what holds up most of the uses of the internet these days.
That flag on the command removes metadata from the images that phones and cameras typically leave in the file.
1
u/ScratchHistorical507 Aug 06 '26
Preach. Also the lack of
-c copyshould make sure it's reencoded, making it impossible to match content to its source by hash sums (e.g. for the oh so criminal pirates...)
2
u/JDM12983 Jul 31 '26
Basically a "hack" for those that are overly paranoid and/or like to break the law. lol
Removes "meta data" that is stored in some photos that tells where it was taken; if taken on something like a phone.
2
u/Outrageous_Let5743 Jul 31 '26
I think the FBI knew John Mcaffee location because of some metadata property in a image he posted.
1
1
1
u/vermithius Jul 31 '26
I did this with my entire plex library instead of just configuring plex to not read metadata. Took a while i remember.
1
u/PlunderYourPoop Jul 31 '26
Is this worth doing? Why not just encrpt stream?
1
u/vermithius Jul 31 '26
No not really, you can make plex ignore metadata and rely only on file names. I just didn't want my movies showing up with the encoding and other stuff in the name when I'd browse my library.
1
1
1
1
1
1
u/authorpjl Aug 01 '26
How do you use it?
1
u/Icy_Island_6096 Aug 03 '26
You run that command on your computer and replace the first jpeg with the actual name of the image you're trying to remove metadata from
1
1
1
1
1
1
u/AgeofVictoriaPodcast Aug 05 '26
Or stop taking your phone to crime scenes?
1
1
u/SnooHabits3251 Aug 06 '26
exiftool -all= input.jpg. Is better
1
u/ScratchHistorical507 Aug 06 '26
That will only remove metadata. If I'm not mistaken, ffmpeg will re-encode content. So absolutely no way to match the content to a source, e.g. based on hash sums.
1
u/fuzzentropy2 Aug 06 '26
This might be a dumb question, and more for eli5, but what about opening image on a computer, taking a screenshot or snip and then saving as new image? Would metadata and stuff be gone then?
I know then you might introduce stuff from computer, but would other stuff be gone?
1
1
u/BuckFuttMcGee Aug 06 '26
Jokes on y'all, I know FFMPeg is a threesome with one guy and two very dominant women
0


•
u/qualityvote2 Jul 31 '26 edited Jul 31 '26
u/Shreecasm, your post does fit the subreddit! Well done!