Geolocation information in mobile video files

Geolocation Metadata in iOS and Android Video Files

More specifically, in video files recorded and uploaded through HTML Media Capture (e.g., using <input type="file" accept="video/*" capture>).

Context:

  1. Our video recording platform processes tens of thousands of user-generated videos per day. Some of them are captured directly in the browser using HTML Media Capture and uploaded to us, and might bear geo-location information.
  2. In relation to our clients and the law, we need to be careful what personal information we touch, access, or process.

On iOS, the location metadata is stripped out.

On an iPhone 13 Pro, running iOS 18.6.2, with Location Services activated and with the Camera app set to be able to access the location While using the APP, I was unable to get any GPS/location information from the uploaded mp4 video recording when using Safari to:

  1. Record on the spot on a web page;
  2. Choose an existing recording from the library.

Sending the same existing recording through AirDrop to a Mac device with the Location information included, did result, as expected, in a .mov file with lots of GPS coordinates in its metadata.

Using exiftool to extract GPS information

I used the command line exiftool to view the data: exiftool video.mp4 | grep GPS.

user@My-M4-Pro-Mac-Mini Downloads % exiftool IMG_0257.MOV | grep GPS                 
GPS Coordinates                 : 41 deg 29' 38.76" N, 29 deg 7' 6.96" E, 19.373 m Above Sea Level
GPS Altitude                    : 19.373 m
GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 41 deg 29' 38.76" N
GPS Longitude                   : 29 deg 7' 6.96" E
GPS Position                    : 41 deg 29' 38.76" N, 29 deg 7' 6.96" E

Using ffprobe to extract location information

ffprobe can also be used with the following command: ffprobe -i IMG_0257.MOV -print_format json -show_format . Here's the part that includes the location (ISO 6709 format):

"format": {
        "filename": "IMG_0257.MOV",
        "nb_streams": 6,
        "nb_programs": 0,
        "nb_stream_groups": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "0.465011",
        "size": "391098",
        "bit_rate": "6728408",
        "probe_score": 100,
        "tags": {
            "major_brand": "qt  ",
            "minor_version": "0",
            "compatible_brands": "qt  ",
            "creation_time": "2025-08-25T09:40:25.000000Z",
            "com.apple.quicktime.location.accuracy.horizontal": "19.785002",
            "com.apple.quicktime.full-frame-rate-playback-intent": "0",
            "com.apple.quicktime.location.ISO6709": "+41.1971+019.1686+089.373/",
            "com.apple.quicktime.make": "Apple",
            "com.apple.quicktime.model": "iPhone 13 Pro",
            "com.apple.quicktime.software": "18.6.2",
            "com.apple.quicktime.creationdate": "2025-08-25T12:40:24+0000"
        }
    }

Whether or not the metadata is present in the file to begin with is governed by the OS-level Location Services toggle under Settings > Privacy & Security. The Camera app also needs to be given access to the location information.

Older iOS/Safari versions might behave differently.

On Android, the location metadata is stripped out.

Android is the same story. We tested on a Samsung Galaxy S21 FE 5G running Android 14 and the latest version of Chrome 139. No location data was included with the mp4 file that was transmitted to our server through the HTML Media Capture based form for mobile devices and we had enabled Location services at the OS and Camera app level. The Camera apps we've tested on Android have a separate Save location or Location tags setting which seems to be OFF by default.

Collecting geo-location information

We worried about privacy and whether we touch such data, but if this information is necessary for your use case, you can collect it separately in the browser using the Geolocation API and save it together with your other recording metadata. It has wide browser support and it will trigger a user consent dialog.

Geolocation Metadata in iOS and Android Video Files
Share this
IT TAKES 1 MINUTE
Sign up for a 14 Day Trial

With our 14 days (336 hours) trial you can add audio, video and screen + camera recording to your website today and explore Pipe for 2 weeks