Skip to content

Repository files navigation

FACS Batch Video Cutter

A small Python tool for cutting videos, for example WMV files from FACS or study material, and exporting them as MP4 files.

There are intentionally only two usable versions:

  1. Single Video Cutter – select one video manually, enter start/end time, and save it as MP4.
  2. Batch Cutter from Excel/CSV – automatically cut many videos based on a table.

Installation

1. Install Python

Recommended: Python 3.10 or newer.

2. Download and open the project

cd facs-batch-video-cutter

3. Create a virtual environment

Windows:

python -m venv .venv
.venv\Scripts\activate

macOS/Linux:

python3 -m venv .venv
source .venv/bin/activate

4. Install dependencies

pip install -r requirements.txt

Version 1: Single Video Cutter

Start with:

python app_single_video.py

Or on Windows, double-click:

run_single_video.bat

Usage

  1. Select a video file (.wmv, .mp4, .mov, .avi, .mkv, .m4v).
  2. Select an output folder.
  3. Enter start and end time.
  4. Optionally change the output name and bitrate.
  5. Click Cut video.

Supported time formats:

00:01:23
01:02:03
83

Version 2: Batch Cutter from Excel/CSV

Start with:

python app_batch_excel.py

Or on Windows, double-click:

run_batch_excel.bat

Minimal table structure

For videos that are all located directly in one folder:

Videoname Startzeit_Sekunden Endzeit_Sekunden
example_01.wmv 12 38
example_02.wmv 75 110

Example file: examples/batch_template.csv

Alternative with timecodes

Videoname Startzeit Endzeit
example_01.wmv 00:00:12 00:00:38

Example file: examples/batch_template_timecode.csv

Table structure with subfolders

For cases where videos are stored in subfolders, for example one folder per participant:

Ordnername Videoname Startzeit_Sekunden Endzeit_Sekunden
VP001 recording_01.wmv 12 38
VP002 recording_01.wmv 75 110

Example file: examples/batch_template_subfolders.csv

The video base folder is the folder that contains the subfolders.

Example:

Videos/
├── VP001/
│   └── recording_01.wmv
└── VP002/
    └── recording_01.wmv

Supported legacy column names

To keep older Excel files compatible, the Batch Cutter also recognizes:

  • WMV_Name instead of Videoname
  • Startzeit_Stunden, Startzeit_Minuten, Startzeit_Sekunden
  • Endzeit_Stunden, Endzeit_Minuten, Endzeit_Sekunden
  • optional Ordnername

Bitrate

The bitrate roughly determines video quality and file size.

Recommendations:

Purpose Bitrate
Good quality 5000k
Smaller files 1000k
Strong compression 800k

Optional: Create EXE files

Only needed if the program should run on a Windows computer without Python installed.

pip install -r requirements-dev.txt
pyinstaller --onefile --windowed --name FACS-Single-Video-Cutter app_single_video.py
pyinstaller --onefile --windowed --name FACS-Batch-Cutter app_batch_excel.py

The finished .exe files will be located in dist/.


GitHub note

License

This project is released under a custom Academic Use License.

Students, researchers, supervisors, and academic staff may use the software free of charge for non-commercial academic purposes, including theses, dissertations, research projects, teaching, and study-related data processing.

Commercial use, redistribution, and publishing modified versions are not permitted without prior written permission.


Common errors

“Video not found”

Check whether the file name in the table is written exactly like the video file name, including the file extension, for example .wmv.

“End time must be after start time”

The end time is smaller than or equal to the start time.

The window does not respond while cutting videos

This can happen with large videos. The program is still working in the background.


For developers

Optionally install the project in development mode:

pip install -e .

Quick import test:

PYTHONPATH=src python -c "from facs_batch_video_cutter.core import parse_time; print(parse_time('00:01:23'))"

About

Batch video cutter for FACS and behavioral research videos using Excel/CSV timecodes. Built with Python.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages