Using the 70mai A810 Dashcam for Mapillary

Yes, of course - GPSData000001.txt - Google Drive
In general, I tried the set of scripts proposed by Doriel and got the result, however, I have some comments on it and I deleted the sequence uploaded to Mapillary. Firstly, as I indicated in the previous post, the first_script.py script cannot handle the real GPSData000001.txt file from the DVR due to the presence of incomplete lines or lines with incorrect coordinates (as it turned out, there are some). In order for the script to execute, I had to manually edit the GPSData000001.txt file. Secondly, different approaches are used when forming the gpx file and extracting images from the video. In gpx, points are added by interpolation until their frequency is reached with an interval of 1 meter. And it works really well. I decided to increase the interval to 2.5 meters for myself and got a gpx file with 338 points on a 3-minute video sample. The images are extracted with a constant time interval of 0.1 seconds. Thus, 1800 images were obtained from the video, of which about 20 were rejected by Mapillary. The result was a very high frequency of images. In my opinion, here we need to strive for the number of images in the result to be equal to the number of points in the GPX file. I hope it will be clear what I wanted to say. Unfortunately, I do not speak English and use Google Translate.
Well, just in case, here’s a sample video - NO20240716-183414-006050F.mp4 - Google Drive

I have a 70mai A500s dashcam, and it also stores the GPS data as a txt file.
Do you need more examples?
It has been added to mapillary_tools?

Thanks @andrcondon - it has not yet been added to mapillary_tools, I am hoping to get a volunteer to contribute the code to GitHub - mapillary/mapillary_tools: Command line tools for processing and uploading Mapillary imagery - I think the sample code provided in this thread is already in python so theoretically it should be straightforward.

In the meantime you either need to use the .exe or compile it yourself based on the code provided in this thread.

1 Like

As we have found out, the format of GPS text files for 70mai A810 and A800 DVRs is almost the same, which allows them to be processed by one script. It will be interesting to see how this file looks for the A500.

1 Like

Sorry for the late response
The format looks alike, but lacks the video file name:

https://drive.google.com/file/d/1Wu9ClXj6bzhtOm37_lEbio5a1UTOehTq/view?usp=sharing

$V02
1739607152,A,-34.913266,-56.175650,34700,138,-2,84,46,0,0,0,0
1739607154,A,-34.913289,-56.175651,34700,0,-3,85,48,0,0,0,0
1739607155,A,-34.913298,-56.175657,34700,0,-4,85,47,0,0,0,0
1739607157,A,-34.913289,-56.175645,34700,0,-4,86,47,0,0,0,0
1739607158,A,-34.913288,-56.175638,34700,0,-3,84,47,0,0,0,0
1739607160,A,-34.913280,-56.175630,34700,0,-2,84,47,0,0,0,0
1739607161,A,-34.913280,-56.175628,34700,0,-4,84,49,0,0,0,0
1739607163,A,-34.913281,-56.175628,34700,0,-3,84,48,0,0,0,0
1739607164,A,-34.913284,-56.175619,34700,27,-3,84,46,0,0,0,0
1739607166,A,-34.913283,-56.175608,34700,55,-3,85,45,0,0,0,0
1739607167,A,-34.913273,-56.175599,34700,55,-3,85,48,0,0,0,0
1739607169,A,-34.913251,-56.175534,7000,166,-4,85,48,0,0,0,0
1739607170,A,-34.913238,-56.175529,7000,0,-4,85,49,0,0,0,0

I think the $V02 tag starts a new video file

Thank you @matsumi - I’ve also been chatting with GPS Babel about adding support for this format. Are you OK with them using your .txt file and granting permission to use and publish it. If so a portion of it will be publicly available.

Thank you @andrcondon - are you also OK with granting permission to use and publish your txt file? If so a portion of it will be publicly available.

Yes, I grant permission to publish my file

1 Like

Yes, it’s certainly worth asking! I would encourage folks to try (and in parallel I think it also makes sense to see what we can do with the current format). Unfortunately tools like exiftool and GPS Babel have demonstrated that historically manufacturers aren’t particularly consistent in how they treat this data.

1 Like

Hello, if it is still needed, I have uploaded a TXT file and examples of MP4 videos from the A810 dashcam to Google Drive and grant permission for their use.

I also received a sample video file and a TXT file from the new 70mai Dash Cam 4K Omni (X800), and it seems that the structure of the TXT file has not changed.

1 Like

Excellent, thank you!

I thought I was giving permission for use when I posted links to the data I provided.

Hi folks, we now have a good & safe way to support the 70mai dashcams on Windows/Mac/Linux thanks to work by the GPSBabel team. Here are the instructions:

  1. Install one of the continuous releases of GPSBabel (support is not yet available in the “official release”)

  2. Select “70mai Dash Cam” as the format, and choose the input .txt file that your 70mai dashcam creates and set the output filename and press OK for GPSBabel to generate a converted .gpx file.

  3. Drag your video file into the Mapillary Desktop Uploader. You will get an error that there is no GPS data. Click the overflow menu, select “Add GPX file” and choose the .gpx you created in step 2.

Now you’re ready to upload your 70mai video.

Cheers,

  • Boris
3 Likes

Hi @boris I’m currently trying to write my own code to process and prepare files. So I have few questions on this 3rd step:

  1. How Mapillary Desktop Uploader (and mapillary_tools?) know which part of produced .gpx track to use? How are they linked?
  2. If I want to upload video from “Back“ cam will it work the same way?

Solely by timestamp. mapillary_tools collapses all trkseg and trkpt elements into one track (trk element) ordered by ascending time. If it finds an image timestamp or a video time index to be in the time span defined by a GPX track then the image or a video frame is picked for GPS positioning. Video files are processed based on timecode data and/or the video stream’s creation_time tag, that is, the timestamp when video recording started. Do not worry too much about it. It works.

Yes, as long as the video file has timecode data or its video stream has the creation_time tag.

2 Likes

Hi, I’m using the same dashcam and I’m having the same issue. Is there any solution?

@GITNE can you help with command to process .mp4 files? I currently have something like this in Videos folder:
video_1_front.mp4
video_1_back.mp4
video_1.gpx
video_2_front.mp4
video_2_back.mp4
video_2.gpx

can I run mapillary_tools process providing single mp4 file + gpx or what would be the best solution?
I can collect all gpx into one single, but currently it weights 80Mb, so I believe this is not optimal for “process” command

Since I am not sure what exactly you are trying to achieve or what are you struggling with, I am unable to help you. It is very difficult to diagnose anything remotely without the exact files at hand. Have you simply tried the following?

mapillary_tools video_process --geotag_source gpx --geotag_source_path video_1.gpx --offset_angle 0 --interpolate_directions video_1_front.mp4

If you want to make a single sequence out of a video file then you would need to run something like this:

MAPILLARY_TOOLS_MAX_SEQUENCE_LENGTH=inf MAPILLARY_TOOLS_MAX_SEQUENCE_PIXELS=inf mapillary_tools video_process --geotag_source gpx --geotag_source_path video_1.gpx --offset_angle 0 --interpolate_directions --cutoff_distance inf --cutoff_time inf video_1_front.mp4

Of course, as always, you have to match the video start timestamp with the first GPX track point timestamp or any later GPX track point timestamp (GPX track timestamp to video frame matching ends with whichever ends first), unless the video file’s video stream has a correct creation_time tag. If video start timestamp matching gives you trouble you can try --geotag_source gpx,exiftool_runtime.
Generally speaking, when using multiple devices, you usually want your GPX track recording time to be a bit longer than the video duration and the video duration within the GPX recording time. In other words, you start GPX recording before you start video recording and stop GPX recording after you stop video recording.

Merging GPX files prior to processing is generally not a good idea, unless you know exactly what you are doing.

1 Like

video_process extracts sample frames from video. I just need to use process to extract gps data and then use it in upload
As I understand process uses ALL video files in directory with a single .gpx source file. I want to know if I can use single specific .mp4 instead off ALL video files?