Dashcam video script

  • SUPPORT THE SITE AND ENJOY A PREMIUM EXPERIENCE!
    Welcome to Tesla Owners Online, four years young! For a low subscription fee, you will receive access to an ad-free version of TOO. We now offer yearly memberships! You can subscribe via this direct link:
    https://teslaownersonline.com/account/upgrades

    SUBSCRIBE TO OUR YOUTUBE CHANNEL!
    Did you know we have a YouTube channel that's all about Tesla? Lots of Tesla information, fun, vlogs, product reviews, and a weekly Tesla Owners Online Podcast as well!

  • It's OK to discuss software issues here but please report bugs to Tesla directly at servicehelpna@teslamotors.com if you want things fixed.

Kermit

Active member
Joined
Aug 3, 2018
Messages
38
Location
Buffalo, NY
Tesla Owner
Model 3
Country
Country
Try with the new --motion_only; that way it will go skip anything where there is no motion (or very little motion).
These are lively dashcam videos, plenty of motion! Was hoping for a little more granular control of playback speed but I'm just being super picky, great software!
 

MelindaV

☰ > 3
Moderator
Joined
Apr 2, 2016
Messages
10,259
Location
Vancouver, WA
Tesla Owner
Model 3
Country
Country
todays the first I've used the app since V10...
I could not get it to recognize 'RecentClips', and even when leaving the targeted directory off all together, it would only look at SavedClips and SentryClips

With the new 4 camera layouts, how do you get the rear camera to mirror so it matches the side cameras?
 

ehendrix23

Active member
TOO Supporting Member
Joined
Jan 30, 2019
Messages
131
Location
Colorado
Tesla Owner
Model 3
Country
Country
todays the first I've used the app since V10...
I could not get it to recognize 'RecentClips', and even when leaving the targeted directory off all together, it would only look at SavedClips and SentryClips

With the new 4 camera layouts, how do you get the rear camera to mirror so it matches the side cameras?
Next version will mirror rear camera same as it does for the side ones. So when sides are mirrored, rear is. When sides are not mirrored rear is not.

For the folders, if you do not specify a source folder then it will only grab SavedClips and SentryClips.

I'm assuming you run it so it checks for existence of a USB drive. Thus if you want to include RecentClips you would need to use the parameter --monitor_once and then provide the 3 folders:
Code:
tesla_dashcam --monitor_once SavedClips SentryClips RecentClips
Or if you want it to keep on running and monitoring (this so that you can then. take the USB drive out, and at another time when you insert it back in it will start processing again):
Code:
tesla_dashcam --monitor SavedClips SentryClips RecentClips
Any other parameters you can still provide, like the output folder.
 

ehendrix23

Active member
TOO Supporting Member
Joined
Jan 30, 2019
Messages
131
Location
Colorado
Tesla Owner
Model 3
Country
Country
These are lively dashcam videos, plenty of motion! Was hoping for a little more granular control of playback speed but I'm just being super picky, great software!
I checked and can use a float for it. Hence next version has it changed so you can use, for example, 1.4 for speedup (or slowdown).
 

ehendrix23

Active member
TOO Supporting Member
Joined
Jan 30, 2019
Messages
131
Location
Colorado
Tesla Owner
Model 3
Country
Country
Very nice, @ehendrix23. Interesting that you packed everything into a .dmg package, I need to investigate how to do that :)

Take a look at https://github.com/chriskiehl/Gooey. It's a very nice and super-easy GUI generator for command line python scripts. It may bump this tool to the next level ;)
Process is actually very simple (once you know how). <g>. Just create a disk image from disk utility and make it big enough. That is then kind the "template". Then every time update the file(s) in that disk image and then use Disk Utility to convert and compress it. Here is a link to a page explaining it: https://el-tramo.be/blog/fancy-dmg/

Thanks for the tip for Gooey. Definitely going to look into that as that would make it easy to create a GUI for now.
 

ehendrix23

Active member
TOO Supporting Member
Joined
Jan 30, 2019
Messages
131
Location
Colorado
Tesla Owner
Model 3
Country
Country
Release v0.1.16 is available now, this release will mirror rear camera as well (when side cameras are mirrored) and changes default font on Mac to work on Catalina.

New:
- Option --scale now accepts value of camera=<front, rear, left, right>. to set the scale of for each camera individually (value of 1 is 1280x960 for the clip)
- Option --swap_frontrear to swap front&rear cameras in output.
- Option --background to specify background color (default is black).
- Option --fps to set the frame rate for resulting video. Default is set to 24 (Tesla records at about 33 fps). Issue #85
- Parameter file (provided using @) can now include comments (specify using #)
- Option --loglevel to allow for debug information to be printed.


Fixed:
- Providing paths with spaces did not work in parameter files even although it worked from command line. Issue #89
- Changed Arial font on MacOS to Arial Unicode (from Arial) as it seems Arial is not available anymore on MacOS 10.15 (Catalina). Issue #64
- Incorrect encoder for x265 with Intel GPU hardware encoding - mbaileys


Changed:
- --speedup and --slowdown now accepts a float allowing for example to speed video up by 1.5
- Option --scale also accept fixed resolution (i.e. 640x480) for the clip.
- View of rear camera will be mirrored as well if side cameras are shown as mirror
- For all layouts default is to show mirror for rear&side if front camera is shown, otherwise show as rear viewing.
- Swap left&right cameras when showing rear&side as rear viewing, and not to swap them when showing rear&side as mirror view.
- Re-organized help (-h) for all parameters by grouping them.
- Added message to install fonts using apt-get install ttf-freefont on Linux if font file is not found.
- Only execute if we're main allowing to be imported into other scripts. Issue #94
- Cleaned-up this README file to provide better information.
 

JML

Well-known member
Joined
Jul 26, 2018
Messages
201
Location
Broomfield, Colorado
Tesla Owner
Model 3
Country
Country
I just updated to 0.1.16 and noticed an issue with the Nvidia encoders. When running with --gpu --gpu-type nvidia the ffmpeg command is run with -b:v 60000K. That causes quite an inflation in the size of the output files. It does this for both x264 and x265. Using --enc hevc_nvenc doesn't insert the extra bitrate option and produces files of the expected size. When I don't use --gpu, then the bitrate is not specified, but the encoding is obviously much slower.

This is on Linux with ffmpeg 4.2.2.
 
Joined
Dec 10, 2018
Messages
12
Location
SoCal
Tesla Owner
Model 3
Country
Country
I just updated to 0.1.16 and noticed an issue with the Nvidia encoders. When running with --gpu --gpu-type nvidia the ffmpeg command is run with -b:v 60000K. That causes quite an inflation in the size of the output files. It does this for both x264 and x265. Using --enc hevc_nvenc doesn't insert the extra bitrate option and produces files of the expected size. When I don't use --gpu, then the bitrate is not specified, but the encoding is obviously much slower.

This is on Linux with ffmpeg 4.2.2.
I'm also getting very large file sizes when using --gpu --gpu_type nvidia on 0.1.16 (windows)

Loving the --motion_only option though!