Repository navigation
v0.2.0 - Major Overhaul and Integration Enhancements
Summary
This major release brings significant improvements to the Scene Segment Splitter tool, focusing on a complete overhaul of the batch script for Windows users and the integration of FFmpeg and MKVToolNix directly into the Python script. These changes streamline the setup process, enhance reliability, and make the tool more accessible and user-friendly.
Key Features and Updates
1. Complete Overhaul of the Batch Script (run_process.bat)
-
Improved Script Reliability:
- Syntax Error Fixes: Resolved issues with labels and
gotostatements inside code blocks that previously caused execution failures. - Enhanced Control Flow: Replaced problematic constructs with variables and conditional statements, ensuring smooth and error-free execution.
- Syntax Error Fixes: Resolved issues with labels and
-
Automated Dependency Management:
- Automatic Checks and Downloads: The batch script now automatically verifies the presence of required binaries (FFmpeg, MKVToolNix, 7-Zip) in the
bindirectory. - Seamless Installation: If any dependencies are missing, the script downloads and installs them without manual intervention, simplifying the initial setup process.
- Automatic Checks and Downloads: The batch script now automatically verifies the presence of required binaries (FFmpeg, MKVToolNix, 7-Zip) in the
-
Enhanced Debugging and Error Handling:
- Informative Output Messages: Added detailed console messages to trace execution flow, making it easier to identify and resolve issues.
- Robust Error Handling: Implemented checks to gracefully handle failures in downloading or extracting dependencies, providing clear error messages and preventing script crashes.
2. Integration of FFmpeg and MKVToolNix into the Python Script
-
Direct Invocation of Binaries:
- Consistent Paths: The Python script now directly utilizes FFmpeg and MKVToolNix binaries from the
bindirectory, ensuring consistent behavior across different environments. - No External Dependencies: Eliminated the need for external installations, as the required tools are managed within the project's directory structure.
- Consistent Paths: The Python script now directly utilizes FFmpeg and MKVToolNix binaries from the
-
Improved Video Conversion and Splitting:
- Excluding Unsupported Subtitles: Modified the FFmpeg command to exclude unsupported subtitle codecs by adding the
-snflag, preventing conversion failures due to subtitle format incompatibilities. - Accurate File Handling with
mkvmerge: Adjusted the script to correctly handle output file names generated bymkvmerge, ensuring that split video files are properly detected and moved to the output directory.
- Excluding Unsupported Subtitles: Modified the FFmpeg command to exclude unsupported subtitle codecs by adding the
-
Automatic Intro Inclusion in Episodes:
- Consistent Viewing Experience: Implemented logic to include the intro segment at the beginning of each split episode, enhancing continuity.
- Customizable Intro Duration: Introduced an
INTRO_DURATIONvariable, allowing users to specify the length of the intro to accommodate different shows.
-
Accurate Episode Splitting:
- Precise Split Points: Adjusted the start times for the second episode to prevent cutting in too soon, ensuring that content is not overlapped or omitted.
- Enhanced Black Frame Detection: Fine-tuned parameters for detecting black frames, improving the accuracy of episode segmentation.
Removed Features
-
Hardware Acceleration:
- Removed references to GPU hardware encoding support (e.g., NVENC or AMD AMF), focusing instead on optimizing CPU-based processing for broader compatibility.
Bug Fixes
-
Resolved Batch Script Errors:
- Corrected Python Invocation: Fixed an issue where the batch script incorrectly attempted to execute itself as a Python script, causing syntax errors.
- Ensured Proper Script Execution: The batch script now correctly calls the
process_videos.pyPython script, ensuring smooth operation.
-
File Handling Improvements in Python Script:
- Adjusted File Name Handling: Addressed "File Not Found" errors by correctly handling the output file names generated by
mkvmerge, accounting for variations in naming conventions. - Managed Temporary Files and Directories: Ensured that temporary files are properly created, accessed, and cleaned up after processing, preventing residual clutter and potential conflicts.
- Adjusted File Name Handling: Addressed "File Not Found" errors by correctly handling the output file names generated by
-
Fixed Unsupported Codec Errors:
- Excluded Unsupported Subtitles: Modified the FFmpeg conversion process to exclude subtitle streams that use codecs unsupported by the MKV container, such as
mov_text, preventing conversion failures.
- Excluded Unsupported Subtitles: Modified the FFmpeg conversion process to exclude subtitle streams that use codecs unsupported by the MKV container, such as
Future Plans
-
Feature Enhancements:
- GUI with User Customization Options: Explore adding features that allow users to adjust black frame detection thresholds and splitting rules to better suit different types of content with a convenient GUI
- Additional Video Format Support: Consider expanding support to include more video formats based on user feedback and demand.
-
Performance Optimization:
- Processing Speed Improvements: Investigate methods to enhance processing efficiency, such as optimizing code paths or leveraging multithreading where appropriate.
Acknowledgments
We appreciate the feedback on the initial release of this. It had lead to a more efficient and streamlined process for this release.
Note: Before using this updated version, please ensure you have the latest versions of FFmpeg and MKVToolNix installed, or allow the batch script to handle the installation for you automatically.