Adding GPS data to movie files.

Started by Gusman, September 29, 2019, 08:04:32 AM

Previous topic - Next topic

Phil Harvey

@StarGeek:  I see the problem.  This affects only coordinates between -1 and 0.  I was using a signed integer print statement to pad with leading zeros, so the negative sign was lost since zero degrees is always positive.

I'll fix this in the next release.

- 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 ($).

Phil Harvey

11.69 is now available, and should solve the problem of the sign begin lost when writing GPSCoordinates with values between -1 and 0.

- 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 ($).

Gusman

Ah, that makes sense now, thanks

with regards to the below quote, this I didn't understand. I know its probably me but as I understood the below is saying taking out the comma separator and just have a space, but I get error when I tried, even putting quotes in

exiftool -Quicktime:GPSCoordinates=51.634597 0.606939
exiftool -Quicktime:GPSCoordinates='51.634597 0.606939'

Quotebut generally I would say that if you want to write signed numerical values you should write GPSCoordinates# (and use only a space as a separator), not GPSCoordinates.
Quote

Sorry you must get frustrated with numpty newbies like me  :-[
And it probably won't matter if the new release fixes the original issue.


StarGeek

You forgot the hashtag
-Quicktime:GPSCoordinates#='51.634597 0.606939'
"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

Gusman

Its always something simple! :)
I thought that # was just a shortcut way of saying 'GPSCoordinates number' as an explanation!!  ???

So in my mind it seems like two different ways to skin the same cat. And in my simplistic mindset this way necessitates an extra two more key strokes (if typing) which leaves more room for error, (if typing, and more so after the issues I've had with quotes)
Is there a overriding reason why this is a better way of writing the code?

Phil Harvey

ExifTool gives you lots of ways to do things.  You are free to choose the one that suits you best.

For more information about this specifically, you can read here about the various conversions that Exiftool applies to the values.  Adding a '#' as a suffix to the tag name accesses the "ValueConv", or "numerical" value of a tag ("numerical" --> hence the "#" suffix and the "-n" option name).

- 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 ($).

Gusman

I'd just like to say a big thank you, not just to you Phil but Stargeek also. Your explanations and patience have been outstanding.

Just let you know what you helped me achieve.

I have now been able to do what many apps have claimed to do and failed. Which is embed Location,Keywords, Description, Author, Copyright and Creator Contact into my video files. As said before I've been able to do this with photo files but not video up until now.
The hardest issue was getting the info I required, (which was mainly Keywords, but Location and description as a 'nice to have') to show up in the information pane of the viewer I use which is Apple Photos.
Previous apps I'd used had manage to embed some of the info in the file but it wasn't read by Photos. No app managed to embed keywords!

I know there is probably a better way! But utilising my current knowledge I have put the code into an excel S/s. I copy and paste the info I need, 'location, keywords & description' into their corresponding cell and concatenate a script line which I copy and paste into terminal, then drag in the file to be changed.
The whole process is pretty quick, and to be honest I don't think it would be any quicker using any of the previously mention apps if they worked, as I would just be copy/pasting the same info into their GUI much the same as my S/s.
So all in all I'm quite chuffed at what I've achieved! But I couldn't have done it without your help.

Another plus is my son has taken an interest and now thinks he can make a basic GUI to maybe make it that bit quicker and better looking. He's been playing with various coding platforms at school and this has given him a goal to utilise what he has learned, once he saw what was needed and the end result.

Many thanks
Wayne

StarGeek

Just to point out an option, you could save the excel spreadsheet as a CSV file and then use exiftool's -csv option to write the data to the file.  You could also do it in batch, create the spreadsheet will all the data and then write it all with a single exiftool command.  See also FAQ #26.

It requires the spreadsheet to be in a specific format, but not that hard to create.  You could use exiftool to create a blank version, load it up in Excel, fill in the data, and then write it out.  See FAQ #12 for info on exporting to a csv file.
"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: Good suggestion.

@Gusman: It may be helpful to others if you could post a short summary of which ExifTool tags correspond to what information displayed by Apple Photos.

- 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 ($).