News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Extracting GPS Information from .MP4?

Started by Genesis, June 13, 2013, 03:10:39 AM

Previous topic - Next topic

Phil Harvey

Sure.  Send me a sample.  If it is a download link, make sure it is active for at least a week because I'm on vacation until next week.

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

osakahk2009

Hi Phil,
I have a sample in the following link.

https://drive.google.com/drive/folders/1nXkcDg3TdlDycmjo-X4J20xbx0UCR7EZ?usp=sharing

The coordinator of the mp4 read from Sony PlayMemories is 22 deg 17' 30" N, 114 deg 12' 42.8" E.

Thanks



Phil Harvey

Quote from: osakahk2009 on June 30, 2020, 11:35:50 PM
Hi Phil,
I have a mp4 with GPS info. shot by Sony A7R IV and I use your exiftoolwrapper to extract them but it doesn't show up.
Please help to check it out.
I can send you a small sample and please let me know how.

Thanks.

ExifTool 12.02 (when released) will decode the GPS from Sony A7R IV videos.

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

osakahk2009


osakahk2009

Hi Phil,
I have downloaded and tried out the latest version.
It works very well and it also works with the MP4 4K video that is shot with the Canon EOS R5.


airdrummer

#95
hi, phil, thanx again for a fantastic tool! it works great extracting gps from viofo a119 mp4s...the only problem is GPS Date/Times are not collated with the gps lat/lon/speed/bearing(which is called track?) does the -p gpx.fmt do the right thing?

Phil Harvey

Currently, no.  I suppose I could support one method for writing, but since ExifTool already supports reading 48 different formats of timed GPS the chances would be small that I would choose the one that you want.  And there is no way I would add the ability to write all of these formats.

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

airdrummer

ok, thanx, i'll look into what ffmpeg can do with gpx.

airdrummer

#98
turns out https://dashcamviewer.com can apply ./trackname.gpx to ./trackname.mp4, but only if using
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="Dashcam Viewer">
  <metadata>
    <name>Produced by Dashcam Viewer version 3.6.3</name>
  </metadata>
  <trk>
    <name>Track Start Time: 2021-01-05T15:29:30Z</name>
    <trkseg>
...

whereas ur gpx.fmt specifies version 1.0:
#[HEAD]<?xml version="1.0" encoding="utf-8"?>
#[HEAD]<gpx version="1.0"
#[HEAD] creator="ExifTool $ExifToolVersion"
#[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
#[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[HEAD]<trk>
#[HEAD]<number>1</number>
#[HEAD]<trkseg>
...

i've replaced the header with the dashcamviewer version, & it seems to work...is there any reason for v1.0?

Phil Harvey

Quote from: airdrummer on January 06, 2021, 12:50:31 PM
is there any reason for v1.0?

That is the specification I was going by when I wrote the fmt file.  But the fmt files are just examples -- feel free to modify them for your particular needs.

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

diplonics

Just a quick query re how some of the GPS related Tags data is defined by ExifTool across the GPS file formats that are supported.
In the .Exiftool_config file, which I'm using to support large file formats, I see the following:

2.  GPS:GPSPitch
3.  GPS:GPSRoll
6.  XMP-exif:GPSPitch
7.  XMP-exif:GPSRoll

Basically, is there a standard approach you've taken to define what is the Roll and/or Pitch data?
For example, in this thread post (https://exiftool.org/forum/index.php?topic=5095.msg60561#msg60561) relating to the 360 file format you had a look at, are these Tags available when I process this file type and if so what parameters did you determine them from as the file contains quite a few types of orientation data it seems..

Phil Harvey

These GPSPitch and GPSRoll tags are not standard.  I basically pulled them out of thin air for people to use if they find the need.

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

aluengo

Greetings and congratz for this amazing tool.
In the following file: https://drive.google.com/file/d/1V_y5NS-xrXpt2lNsmWcLeoJMpmRrFHJK/view?usp=sharing with latest exifTool version nowadays (12.2.4) I´m unable to extract any location info from it.
The video was recorded with the camera APP of an iPhone and shared via Telegram (does it matter?)

Any hints?

Thanks in advance.

Phil Harvey

What makes you think there is GPS in this video?

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

aluengo

Because it was recorded with GPS enabled...but Telegram reencoded it automatically when sharing...so I suppose some attributes were missing in the process.
Thanks for the quick answer, anyway!