The Sony XR200 camera is able to include GPS location data in its
video recordings. Normally, this information is only visible when
playing back the video in the camera itself. Even then, its not
possible to view it at the same time as the time of day data - you
need to select one or the other.
If the camera video data is transferred to a computer via the USB
port, the GPS data is "lost". Computer video players capable of
replaying the .MTS video streams only show the time of day data;
there is no way to view the GPS data.
Ideally we want to be able to display the time of day and GPS
informations simultaneously with the video stream itself.
We describe here how to extract all the required data from an MTS
format video stream file and then overlay the information over a
replay of the of the video file.
We assume the camera data has been transferred to computer via the
camera's USB connector, resulting in a directory containing a number
of video clip files with an .MTS suffix e.g. 00000.MTS, 00001.MTS,
We previously used Phil Harvey's exiftool application to
extract the GPS and other data from the video files. For reference,
that previous method is described here.
The previous method can take a long time to run. On a 2GB video file
(the maximum produced the Sony XR200 camera), the data extraction
can take about an hour - the exact time taken will depend on the
machine being used.
We now use a C application, avchd2srt-core
which extracts the GPS data and simultaeously generates a subtitle
file which video players such as mplayer can use to
display as text over the video stream. A 2GB video file is now
processed in 30-40 seconds!
We create a subtitle file from a video file named, say, 00000.MTS by
running the command:
This generates a file named 00000.srt in the same directory as the
MTS video file.
To display the subtitle data over the video, simply run:
-demuxer lavc -sub 00000.MTS
(if the .srt file is in the same directory as the .MTS file, mplayer
will find and use it)
Where is this
here but an our updated version
doing this on a Mac?
It is possible - see details of our own avchd2srt here.
extract an individual image file that corresponds to an entry in
the .srt file?
See the details of howto
relate entries in the .srt file to image files extracted from the
Please send any questions, comments, advice etc.,
to Chris Willing <c.willing _at_ uq.edu.au>