# Tesla Integrated Dashcam-Feature - possible use with Mapillary?

**URL:** <https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467>\
**Category:** Contributing and equipment\
**Created:** [November 2, 2019, 9:08am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467 "2019-11-02T09:08:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tower27](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@tower27](https://forum.mapillary.com/u/tower27)\
**Post date:** [November 2, 2019, 9:08am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/1 "2019-11-02T09:08:15Z")

</div>

Hi there,

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.

Thanks for any comments.

Thomas

---

<div class="post-metadata">

**Author:** ![eesger](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/eesger/32/68925_2.png) [@eesger](https://forum.mapillary.com/u/eesger)\
**Post date:** [November 3, 2019, 9:49pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/2 "2019-11-03T21:49:48Z")

</div>

when you can supply MP4 and GPX file (or an other format containing GPS data) I am willing to take a look.

(I think I can easily modify my script to handle this)

---

<div class="post-metadata">

**Author:** ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)\
**Post date:** [November 4, 2019, 6:56am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/3 "2019-11-04T06:56:15Z")

</div>

Yes, Mapillary has the Mapillry command line tools ([GitHub - mapillary/mapillary\_tools: Command line tools for processing and uploading Mapillary imagery](https://github.com/mapillary/mapillary_tools)) 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.

---

<div class="post-metadata">

**Author:** ![tower27](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@tower27](https://forum.mapillary.com/u/tower27)\
**Post date:** [November 4, 2019, 7:49am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/4 "2019-11-04T07:49:06Z")

</div>

thanks for your responds.  
I recorded a track with my GPS and some videos an I will supply them to eesger

---

<div class="post-metadata">

**Author:** ![tower27](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@tower27](https://forum.mapillary.com/u/tower27)\
**Post date:** [November 4, 2019, 8:01am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/5 "2019-11-04T08:01:19Z")

</div>

How can i sent you a link to the files per private message?

---

<div class="post-metadata">

**Author:** ![eesger](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/eesger/32/68925_2.png) [@eesger](https://forum.mapillary.com/u/eesger)\
**Post date:** [November 4, 2019, 9:31am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/6 "2019-11-04T09:31:38Z")

</div>

I sent you a PM

PS: are you a bit “computer handy?” Then u could install Mapillary-tools and do it all yourself!  
PS2: is it OK that I send the link to @tryl also?

---

<div class="post-metadata">

**Author:** ![tower27](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@tower27](https://forum.mapillary.com/u/tower27)\
**Post date:** [November 4, 2019, 12:43pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/7 "2019-11-04T12:43:25Z")

</div>

Hi, yes, I’m “computer handy”, I will try 🙂

And yes, you can send the link to @tryl too

Thank you and greetings from Germany  
Thomas

---

<div class="post-metadata">

**Author:** ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)\
**Post date:** [November 4, 2019, 1:05pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/8 "2019-11-04T13:05:32Z")

</div>

I’ll be happy to help if I can.

---

<div class="post-metadata">

**Author:** ![eesger](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/eesger/32/68925_2.png) [@eesger](https://forum.mapillary.com/u/eesger)\
**Post date:** [November 7, 2019, 10:25am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/9 "2019-11-07T10:25:39Z")

</div>

I have sent the link to @tryl.

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…)

---

<div class="post-metadata">

**Author:** ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)\
**Post date:** [November 7, 2019, 1:56pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/10 "2019-11-07T13:56:43Z")

</div>

You will probably need something like

mapillary\_tools sample\_video --video\_import\_path “path/to/videos” --advanced

mapillary\_tools process --advanced --import\_path “path/to/.mapillary/sampled\_video\_frames/video\_import\_path” --user\_name “username\_at\_mapillary” --geotag\_source “gpx” --geotag\_source\_path “path/to/gpx\_file” --overwrite\_all\_EXIF\_tags --interpolate\_directions

mapillary\_tools upload --import\_path “path/to/.mapillary/sampled\_video\_frames/video\_import\_path”

from [GitHub - mapillary/mapillary\_tools: Command line tools for processing and uploading Mapillary imagery](https://github.com/mapillary/mapillary_tools). But in addition to --interpolate\_directions (which I added in addition to the example) you need an argument to set in which direction the camera is pointing. This is in degrees, so  
Front: 0  
Back 180  
Right: 90  
Left 270  
Between right and back: 135  
Between left and back: 225

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.

---

<div class="post-metadata">

**Author:** ![TreeStryder](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TreeStryder](https://forum.mapillary.com/u/TreeStryder)\
**Post date:** [November 10, 2019, 5:59pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/11 "2019-11-10T17:59:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)\
**Post date:** [November 17, 2019, 3:09pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/12 "2019-11-17T15:09:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jdierckx](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jdierckx](https://forum.mapillary.com/u/jdierckx)\
**Post date:** [January 30, 2020, 2:20pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/14 "2020-01-30T14:20:50Z")

</div>

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.

Instead of a normal USB drive, I use a Raspberry Pi Zero with this software: [GitHub - marcone/teslausb: Steps and scripts for turning a Raspberry Pi into a useful USB drive for a Tesla](https://github.com/marcone/teslausb)  
It runs software that allows you to store more than one hour of data, automatically sync data to your NAS when it detects your home WiFi, …

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](https://www.teslaapi.io/vehicles/state-and-settings#drive-state)

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.

Kind regards,  
Jeroen

---

<div class="post-metadata">

**Author:** ![TreeStryder](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TreeStryder](https://forum.mapillary.com/u/TreeStryder)\
**Post date:** [March 11, 2020, 2:19am UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/15 "2020-03-11T02:19:27Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![till](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@till](https://forum.mapillary.com/u/till)\
**Post date:** [September 30, 2020, 12:28pm UTC](https://forum.mapillary.com/t/tesla-integrated-dashcam-feature-possible-use-with-mapillary/3467/16 "2020-09-30T12:28:10Z")

</div>

Hi

I was able to capture and upload imagery from Tesla Dashcam to Mapillary. Here’s how to do it

**1. Use a GPS (GPX) tracker app during driving.**

I tried several apps on iOS. Key features needed:

- frequent enough log points (0.5s ideally)
- Ability to export GPX format
- GPX following the standards such that mapillary tools can parse it (in particular storing time in UTC, not timezone data)

**2. Offload the GPX track and the dashcam videos from USB stick to your PC. Use [mapillary\_tools (mapillary command line tools)](https://github.com/mapillary/mapillary_tools) to process the videos and gpx**

- `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.
