KonradIT / mmt

Media Management Tool - make importing videos/photos from GoPro and other action cameras/drones a little bit more bearable.
http://mmt.camera
Apache License 2.0
109 stars 12 forks source link

Improve GPS accuracy when locating videos #109

Closed inode64 closed 1 year ago

inode64 commented 1 year ago

[Improve GPS accuracy when locating videos]

Improves the process of finding the correct gps location of the video. I have reviewed all my gopro videos and made all improvements to improve the accuracy I have removed the GpsFix and because some videos recorded with the gopro have the correct location but the gpsfix flag was not active, the same thing also happened with the speed there were videos with the correct location but at speed 0

Then I added a process to select the most repeated and next locations so we discard false locations. we also control the height because it is an indicator of incorrect position.

That's why in the end I added a filter by country so that they discard the false locations, but this generates an infinite loop that makes the videos repeat over and over again. I have gone crazy and I have not been able to solve it

Please help

All the best

Type:

Camera:

Component:

Checklist before approval:

inode64 commented 1 year ago

I'm done with the improvements. I have carried out tests with 377 videos from my GoPro HERO11 Black, after analyzing their GPS coordinates and locations that are correct, mmt has improved the effectiveness of the results.

Before:

Try yours with your videos and tell me what you think

all the best

KonradIT commented 1 year ago

Looks like your fix broke a test, which is the intended result: https://github.com/KonradIT/mmt/actions/runs/4690562299/jobs/8313820953?pr=109#step:5:117

Make hero6+ble true: https://github.com/KonradIT/mmt/blob/development/pkg/gopro/location_test.go#L18

Let's see if it returns the data

KonradIT commented 1 year ago

Holy crap, nice.

Switch hero7.mp4 and hero8.mp4 to true as well. I have my doubts about removing the GNSS lock setting, but it seems to work fine without it.

There are some linting errors as well, to make sure you push code that's linted, run golangci-lint run before every push.

inode64 commented 1 year ago

I don't see what the error is generating by golangci-lint

where is the wrong code?

KonradIT commented 1 year ago

https://github.com/KonradIT/mmt/actions/runs/4692809139

KonradIT commented 1 year ago

Don't skip the files. The root of the problem is the deterministic import rule from golangci-lint.

If you use vscode, I recommend you install the Go extension and turn linting on, much easier.

Use gci to sort out the imports: https://github.com/daixiang0/gci

inode64 commented 1 year ago

Na que no hay manera con el Lint :-( y ahora hemos sobrepasado el límite de descargas :-(

KonradIT commented 1 year ago

Es temporal lo de el api rate limit, en unos minutos lo correre manualmente.

Para arreglar el lint del deterministic import:

go install github.com/daixiang0/gci@latest
gci write --skip-generated -s standard,default .
KonradIT commented 1 year ago

Orden correcto de location.go:


import (
    "bytes"
    "io"
    "math"
    "path/filepath"
    "strings"

    "github.com/codingsince1985/geo-golang/openstreetmap"
    "github.com/konradit/gopro-utils/telemetry"
    mErrors "github.com/konradit/mmt/pkg/errors"
    "github.com/konradit/mmt/pkg/utils"
    "github.com/konradit/mmt/pkg/videomanipulation"
    "golang.org/x/exp/slices"
)
KonradIT commented 1 year ago

Revert go.mod/go.sum changes y pa alante.

KonradIT commented 1 year ago

gracias!!!