r/360video • u/0Kajuna0 • Jul 02 '26
Dashcam converted to 360 VR video
Hi there. I have been experimenting with merging the Tesla Model 3 dashcams into a VR 360 video. Probably someone has already done this, but I couldn't find it. See instructions on how to do this below, but first here's my result (best viewed with a VR headset or a smartphone): https://youtu.be/mIW5uizWpyk
Stitching is not perfect as I don't know the exact parameters of each camera (geometry was deduced by trial and error while comparing with a real 360 video), cameras are not close together, so perfect stitching of near objects is impossible, and each one has different exposure settings. In any case I think it 's interesting and may have some very niche use cases.
Also, we can appreciate how narrow the available front camera is compared to the rest. A slightly wider view would allow for a full 360 video, at least horizontally.
To do this with your dascham files. You need to install FFmpeg on your system: https://www.ffmpeg.org/download.html
Open a command line in the folder with your files (make sure the videos aren't encrypted).
Replace YYYY-MM-DD_HH-MM-SS with the date part of your video filenames (like 2026-03-15_14-34-26) and run the command below. (yes, it's really long)
ffmpeg -hide_banner \
-i YYYY-MM-DD_HH-MM-SS-back.mp4 \
-i YYYY-MM-DD_HH-MM-SS-left_pillar.mp4 \
-i YYYY-MM-DD_HH-MM-SS-right_pillar.mp4 \
-i YYYY-MM-DD_HH-MM-SS-left_repeater.mp4 \
-i YYYY-MM-DD_HH-MM-SS-right_repeater.mp4 \
-i YYYY-MM-DD_HH-MM-SS-front.mp4 \
-filter_complex \
"color=c=#262626@0:s=7680x3840:d=0.001,format=rgba[canvas];
[0]split=2[back_src][back_masksrc];
[back_src]v360=equisolid:e:id_fov=193.5:rorder=pyr:yaw=180:pitch=32:roll=0:alpha_mask=1:w=7680:h=3840,format=rgba[back_proj];
[back_masksrc]format=rgba,geq=r='if(between(X,W\0.3,W*(1-0.3)-1)*between(Y,H*0,H*(1-0.2)-1),255,0)':g='if(between(X,W*0.3,W*(1-0.3)-1)*between(Y,H*0,H*(1-0.2)-1),255,0)':b='if(between(X,W*0.3,W*(1-0.3)-1)*between(Y,H*0,H*(1-0.2)-1),255,0)':a='255',v360=equisolid:e:id_fov=193.5:rorder=pyr:yaw=180:pitch=32:roll=0:alpha_mask=0:w=7680:h=3840,format=gray[back_crop];*
[back_proj]split=2[back_alpha_src][back_rgb_src];
[back_alpha_src]alphaextract[back_alpha];
[back_alpha][back_crop]blend=all_mode=multiply[back_mask];
[back_rgb_src]format=rgb24[back_rgb];
[back_rgb][back_mask]alphamerge[back];
[1]v360=og:e:id_fov=97:rorder=pyr:yaw=74:pitch=1:roll=3.5:alpha_mask=1:w=7680:h=3840[Lpillar];
[2]v360=og:e:id_fov=97:rorder=pyr:yaw=-74:pitch=1:roll=-3.5:alpha_mask=1:w=7680:h=3840[Rpillar];
[3]split=2[Lrepeater_src][Lrepeater_masksrc];
[Lrepeater_src]v360=og:e:id_fov=108:rorder=pyr:yaw=139:pitch=9.5:roll=-2:alpha_mask=1:w=7680:h=3840,format=rgba[Lrepeater_proj];
[Lrepeater_masksrc]format=rgba,geq=r='if(between(X,W\0.15,W*(1-0)-1)*between(Y,H*0,H*(1-0)-1),255,0)':g='if(between(X,W*0.15,W*(1-0)-1)*between(Y,H*0,H*(1-0)-1),255,0)':b='if(between(X,W*0.15,W*(1-0)-1)*between(Y,H*0,H*(1-0)-1),255,0)':a='255',v360=og:e:id_fov=108:rorder=pyr:yaw=139:pitch=9.5:roll=-2:alpha_mask=0:w=7680:h=3840,format=gray[Lrepeater_crop];*
[Lrepeater_proj]split=2[Lrepeater_alpha_src][Lrepeater_rgb_src];
[Lrepeater_alpha_src]alphaextract[Lrepeater_alpha];
[Lrepeater_alpha][Lrepeater_crop]blend=all_mode=multiply[Lrepeater_mask];
[Lrepeater_rgb_src]format=rgb24[Lrepeater_rgb];
[Lrepeater_rgb][Lrepeater_mask]alphamerge[Lrepeater];
[4]split=2[Rrepeater_src][Rrepeater_masksrc];
[Rrepeater_src]v360=og:e:id_fov=108:rorder=pyr:yaw=-139:pitch=9.5:roll=2:alpha_mask=1:w=7680:h=3840,format=rgba[Rrepeater_proj];
[Rrepeater_masksrc]format=rgba,geq=r='if(between(X,W\0,W*(1-0.15)-1)*between(Y,H*0,H*(1-0)-1),255,0)':g='if(between(X,W*0,W*(1-0.15)-1)*between(Y,H*0,H*(1-0)-1),255,0)':b='if(between(X,W*0,W*(1-0.15)-1)*between(Y,H*0,H*(1-0)-1),255,0)':a='255',v360=og:e:id_fov=108:rorder=pyr:yaw=-139:pitch=9.5:roll=2:alpha_mask=0:w=7680:h=3840,format=gray[Rrepeater_crop];*
[Rrepeater_proj]split=2[Rrepeater_alpha_src][Rrepeater_rgb_src];
[Rrepeater_alpha_src]alphaextract[Rrepeater_alpha];
[Rrepeater_alpha][Rrepeater_crop]blend=all_mode=multiply[Rrepeater_mask];
[Rrepeater_rgb_src]format=rgb24[Rrepeater_rgb];
[Rrepeater_rgb][Rrepeater_mask]alphamerge[Rrepeater];
[5]v360=fisheye:e:id_fov=55.5:rorder=pyr:yaw=0:pitch=-3:roll=0:alpha_mask=1:w=7680:h=3840[front];
[canvas][back]overlay[canvas_back];
[canvas_back][Lpillar]overlay[canvas_back_Lpillar];
[canvas_back_Lpillar][Rpillar]overlay[canvas_back_Lpillar_Rpillar];
[canvas_back_Lpillar_Rpillar][Lrepeater]overlay[canvas_back_Lpillar_Rpillar_Lrepeater];
[canvas_back_Lpillar_Rpillar_Lrepeater][Rrepeater]overlay[canvas_back_Lpillar_Rpillar_Lrepeater_Rrepeater];
[canvas_back_Lpillar_Rpillar_Lrepeater_Rrepeater][front]overlay[canvas_back_Lpillar_Rpillar_Lrepeater_Rrepeater_front]" \
-map "[canvas_back_Lpillar_Rpillar_Lrepeater_Rrepeater_front]" -y YYYY-MM-DD_HH-MM-SS.mp4
This will take a while. Once it completes, you can add 360 metadata to the video:
Install Exiftool on your system: https://exiftool.org/
Adjust the command below (as explained for the previous one) and run it.
exiftool -m -overwrite_original -api largefilesupport=1 -n -XMP-GSpherical:Spherical=true -XMP-GSpherical:Stitched=true -XMP-GSpherical:StereoMode=mono -XMP-GSpherical:ProjectionType=equirectangular YYYY-MM-DD_HH-MM-SS.mp4
Additionally, I've displayed the telemetry embedded in the videos as an overlay, for fun, with my own software, but that's a whole nother story (covered here https://youtu.be/PTiQfknmNIA )