Exiftool reduce amount of metadata

Started by hontik, November 15, 2023, 12:04:55 PM

Previous topic - Next topic

hontik

Hello everyone!

My problem is next. I am searching for a way to get GPS information for the video frames. When I run exiftool videoname.mp4, I see the warning Warning: [minor] Use ExtractEmbedded option to extract timed GPSAnd seems this is exactly what I am looking for. But when I run exiftool -ee videoname.mp4 it is not showing any additional info and even reduces the amount of found metadata (for example, GPS tags are not there anymore).

P.S.: additional question, if I don't see any GPS tags when running exiftool videoname.mp4, does it mean that video hasn't any GPS information 100%?

StarGeek

Make sure you use the command in FAQ #3 as your base, so you can see duplicated tags, such as the GPS tags, and the groups they belong to.
exiftool -G1 -a -s -ee file.mp4

Exiftool cannot exact data on a per frame basis and geotrack usually don't have that much accuracy to begin with.  A geotrack can be extracted if exiftool knows the format (see Inverse Geotagging) but most companies embeds the data in their own way.  Currently, exiftool 66 different ways that GPS data can be embedded in the file.

Quote from: hontik on November 15, 2023, 12:04:55 PMP.S.: additional question, if I don't see any GPS tags when running exiftool videoname.mp4, does it mean that video hasn't any GPS information 100%?

Maybe, maybe not. It is unlikely but is entirely possible that data exists but exiftool can't recognize it. But if the file has been re-encoded in any way, such as with handbrake or ffmpeg, that data is lost.  This includes files downloaded from social media as they will re-encode files uploaded to their servers.

If your file is from some source other than directly from a camera and exiftool doesn't show any GPS data with
exiftool -G1 -a -s -ee file.mp4
then in all probability, there isn't any GPS data.

If you have a file the is directly from a camera that you think might have some that exiftool doesn't show, it can be checked if you provide a sample.
"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

hontik

Hello, @StarGeek, thank you for the answer!
You definitely answered my additional question, thank you.

But if we talk about the main question command you provided doesn't help me at all! :-(
The strangest thing is that I see the warning line that tells me to extract information about GPS from embedded files when I simply run exiftool on this video. But using this tag even reduce output information (

hontik

I noticed that I made a mistake. I am using not *.mp4 video file but *.AVI.
Maybe this could be useful.

StarGeek

Quote from: hontik on November 16, 2023, 05:15:00 AMBut if we talk about the main question command you provided doesn't help me at all! :-(

I can't explain it without being able to test the file.  It hasn't been my experience that adding the -ee (-extractEmbedded) option will reduce the output.
"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

hontik


StarGeek

That link says I have to request access, which I did.

Edit: Got it.
"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

hontik

I'm sorry, I had already given you the access

StarGeek

Ah, exiftool has a problem reading that file with the -ee option.  This warning doesn't appear without the -ee option.

C:\>exiftool -g1 -a -s -warning -validate -ee Y:\Sabnzbd\Completed\REC_0027.AVI
---- ExifTool ----
Warning                        : Error reading RIFF file (corrupted?)
Validate                        : 1 Warning

Phil will have to take a closer look at the file to see what's wrong.  I sent him a copy of the file so he doesn't have to ask for access.
"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

Phil Harvey

@StarGeek:  Thanks, got it.  But I sent the request before I read your post. :P

@hontik: Ignore that request.

I can reproduce this problem, and will post back here when I have had a chance to look into it in detail.

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

hontik

This is very strange because I don't see any errors if I run the same command as you guys.
And as I said, -ee option doesn't help me at all.. :(

hontik@hontik-laptop:~/data/local$ exiftool -g1 -a -s -warning -validate -ee REC_0027.AVI
---- ExifTool ----
Validate                        : OK

hontik

By the way, If you have some example of an open-source video with GPS data inside the video (so I can use -ee option to extract this information from the video) it would be great!

I am trying to extract GPS information from video per frame and found this video(REC_0027.AVI) on the forum and maybe this caused some problems :(

Phil Harvey

I can reproduce the effect that StarGeek was seeing (@hontik what version of ExifTool are you using?  We are on 12.69.)

The problem was that ExifTool parses the movie data with the -ee option, and any error here was causing it to abort processing.  I will add a patch so ExifTool will continue processing subsequent chunks if it encounters an error in the movie data.  However, with the new version you will get a warning about possibly corrupt movie data only if you use the -ee option.

The REC_0027.AVI video does contain timed GPS, but since it comes after the movie data, ExifTool 12.69 is missing it.  However ExifTool 12.70 will fix this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: hontik on November 17, 2023, 09:20:44 AMBy the way, If you have some example of an open-source video with GPS data inside the video (so I can use -ee option to extract this information from the video) it would be great!

This post has a link to a google drive which has some MP4s with GPS data.  I checked "NO20200201-082319-000980.MP4" and it has GPS data.  Based upon the other files there, the other MP4 should also have the data.
"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

hontik

@Phil Harvey, I use exiftool 12.40. Anyway, I got what you mean.
@StarGeek thank you for the link, this is exactly what I need!

Guys, thank you for your time and help! You are doing a great job!