Menu

Summary

Andy

This is a utility for simple post-production processing of video files. It will concatanate multiple files together, trim the beginning and end, and transcode. Uses VLC for the player and ffmpeg for transcoding.

Back Story

The need for this tool came from video recording sermons at Calvary Church. We have limited people and limited time, so a full-featured editing utility ends up being too cumbersome. All we need it to do is trim, fade in and fade out, and add some black before and after.

Quick Usage

Since we record to an SD Card, the file size is limited to 4GB. So the first step is to concatenate the files together while copying them to the local drive. Then use the "Player" tab to select the start and stop points for the video clip. You can chose from several jobs from the dropdown, and press "Encode" when you are ready. You can queue up several jobs, and watch their progress in the "Messages" tab.

Dependencies

Running the binary

  • VLC

Running the Python

  • Python 3.x
  • wxPython Phoenix

Building the binary

  • cx_freeze 2.x

Platforms

At the moment, the only verified platform is Windows. However, everything involved (Python, wxPython, VLC, etc.) is cross platform, so porting shouldn't be difficult. The notable exception is the part where it copies the files. A call to the Windows "copy" command is used because it was the fastest choice.

INI File

There are a lot of things that are controlled by the Trimmer.ini file. There are some defaults that are built into Trimmer. It will then check the current directory and %APPDATA%/!Trimmer_Data (in that order) for Trimmer.ini to update the settings. The first time it is run, it will but an example Trimmer.ini in %APPDATA%/!Trimmer_Data.

The sections and parameters are as follows:

GlobalSettings Section

Parameter Default Description
FileCopy True Show the "File Copy" tab. If you don't need it, set this to False
NameTemplate %m_%d_%Y Template for filename during the Concatenate/Copy phase. For the syntax, see Python's strftime() function.

FileCopy Section

Parameter Default Description
SourcePath r"." Default path to copy files from.
DestPath r"." Default path to copy file to.
AutoStart True Default value for the "Auto Start" checkbox. If the box is checked, copying will start if the source directory contains one .MTS file that is 4GB, and one that is smaller, both with the current date.

Segment Sections

The INI file can have multiple Segment (or job) sections. They are numbered sequentially, starting with Segment1. Each of the segments will show up in the encode dropdown.

Parameter Default Description
Name` The name that shows up in the dropdown.
EncodeString` {see source} The command to be run to encode. Although ffmpeg is the intended executable, any command is acceptable
DefaultOutFileName| | The default output filename. This will then eventually end up in the$OutFileName$` replacement variable

Replacement Variables

Prior to executing the command specified in 'EncodeString`, several variables are replaced. These are:

Variable Description
$CropX$ The left position of the crop slider (which assumes a 16:9 to 4:3 crop)
$OutputStart$ 5 seconds before the selected start time to allow for lead in.
$OutputLength$ Full length, including lead-in and lead-out.
$OutputLengthNoHT$ Length, without lead-in and lead-out.
$FadeInStart$ The selected start time
$FadeOutStart$ 0.5 seconds before the selected stop time
$FadeLength$ 0.5, as in one-half second
$InFile$ The path and name of the input file
$InFileName$ The path and name of the input file, without extension. (depreciated)
$OutFileName$ The path and name of the output file, without extension, from the dialog.

MongoDB Logo MongoDB