Skip to content

This script was developed to convert .TLV files (time-lapse video) into individual .jpg frames using VLC media player. The frames are then added to a Windows Movie Maker instance for review by the user.

License

Notifications You must be signed in to change notification settings

HeyHarry3636/TimeLapseVideo_python

Repository files navigation

TimeLapseVideo (timelapseVLCMovieMakerConversion.py)

Synopsis

This [script] (timelapseVLCMovieMakerConversion.py) was developed to convert .TLV files (time-lapse video) into individual .jpg frames using VLC media player. The frames are then added to a Windows Movie Maker instance for review by the user.

TimeLapseVideo_python

Script Inputs

For the command line script execution, the following inputs are needed:

  • Path to the folder where all of the .TLV files are stored
  • Path to a folder where the frames (individual .jpg) will be stored (folder must exist already)
  • Start date for which the cameras were launched
  • End date for when the cameras and files were last picked up

This [time-lapse presentation] (TLV_VLC_MvMkr_script.pdf) is an overview of the script parameters and execution.

Motivation

The particular cameras that we use are Plotwatcher Pro models made by Day 6 Outdoors. The cameras are set to record and take pictures at 30 minute intervals from sunrise to sunset. Each day is stored on one separate .TLV file (160721AA.TLV, 160722AA.TLV, etc.).

If the SD cards are removed at some point during the day (ex: to swap SD cards), the camera will create a file with an additional file for the particular day with an AB ending (160722AB.TLV). These specific files had to and were addressed during this automated extraction process.

It was necessary to convert from the .TLV files to another format because these file formats are not often used.

Before this script was written I was extracting all of the frames manually using the VLC software, which was very time consuming with two or more months of data from our four different cameras.

I was only able to play one .TLV video file at a time. Once I was in the VLC software I also had to adjust the scene filter to a new folder. It was necessary to change the folder location because the scene filter would overwrite the current frames, instead of appending them after the previous days frames.

Windows Movie Maker did not accept the files as is, so I had to convert them to another format. I used VLC to extract the individual frames from each .TLV file using a scene-filter using command line and save to individual folders, which usually ended up being around 50 photos per day.

Once the frames are extracted, they are imported into a Windows Movie Maker instance using an .XML file and command line.

Windows Movie Maker has a limit of 1000 photos being added at one time so I divided the movie maker files by half-months (MayA, MayB, JuneA, JuneB, etc.). This is the final product from the script.

From here, the user views the movie maker file and removes the super bright or dark photos so the completed video is watchable.

Installation

This script was not meant to be distributed as this was a specific use situation for our camera models.

Tests

This script was developed and tested with Windows 7, command line, Video Lan Converter, Windows Movie Maker

Python modules needed: os, sys, subprocess, datetime, xml.etree.cElementTree

Contributors

Michael Harris is the author of this script.

[StackOverflow] (http://stackoverflow.com/users/4530995/michael-harris)

[LinkedIN] (https://www.linkedin.com/in/michael-harris-366b0060/)

License

This code is available under the [MIT License.] (LICENSE)

About

This script was developed to convert .TLV files (time-lapse video) into individual .jpg frames using VLC media player. The frames are then added to a Windows Movie Maker instance for review by the user.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages