Skip to content

GoPro 360 videos processing: more flexible Exiftool crop parameters #200

Open

Description

@PanierAvide

Short Description

In the GoPro 360 video processing module, an Exiftool command is used for setting crop parameters on the resulting equirectangular image : https://github.com/mapilio/mapilio-kit/blob/main/mapilio_kit/components/geotagging/gps_from_gopro360.py#L220

This command indicates that the resulting image is 4096 x 1344px, I have a series of GoPro Max 360 videos that are working through the whole process, but ends up being 4096 x 2048px (which is what we can expect from equirectangular images, 2x longer than their height).

Feature Use case

To make this tool more adaptable, we could use a nice exiftool feature that allows to compute these parameters on the go, depending of real image size. It expects image to always be 360°, but sets top/bottom crop depending on how much pixels are missing from a classic equirectangular image (width/2).

Here's the alternative version of this command:

    cmd = f"exiftool -CameraElevationAngle=360 " \
          f"-make=GoPro " \
          f"-model=Max " \
          f"-ProjectionType=equirectangular " \
          f"-UsePanoramaViewer=True " \
          f"'-CroppedAreaImageWidthPixels<$ImageWidth' " \
          f"'-CroppedAreaImageHeightPixels<$ImageHeight' " \
          f"'-FullPanoWidthPixels<$ImageWidth' " \
          f"'-FullPanoHeightPixels<$ImageHeight' " \
          f"-CroppedAreaLeftPixels=0 " \
          f"'-CroppedAreaTopPixels<${{Imagewidth;$_=($_/2-$self->GetValue(""ImageHeight""))/2}}' " \
          f"{frames_folder}"

Additional

I'm making an issue instead of a PR, as I have only one example of these 360 videos at my disposal. I don't know until which point these can be of various different formats. The offered command though should adapt to any original ratio that may come. I can offer a real PR if the change is OK for you.

Activity

  1. added a commit that references this issue on May 17, 2026
    9376df2
  2. chrisdebian commented on May 18, 2026

    @chrisdebian
    Contributor

    Hi,

    PR #211 addresses exactly this — it replaces the hard-coded crop parameters with a dynamic calculation based on the actual image dimensions, so the command adapts to whatever resolution the camera produces. It is currently awaiting review.

    Thanks, Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions