Viofo A119 V3 / Blueskysea B4K and Mapillary

I’ve managed to get the specs for both Blueskysea B4K and Viofo A119V3.
Thanks to the great support from @jorrarro, processing script is ready, I will start trials with Viofo workflows end of this week.

So far, image quality-wise A119V3 looks unbeatable, even though it’s ‘only’ QHD

I had the Viofo A119V3 but had issues with the GPS data.

There was an issue for me with the embedded GPS. It seemed to update the track once every 60 frames or something, which was fine for video but for 1fps images (that I typically use for Mapillary) meant the trace was really blocky. I got round this by using OCR against the hardcoded GPS tag which did update every frame, however it took a long time to run and also I had some erroneous OCR reads which are now scattered across the Atlantic (even with validation there was always issues).

Perhaps you can get working, but I only had issues. This was using ffmpeg and similar tools.

The actual image quality and device was good, but for me the GPS issues were a dealbreaker and I upgraded to a GoPro.

Hi @tomc, we’ve made a very good progress already, just need to do some fine-tuning and road-tests and check gpsfix loss scenario (tunnels/etc)

I have not noticed any gpsloc data issues with all sample footage I’ve got for both Viofo A119V3 (FW 2.3) and Blueskysea B4K (FW v008/009).
GPS data is properly recorded every second as expected. With interpolation we could even handle 2fps geotagging (1 sample per 0.5 sec)

We are working on .TS files processing only, .MP4 container support for Viofo is not in scope (gpsloc data embedding is different in MP4 files) and I do not see any advantage of using MP4, .TS is simply better as it is much less vulnerable to data corruption.

Interesting, thanks for the update. Do you intend to release the script?

The camera otherwise was pretty good, and was very good value.

The script is in my public Github repo. There is quite a lot of testing and tuning needed, but it works roughly as intended.
Current features:

  • Autodetection between Viofo and Blueskysea - needs more testing
  • Time-based sampling - default is 0.5 seconds between images, but 0,1 (10 images per second) worked fine.
  • Distance-based sampling - needs work, but works mostly as intended
  • Interpolation of missing data - configurable by setting limits on how much data has to exist

Output is series of jpgs with GPS data in EXIF. These can be fed to mapillary-tools, desktop uploader or any other similar tool.

1 Like

Hi All,
first of all, a BIG thank you to Tanel @jorrarro for his amazing work and enthusiasm!

While everything has started with a simple extraction and geotagging, the result is by many means more advanced and powerful than original mapillary_tools :wink:

The script looks already pretty much complete, only distance-based sampling was not tested thoroughly yet.

Script could be found here
It’s written on python, so obviously you will need:

  • python installed
  • some additional libraries not included in default python installation:
    pip install opencv-python
    pip install exif

usage:
python ts_processor.py --input 'filename_or_folder'

You could check all default parameters applied inside the script
ONLY .TS files are supported at the moment, MP4 files support is work in progress
It is confirmed working with Viofo A119 V3 and Blueskysea B4K produced files, but other Novatek 966x based models (supporting TS recording) may work as well (not tested)

From my testing I can say that most common an optimal config would be:
--sampling_interval 1
--timeshift 0.5

1st is basically tells to extract 1 image per second
2nd is very important one. I have observed that gps coordinates recorded inside the video stream are a little bit late (out-of-sync), which means that gps position on the map is a little behind the actual sampled image location.
With timeshift parameter you could make an adjustment.
After extensive testing on both B4K and A119V3 footage I can say that 0.5 appears to be the optimal value under most conditions and will be giving you a precise positioning of your sampled data.

Thanks to interpolation support, you can obviously do the sampling at a higher fps, i.e. 2-5 frames per second (sampling interval 0.5-0.2 sec) is working fine and gps coordinates are accurately interpolated.

Interpolation inside the tunnels works fine (obviously resulting in interpolated coordinates distributed along the line), similar to Mapillary_tools and you can control this behavior with --min_coverage parameter

I will prepare and upload some test sequences later next week so you could have a look.

In general with this script the workflow is very much straightforward and time-efficient:

  1. do the batch processing using ts_processor with desired parameters set
  2. process&upload with mapillary_tools or directly with Web or Desktop uploader.

Latest version of the script supports image crop and image mask options!

1 Like

Is there any way to do wifi sync?

The dream is to have it all handled automatically, so when the device is connected to Wifi it automatically syncs to Mapillary. I have this working for the GoPro Max and it makes collection much easier as do not need to manage the upload.

A119 V3 does not support WiFi
B4K does, but i dunno if it would be possible to connect directly to the B4K dashcam storage over WiFi, probably yes, while it has an android player app available, but some investigation and development will be required.

out of curiosity, does it sync directly from gopro (supported by gopro firmware itself) or you have a laptop connected to gopro while driving and it does the processing and upload?

Ah OK, I thought one of the viofos does but not sure of the model.

Directly, it uses the GoPro cloud for this as that’s what the firmware supports syncing with out of the box.

ok, and how your imagery is reaching Mapillary from GoPro cloud? Is there an interface or something?

Custom one, instance checks for new synced captures, grabs off gopro cloud using oauth and processes to Mapillary

Regarding the wifi - this script handles any files it has access to. So it can be integrated into workflow with some other script downloading the videos onto local device.

If the camera runs some kind of a server (FTP, SMB etc), it is possible to automate the downloading.

Did some tests today and on first sight it works as intended!
Below is one example - road where I have made 2 stops on the traffic lights

Time-sampling: 1 sec interval

Distance-sampling: 10m

Distance-sampling: 15m

Coordinates interpolation seems to be working very well.

In the latest version of the script Tanel has added image crop and image mask support and it works like a charm!
--mask #masking image, must be same dimensionally as video, mask area is black 0,0,0
--crop_left #number of pixels to crop from left
--crop_right #number of pixels to crop from right
--crop_top #number of pixels to crop from top
--crop_bottom #number of pixels to crop from bottom

Hello, thank you for developing this tool, it looks very useful! So I just got a Viofo A129 Pro Duo and had a few questions.

  1. What operating system i need to use for this tool? I have Windows 10 and Linux Mint installed.

  2. Should I enable time-lapse in my camera or is MP4 fine?

script development credits should be going to @jorrarro :clap:

Answering your questions:

  1. Any system which is capable of running Python. Both Linux and Windows will work
  2. Video. Script will do the rest

However, couple of important notes:

  • Different dashcams models may (and in many cases will) have different GPS data storage formats
  • script is based on Novatek 9666x specs and works great with Viofo A119 V3 dashcam with .TS recording format enabled.
  • MP4 is also supported (tested with A119 V3) - there is one minor change required to the script to make it work (see here)

A129 Duo Pro is based on Novatek 96685
Does it support saving video files in TS format? If yes, you could test it with TS file and see if it works (if not, please share a raw recording in PM, so I can have a look).
If only MP4 format is supported - please send me in private message a raw recording sample with GPS enabled (upload it to google drive) - I will check if the script will be able to handle it and will adjust if needed.

1 Like

just did a quick test with MP4 files produced by A129 Pro and A129 Plus (running on FW from 2020) - both work fine with the script after this adjustment

TS files should be processed fine out of the box, but let me know if not.

Script pre-requisites:

  • python installed
  • install additional libraries not included in default python installation:
    pip install opencv-python
    pip install exif

So I tried entering those two commands into Python and got these syntax errors. What did I do wrong?

Hi Larry

pip runs from the command prompt.

@gpsmapper can you link to a sequence? I would be interested to see the quality if it’s taken from video (with compression) rather than timelapse.

I tried running those two commands in the Admin Command Prompt but get the following errors.