Viofo A119 V3 / Blueskysea B4K and Mapillary

Hi All, wondering if we have any owners of Viofo A119 V3 or Blueskysea B4K here and if anyone tried it with Mapillary?
Viofo dashcams are having a very good reputation on dashcamtalk and their price tag is very attractive cost/quality wise. Blueskysea products are good in general as well

Viofo A119 V3 while offering “only” 2560x1600p resolution (QHD) - is a world recognized dashcam for the best quality of the day and night recording
Blueskysea B4K is offering true 4K for only 100 USD,

Both seems to offer much better video quality in comparison to costly DR900, both support GPS but not the image timelapse offered in the custom firmware from Mapillary.

Processing should be pretty much the same as of the generic Blackvue or Garmin - split the video in image sequence at given rate, process geotags and upload.

Any feedback would be appreciated.

Sharing some findings from B4K sample recordings, I was able to get some sample footage - raw files and did some tests with mapillary_tools.
Unfortunately, mapillary_tools does not seem to be able to recognize GPS metadata from video files produced by B4K. I have tried both geotag_source oiptions available:

  • “gopro_videos”
  • “blackview_videos”

After doing some research on the net I’ve learned from Phil Harvey (author of Exiftool) that storage format used in AVC is not standard and some modifications required for different vendors.
0

I have already messaged him asking to add support for B4K in the future releases.

However, I wonder if I could reach out to mapillary devs, supporting mapillary_tools development?
I can imagine, that adding more ‘video’ processing formats for geotag_source should not be a big deal?
What would be the best way to reach devs with this request?

I think adding a support for 100$ 4K dashcam would be much appreciated as this would be an excellent alternative to $400+ Blackvue DR900 and IMHO excellent alternative for “Mapillary Camera Grant program

@eneerhut

Sample footage file with GPS encoded: HERE

p.s. I do not have A119 V3 latest FW raw footage yet, will check later

Are you absolutely sure that there is metadata in the video file and not just in OSD?

I downloaded the sample footage. FFprobe showed three streams:

Input #0, mpegts, from ‘20210109161626_000009A.tts’:
Duration: 00:01:00.00, start: 0.032000, bitrate: 27073 kb/s
Program 1
Stream #0:0[0x200]: Video: hevc (Main), 1 reference frame ([36][0][0][0] / 0x0024), yuvj420p(pc, bt709), 3840x2160, 30 fps, 30 tbr, 90k tbn, 30 tbc
Stream #0:1[0x201]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 32000 Hz, mono, fltp, 97 kb/s
No Program
Stream #0:2[0x300]: Unknown: none

This is similar to Garmin videos, which also have three streams - video, audio and GPS, although Garmin’s GPS is shown as subtitles. Anyway, dumped the stream 0:2 with FFmpeg like this:

ffmpeg -i 20210109161626_000009A.tts -map 0:2 -copy_unknown -c copy -f data raw_stream_data

And the resulting file was empty. No data in the stream.

As a side suggestion. It might be worth trying to access the inbuilt webserver via the WiFi to see if the GPS data is stored additionally/separately. When running a remote app it would make sense to have that data available so each and every mp4 would not have to be parsed for gps data. (This is the way BlackVue have done it)

It may also be worth trying a lesser codec if it has the option. Less mpg compression gives better static images. The video files will of course be larger

@jorrarro , yes, I am sure.
When played with GPS player provided by the manufacturer B4K GPS Player - you can see the track, coordinates, speed, etc.
No side files, you can try it yourself :wink:

Also support of B4K embedded metadata was recently added to 3rd party player DVplayer, so it should be stored somewhere in the file.

I must admit that Phil (Exiftool) was unable to find the metadata quickly, I will also try approaching the manufacturer asking for some hints or specs.

@bob3bob3 , I do not have an direct access to the sample, so I can’t check if gps logs are also stored somewhere besides the video file itself, will try to investigate with owners.

update from Phil Harvey

This file contains only 3 programs: 1. clock reference, 2. HEVC video, and 3. AAC audio. If timed GPS exists in this file, then it is in the HEVC video stream. ExifTool doesn’t yet have the ability to decode H.265, and it would be a LOT of work to do this (if I could find the specification at all).

I am trying to get additional details /comments from the manufacturers (Blueskysea and Viofo).

It might be possible that the GPS data is stored in 0xBF (Private stream 2). There are two kinds of packets there, one starting with 47 03 (42 byte payload), other 47 43 (184 byte payload).
Verifying and decoding this would take some time, so hopefully the manufacturer is willing to share the specifications.

1 Like

I would try my best to get the specs, fingers crossed. :crossed_fingers:
Wonder if checking firmware could give any clue, but not sure how to decompile it. I am not a programmer by any means

I have also ordered another alternative - Viofo A119V3, same price-range, lower resolution BUT the best picture/video quality among the completion in dashcams (incl. 4Ks).
GPS metadata is also embedded in the video files, dashcam supports recording in both MP4 and TS.
Also responsive support, so I hope it would not be a big deal to get the specs (in case of such a need).

Exiftool already supports metadata extraction when .MP4 containers are used, but TS files utilize a different storage logic. - have got the specs today in the morning, already shared with Phil.

BTW, both Viofo A119 V3 and Blueskysea B4K are using same Novatek chip, so the datasheets I’ve got from both are identical in regards to the GPS data coding.

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