$ account c0decracker
This repository provides a command-line tool for splitting video files into smaller segments using FFmpeg. The tool supports three splitting modes: equal time-based chunks, equal file-size-based chunks, and arbitrary segments defined by a manifest file (in JSON or CSV format). The script is written in Python and relies only on the standard library and the presence of FFmpeg in the system's PATH. The architecture is a single monolithic script that parses command-line options, delegates to appropriate splitting functions, and invokes FFmpeg via subprocess calls. Key functions include get_video_length (for retrieving video duration via ffprobe), split_by_manifest (for processing manifest-defined segments), and split_by_seconds (for time- or size-based splitting). The script includes a test suite that validates the core functionality using mocks to avoid actual FFmpeg calls. While the tool is functional and well-tested, it shows signs of technical drift due to the use of the deprecated optparse module (instead of argparse) for command-line parsing. Despite this, the code remains maintainable and demonstrates solid engineering practices in error handling, modular function design, and testability.