GNOME Bugzilla – Bug 481169
[tag] add support for geo tags (gps location etc.)
Last modified: 2008-09-03 02:52:28 UTC
It would be nice to provide the ability of storing geotags inside multimedia files. Of course some research would be necessary about which data is stored and in what format. The documentation about how the EXIF standard does this can be found under http://www.exif.org/specifications.html (specification 2.2, page 52) or http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html
If we ever add new tags for that, they'd probably go into libgsttag in -base and not core. Currently, I don't really see the point though, since we don't support EXIF tags yet (AFAIK), and that's probably the main use case.
Sorry for posting to core and not base, do not know the gstreamer internal structure that well. Actually, this idea is not intended to set EXIF tags, sorry for my unclear bug report. It is intended to store geotags in other file types like vorbis or speex. The EXIF specification is just there for information about how others store the tags. If I currently want to store geotags in an ogg/vorbis file, I can only store them inside the 'comment' field, but that means that the comment field is reserved for my geotags and cannot be used for anything else. Vorbis supports free-text tags, and I bet most other file formats do too, but I cannot set them using the TagSetter. That was the idea behind my feature request.
For vorbis/speex/flac you can use GST_TAG_EXTENDED_COMMENT which can contain key=value pairs and should be written as key=value into vorbis comments.
I think having the tags defined makes sense. Exif/xmp muxer/demuxer will come. If we use GST_TAG_EXTENDED_COMMENT, we cannot map the tags between different formats.
Yes, I agree with Stefan. In addition to EXIF and XMP that has some tags related to GPS, there might be some other formats or individual applications interested in GPS tags. Follow bellow my suggestion for those tags: GST_TAG_GPS_LATITUDE G_TYPE_STRING "DDD,MM,SSk" fixed size string where: D- degrees, M- minutes, S-seconds, k- N (north) or S (south) GST_TAG_GPS_LONGITUDE "DDD,MM,SSk" fixed size string where: D- degrees, M- minutes, S-seconds, k- E (east) or W (west) GST_TAG_GPS_ALTITUDE G_TYPE_FLOAT (negative mean bellow sea level) GST_TAG_GPS_SATELLITES G_TYPE_STRING (This tag can be used to describe the number of satellites, their ID number, angle of elevation, azimuth, SNR and other information in ASCII notation) GST_TAG_GPS_MEASUREMODE G_TYPE_INT (2 or 3 dimensional) GST_TAG_GPS_DOP G_TYPE_FLOAT (data degree of precision, HDOP for 2-dimensional, PDOP for 3-dimensional) GST_TAG_GPS_SPEED G_TYPE_FLOAT (always in km/h) GST_TAG_GPS_TRACK G_TYPE_STRING "xxx.xxkyyy.yy" fixed size string where: xxx.xx from 000.00 to 359.99 yyy.yy from 000.00 to 180.00 (vertical from down to up) -01.00 for unknown direction k - 'T' true direction k - 'M' magnetic direction This value means the direction of movement. GST_TAG_GPS_IMAGE_DIRECTION same type as GST_TAG_GPS_TRACK this value means the direction of image (captured, or on user hands) GST_TAG_GPS_PROCESSINGMETHOD GST_TYPE_STRING (method used for location finding) GST_TAG_GPS_AREAINFORMATION GST_TYPE_STRING (name of the GPS area) GST_TAG_GPS_DIFFERENTIAL G_TYPE_BOOLEAN (if using measurement with differential correction) I think those fields are good for the time being (I have proposed them by looking at Exif and XMP, except for vertical direction with was by myself). BR, Edgard
In addition, for SPEED we could have a char to say Horizontal, Vertical or vecTorial.
I think longitude and latitude should also be floats (ie. WGS84 decimal degrees, which is what's most useful and most easy to process in practice). Do we really need all of this stuff, is it really that useful?
I belive GST_TAG_GPS_LATITUDE, GST_TAG_GPS_LONGITUDE, GST_TAG_GPS_ALTITUDE would be enough. They need to be defined, as the raw numbers can be interpreted in different ways. I'll cook up a proposal.
double, please. Latitude/logitude expressed as float has a resolution of 19 meters.
Okay, so what about GST_TAG_GPS_LATITUDE, GST_TAG_GPS_LONGITUDE, GST_TAG_GPS_ALTITUDE as doubles GST_TAG_GPS_LATITUDE: degrees, negative values for southern latitudes GST_TAG_GPS_LONGITUDE: degrees, negative values for western longitudes GST_TAG_GPS_ALTITUD: meters, zero is sea level That matches what 3gp/mp4 does. Its also sufficient for EXIF [1][2] [1] http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html [2] http://www.exif.org/Exif2-2.PDF Instead of GST_TAG_GPS_AREAINFORMATION we could have GST_TAG_GPS_LOCATION (see Bug #548652). I would be fine with assuming that we talk about Earth locations always for now.
Created attachment 117450 [details] [review] add geo location tags I named the tags slighly different. I wanted to avoid GPS as the values don't neccesarily come from a GPS. Especially location could be even manually tagged. This new GST_TAG_GEO_LOCATION_NAME should then imho be used in gst-plugins-base/gst-libs/gst/tag/gstvorbistag.c LOCATION : Location where track was recorded
Created attachment 117760 [details] [review] add geo location tags more explaination
2008-09-01 Stefan Kost <ensonic@users.sf.net> * docs/gst/gstreamer-sections.txt: * gst/gsttaglist.c: * gst/gsttaglist.h: Add new tags for geo location and clarify purpose of existing location tag. Fixes #481169