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
96 stars 11 forks source link

Use date from GPS or exif #114

Open inode64 opened 1 year ago

inode64 commented 1 year ago

It can happen that the images are stored on a different date than the time they were actually taken. Above all, it improves when using the GPS time, even if the real value of the position is incorrect, I have reviewed all my videos and when there is any position, the date is correct. Then in the next step is to use exif because the files can be modified, you cannot trust the date of the file, you have to use exif By the way, I have taken the opportunity to refactor the code that you had duplicated in the different cameras


Puede pasar que las imágenes se almacenan en una fecha diferente a la hora en que realmente hayan realizado. Sobre todo se mejora al utilizar la hora GPS aunque el valor real de la posición sea incorrecto, he revisado todos mis videos y cuando existe cualquier posición la fecha es correcta. Luego en el siguiente paso es utilizar exif porque se pueden modificar los archivos, no se puede uno fiar de la fecha del archivo, hay que utilizar exif De paso he aprovechado para refactorizar el código que tenias duplicado en las diferentes cámaras

Type:

Camera:

Component:

Checklist before approval:

KonradIT commented 1 year ago

I'd throw in a test case with the Extract GPS coordinates file. https://github.com/KonradIT/mmt/blob/development/pkg/gopro/location_test.go

Also, the Insta360 and DJI files don't have GPMF data, just Exif or file creation. Maybe pass CameraType to the function so it knows not to parse GPMF.

inode64 commented 1 year ago

I'd throw in a test case with the Extract GPS coordinates file. https://github.com/KonradIT/mmt/blob/development/pkg/gopro/location_test.go

Also, the Insta360 and DJI files don't have GPMF data, just Exif or file creation. Maybe pass CameraType to the function so it knows not to parse GPMF.

The process respects the other types of cameras. I summarize the workflow that is used to find the correct time. Starting from the logic that the GPS and Exif data are more precise than the time of the file.

1º Search the mp4 videos for the GPS time when there is a location signal. 2nd search in the date in the GPS exif data. 3rd Look for the date in the Exif data "DateTimeOriginal", "DateTime", "DateTimeDigitized" 4º In case all of the above fails, use the time of the file.

KonradIT commented 1 year ago

Yes, but it'll be useless to do step 1 for DJI/Insta MP4 videos. Might as well skip it.

inode64 commented 1 year ago

better like this

inode64 commented 1 year ago

Ohh, Authenticated requests get a higher rate limit :-(