Extract GPS on a frame by frame basis

Started by ChuckBryant, April 21, 2010, 10:05:36 AM

Previous topic - Next topic

ChuckBryant

I'm running a MT2S file from a Sony HD camera through a DirectShow graph to render video, and was wondering how I could get to the geotag on the frames.  I came across your program but its running against a compressed file, where as I'm receiving a frame by frame, uncompressed....

My question is do you think the extraction of the metadata needs to happen BEFORE the H.264 decoding or will it still exist in the frames after?  If it still exists, do you know of any resource that would show me where the metadata is in the uncompressed frame?  I can get to the frame, I just am not sure where to look IN the frame.  I would do more of an examination of your program, but it occurred to me that you are looking at the video BEFORE decoding.  Any thoughts?

Thanks!

Phil Harvey

I'm guessing that DirectShow is using some general H.264 codec to uncompress the video.  To be able to obtain the geotags this way would likely require both the video codec and DirectShow to properly handle the metadata in the H.264 stream.  This seems highly unlikely to me, but the answer would best be obtained by asking someone more knowledgeable about DirectShow.

ExifTool doesn't use any video codecs to decode the H.264 stream -- I process the stream directly and extract what I need myself.  The GPS information is stored in a proprietary format, so it isn't something I would expect other software to be able to handle.

[edit] BTW, the GPS isn't stored for each frame anyway, but at regular intervals (about 2 per second) in the H.264 stream.

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