I’m driving a Tesla Model 3 which has the ability to record the videos made with 4 cameras onto an USW-Stick. The 4 cameras are front, back, side left and side right.
Is there any possibility to use these videos with mapillary?
From my oppinion, the biggest problem would be matching via timestamp ti the gps coordinates.
Via TeslaFi or via the tesla api, it could be possible to record also the GPS coordinates from the car.
Is there anyone who is working on such a project?
I could offer some example videos, if someone is interested.
Yes, Mapillary has the Mapillry command line tools (GitHub - mapillary/mapillary_tools: Command line tools for processing and uploading Mapillary imagery) that can import video, geotag and upload. When you are sure you have your setup perfect, it can do it in one command. If you cannot get the GPS data from the car you can record it on your phone. I assume an online car like Tesla has the clock set via a time server, so it should be fairly accurate.
As you can see you can get help in this forum.
When he is able to process the data via mapillary-tools that would be the easiest way to go for you I think. If that road proves to be a bumpy one I’ll step in
I am working on (almost) complete automate my workflow, but I am working on a Linux system for that… I think it can also be modified to run on Windows but that’ll be a “to do” then
I have taken a look at the MP4 files, the rear view will become tricky I think.
Also I tried something, but I need more info… does your Tesla take 4 images per second? Dos the provided GPX contain all the GPX data for all the sequences provided? (I have the impression it is partial, if so, please tell me which part… one system records in CEST, the other in local time… I need to match it…)
I need to find the argument when I get to another computer.
I wil also need to find the argument that ensures that the videos time stamps are treated as local time, because the GPX file is in UTC and the video is in local time.
So I’ll be back.
The above is a command for a single video file. You will need to write some bat or power shell to run a command for each file and also needs to match the correct gpx file with the video.
Thank you for asking this question, I have been considering this as well.
Because of the 60 minute roll over of the videos, besides starting a separate GPS track capture, one would also have to hit the Save button every 59 minutes.
The argument --offset_angle will set the offset angle, i.e. if the camera points straight right the value is 90 (degress) etc.
The argument --local_time will make the script assume that the gpx file is in UTC and the video file is in the computer local time zone. A great solution to an annoying problem!
Sounds annoying that the Tesla cannot be set to save all videos, tough.
I really like the idea of Teslas automatically sending data to Mapillary. I only discovered this service today but I have the feeling I will only like it more once I dig into it.
A Tesla uses the USB connection to store camera clips: a clip for every minute of all four supported cameras (of the total of eight). It always stores one hour of data and deletes files older than that. It stores data initiated by a press on the dashcam button or sentry mode events separately.
I think it could also run software to process the camera data for use on Mapilllary, on the fly. Maybe it could be combined with polling the Tesla API - see State And Settings - Tesla API
The Raspberry Pi 4 also supports simulating OTG devices, so can be used the same way as the Raspberry Pi Zero. That should provide enough horse power to do the trick.
Looking forward to digging into this. I hope I find the time.
I am very interested in using a Raspberry Pi to automate the capture of GPS tracks and videos. Have you had any success?
I was looking to buy my first Raspberry Pi (been dreaming from before they were in production). The Pi 4 says it requires a 15 Watt power supply, I’m guessing that shouldn’t be a problem with the Tesla USB port ( 12 V * 1.5? A = 18 W).
process_video command to sample the frames at 0.5s. Use the --video_start_time parameter to set the start time for each video. The start time you can get from the video clips filename, which contains the datetime. Make sure to convert your video timezone to UTC also.
Then use the process or process_and_upload command to align with GPX
for each camera (front, back, right, left) set the --offset_angle to 0,180, 90, -90 degrees, respectively
Good luck
I hope to share a script I wrote for all that soon.