The State of GPS Data from Mobile Devices
Most of the mobile devices today support GPS geo tagging. In fact most of them come bundled with navigation software that uses GPS and therefore all the pictures and (maybe) videos can be geo tagged. But as expected different vendors come with different support and formats.
iPhone OS comes with geotagging both on video and image files, while the latest Android and Symbian (the Nokia main OS for smartphones) can geo tag only images.
Even more – until recently Symbian didn’t support any geotagging before the installation of an additional software – such as Location Tagger . So generally the things are quite simple:
- iPhone OS geotags both video and image files;
- Android geotags only images;
- Symbian geotags only images – and on some devices this is possible only after installing a software;
This is in breve the state of mobile device geotagging!
Why Use GPS Data?
Perhaps one of the main reasons why not support geotagging especially on video files can be the usage of those geo tags. First of all what a geotag means?
You may know that even Android doesn’t “geotag” videos this is not quite true. Because after using you gallery you can see where those videos are shot. This is fantastic, but actually the real information about where the video has been taken is not into the video file, but it’s in an additional log file that keeps it. Thus actually the video files doesn’t know the geo coordinates.
Here comes the problem with video format, because you cannot be sure that every format supports tags that can keep geo coordinates. Actually quicktime’s MOV can store them, while Symbian’s 3GP cannot. In fact Symbian cannot store any geo information about video files!
So now we’ve at least three different formats for each of those three vendors.
- quicktime for iPhone
- mpeg-4 with Android
- 3gp with Symbian
For now I can only say that iPhone can keep the geotag into his video files.
But let me return to the question – why we need this geo tags? Until the video file is on the mobile device – there’s no problem. But once you try to download it – whether on Flickr, YouTube, Picasa, etc. you’ll lose any geo information if it’s not into the file tags. And of course if the above sites can’t read it!
The general reason to store this data into the file is to move it along with the file. Once you move this file from your mobile device to a web platform you’ll see where the file has been created.
EXIF, Exiftool and PHP’s exif_read_data
There are several tools to read geotags. For images, and here we talk only for JPEGs, this is the EXIF information. You can download the exif command line program and try to reed data with it:
exif filename.jpg |
Which can result in something like that:
Manufacturer |Nokia Model |E71 Orientation |top - left x-Resolution |300.00 y-Resolution |300.00 Resolution Unit |Inch YCbCr Positioning |centered Compression |JPEG compression x-Resolution |72.00 y-Resolution |72.00 Resolution Unit |Inch FNumber |f/3.2 Exif Version |Exif Version 2.2 Date and Time (origi|2011:01:24 12:15:01 Date and Time (digit|2011:01:24 12:15:01 ComponentsConfigurat|Y Cb Cr - Aperture |3.20 EV (f/3.0) Light Source |0 Flash |Flash did not fire, auto mode. Focal Length |4.9 mm FlashPixVersion |FlashPix Version 1.0 Color Space |sRGB PixelXDimension |2048 PixelYDimension |1536 Custom Rendered |Normal process Exposure Mode |Auto exposure White Balance |Auto white balance Digital Zoom Ratio |1.00 Scene Capture Type |Standard GPS tag version |0x02, 0x02, 0x00, 0x00 North or South Latit|N Latitude |42.00, 39.00, 24.67 East or West Longitu|E Longitude |23.00, 21.00, 28.45 Altitude reference |0x00 Altitude |625.50 |
While for video files (iPhone) exif cannot help you, this is possible through Exiftool. With it you can read even iPhone video geotags:
./exiftool filname.mov |
In addition this information can be read with PHP via exif_read_data:
$info = exif_read_data('filename.jpg'); var_dump($info); |
And this will give you not only standard tags, but geo tags too.
Great. Now how to WRITE geo tags to MP4 containers?
I’m looking for a command line, Linux compatible tool that can do that.
Any suggestion?
Thank you
The part about Symbian is not true, my N8 was able to do it out of the box without any firmware updates or additional software…for pictures AND video. The N8 came out way before your post…like more than a year I think…?
@David – sure you’re right about your N8, but that’s not true about all Nokia/Symbian mobiles.
That looks an odd lat / long format does
North or South Latit|N
Latitude |42.00, 39.00, 24.67
mean 42° 39′ 24.67” N?
sorry for necroposting but since android 4.0, videos are no more in 3gp, but in MP4 with geotag.
$ mediainfo VID_20120423_162955.mp4
General
Complete name : VID_20120423_162955.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 28.8 MiB
Duration : 1mn 16s
Overall bit rate : 3 136 Kbps
: +48.5345+001.8935/
Video
ID : 1
Format : AVC
....
Just a general comment – storing persistent geographic information about device location/orientation and indeed geographic descriptors in video files is by no means trivial. As pointed out in posts above, it’s due to various video encoding formats and supported standards when moving media from one platform environment to another. Also it’s one thing to have location but many SmartPhones now support orientation so, possible to record camera orientation (to some degree of accuracy at least)….sometimes its useful to know where the imaging sensor is pointing. Geospatial tagging should also be supported, enabling users tag frame inside full motion video streams. Devising a universal standard that would allow additional intelligence such as location, orientation, tag descriptors to be captured, stored, discovered, edited within the video file would be an elegant solution but the likelihood is that this is not going to happen anytime soon. The short term solution is to synchronise and store this data in an associated file.
We have just developed a basic geospatial multimedia demonstrator platform (University spinout) Ubipix – http://www.ubipix.com – it allows the user to capture geocoded video as well as image collections from Android and iPhone, tag these and upload these location tagged streams directly up onto ubipix.com….use can edit tags etc….its still pretty basic.
We are presently upgrading tagging functionality and also implementing a ‘Groups’ facility where users can establish and moderate their own groups. User can also drop their clips (iFrame like) into their own web pages by replacing ‘playvideo’ with ‘generic_player’ in the URL eg just change the URL from
Standard Ubipix Interaction Page for one clip
http://www.ubipix.com/playvideo.php?id=394e04cb
to
Ubipix Generic Clip URL
http://www.ubipix.com/generic_player.php?id=394e04cb
tim
tim.mccarthy@nuim.ie
Hi Guys
Thanks for the article, the question that I have is that I have a video in an H.264 format, generated from a unit that records videos and has a GPS plugged in to it. I want to extract the GPS data from the video file, since the GPS data is embedded on the video file.
Thanks
How can I get geotags from photos sent to me?
How can I get geotags from photos sent to me?