Skip to main content

Python program to merge video files created by Tesla dashcam

Project description

Python program that provides an easy method to merge saved Tesla Dashcam footage into a single video.

When saving Tesla Dashcam footage a folder is created on the USB drive and within it multiple MP4 video files are created. Currently the dashcam leverages three (3) cameras (front, left repeater, and right repeater) and will create a file for each of them. Every minute is stored into a seperate file as well. This means that when saving dashcam footage there is a total of 30 files video files.

Using this Python program, one can combine all of these into 1 video file. The video of the three cameras is merged into one picture, with the video for all the minutes further put together into one.

This is not limited to just the saved 10 minute footage. One can combine video files of different times footage was saved into one folder and then run this program to have to all combined into one movie.

Requirements

This package relies on ffmpeg to be installed, this is a free, open source cross-platform solution to convert video. It has to be downloaded and installed separately.

Further, Python 3.5 or higher has to be installed as well.

Installation

This package is available from pypi. Installing it from there will ensure all other package requirements (except ffmpeg) are installed as well.

Install from pypi is done through:

pip install tesla_dashcam

Usage

tesla_dashcam - Tesla DashCam Creator

usage:  [-h] --source SOURCE --output OUTPUT
    [--layout {WIDESCREEN,FULLSCREEN}]
    [--quality {LOWEST,LOWER,LOW,MEDIUM,HIGH}]
    [--compression {ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow}]
    [--encoding {x264,x265}] [--timestamp] [--no-timestamp]
    [--ffmpeg FFMPEG] [--font FONT]

tesla_dashcam - Tesla DashCam Creator

required arguments:
  --source SOURCE       Folder containing the saved camera files (default:
                        None)

  --output OUTPUT       Path/Filename for the new movie file. (default: None)

optional arguments:

  -h, --help            show this help message and exit

  --layout {WIDESCREEN,FULLSCREEN}
                        Layout of the video. Widescreen puts video of all 3
                        cameras next to each other. Fullscreen puts the front
                        camera on top in middle and side cameras below it next
                        to each other (default: WIDESCREEN)

  --quality {LOWEST,LOWER,LOW,MEDIUM,HIGH}
                        Define the quality setting for the video, higher
                        quality means bigger file size but might not be
                        noticeable. (default: LOWER)

  --compression {ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow}
                        Speed to optimize video. Faster speed results in a
                        bigger file. This does not impact the quality of the
                        video, just how much time is used to compress it.
                        (default: medium)

  --encoding {x264,x265}
                        Encoding to use. x264 is can be viewed on more devices
                        but results in bigger file. x265 is newer encoding
                        standard (default: x264)

  --timestamp           Include timestamp in video (default)
  --no-timestamp        Do not include timestamp in video

  --ffmpeg FFMPEG       Path and filename for ffmpeg. Specify if ffmpeg is not
                        within path. (default: ffmpeg)

  --font FONT           Fully qualified filename (.ttf) to the font to be
                        chosen for timestamp. (default:
                        /Library/Fonts/Arial.ttf)
layout:
WIDESCREEN: Resolution: 1920x480

[Left Camera][Front Camera][Right Camera]

FULLSCREEN: Resolution: 1280x960

[Front Camera]

[Left Camera][Right Camera]

Release Notes

0.1.1. Initial Release

TODO

  • Option to specify resolutions as an argument

  • Option for end-user layout

  • Use create time in clips to synchronize

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tesla_dashcam-0.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

tesla_dashcam-0.1.1-py2.py3-none-any.whl (11.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tesla_dashcam-0.1.1.tar.gz.

File metadata

  • Download URL: tesla_dashcam-0.1.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for tesla_dashcam-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7cb5af7d70d4f7a1da256123debd040c0d7d82375e77099a6c9007cac98deaf8
MD5 67bdcf596bd9d99a5ca676549ea5d27d
BLAKE2b-256 d8f335d1d6264457ae7b942afbfc5145fd62403a5b0c60818e4135862bd9f17c

See more details on using hashes here.

File details

Details for the file tesla_dashcam-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: tesla_dashcam-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for tesla_dashcam-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ce8e52bc38285e7ae48937625759a62fb2cb3fd27a7f982c11d6241d054d14e2
MD5 0387192a7609d1e667df240f30d29fe3
BLAKE2b-256 eb0e51e2802b792a4e1bd4ccd7a030cdc5cf2989c0d0117313c63dd726dbf3e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page