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.
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
script development credits should be going to @jorrarro
Answering your questions:
Any system which is capable of running Python. Both Linux and Windows will work
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.
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.
it’s strange, pip should be installed automatically with python 3.9
maybe some path variables were not updated, please try re-installing python with Admin rights and reboot after installation.
If path variables are properly set, you should be able to call python anywhere from command prompt:
Actually it does not quite work for me - I’m using MP4s and it seems not to extract the correct amount & with sufficient EXIF. I did see on your notes currently only TS is supported though.
Hi Tom,
please try this one
It’s a modified version I am currently using (works well for both Novatek/Viofo MP4s and TS). Latest code on github may not work properly.
In regards to script performance: on my PC 1 min video with 1 sec sampling interval takes ~30sec for processing on average (with image crop enabled).
But this is totally acceptable while it does everything in one shot and saves you a lot of time anyway.
mapilary_tools can do the video sampling and EXIF processing noticeably faster, but MT workflow requires a lot of manual/side tasks to do on top (extract GPS data with external script, synchronize GPS data with the sampled images, interpolation, enable proper stitching, do the crop, etc.)
And some of the functions like distance-based sampling are unique to the script from Tanel
uploaded with mapillary_tools (upload --import_path "FOLDER")
interpolate directions is required to fix direction angle, while it’s not always captured correctly by Viofo
offset_angle - tells to reverse angle 180 grad (applicable for the back camera only)
Hi, this is great script But I have problem with setting folder as input source under Linux. I tried to use ‘*.MP4’ or inserting full path to folder with videos, but I only get “No input file found”
Second problem is that I use command:
python3 ts_processor2.py --input ‘*.MP4’ --sampling_interval 0.5 --timeshift 0.5 --folder output
And from file recorded with 60fps and timelapse set to 500miliseconds i got 53 images… Videoplayer says that movie is 27 seconds long.
it would be much easier to answer if you could share your video sample (upload to google drive or similar)
But if you video length is 27 sec and sampling interval is 0.5 sec, you should normally expect 53/54 samples
re input - I am not using linux, but I guess script author (@jorrarro) does, maybe he will be able to clarify how input folder should be specified on linux.