A utility library for managing media files, especially focused on conversion, organization, and archival.
This library provides tools for managing media content, with features for video transcription, image conversion, file renaming, zip operations, and more. It's designed to help organize and process large media collections efficiently.
- Batch convert images to WebP format
Useconvert-picto convert image files to the WebP format, reducing file size while maintaining quality. - Transcribe videos using whisper.cpp
transcribeleverages whisper.cpp to generate accurate transcriptions for video files. - Recursively rename video files using namer
renameintegrates with the namer library to rename video files in bulk. - Zip and archive content
archiveallows you to compress and archive folders into zip files asynchronously. - Batch unzip operations
unzipenables you to extract zip files recursively, with an option to delete archives after extraction. - Generate and batch add metadata (.nfo)
nfoand related tools (nfo-tag,nfo-studio,nfo-actor) create and modify metadata files for media content. - Group files by regex
grouporganizes files into subdirectories based on regex pattern matching (e.g., grouping by date). - Merge video files
mergecombines multiple video files into a single output using ffmpeg. - Remove empty folders
remove-emptycleans up directory structures by recursively deleting empty folders.
- uv (Recommended) or pip
- ImageMagick for image conversion.
- whisper.cpp compiled locally for transcription.
- ffmpeg for video merging.
Recommended (using uv):
git clone https://github.com/Alchemist-Aloha/ExplicitUtil.git
cd ExplicitUtil
uv syncUsing pip:
pip install -e .ExplicitUtil supports persisting your preferred settings (like whisper_root, num_threads, etc.) to a local configuration file.
- Location:
~/.explicitutil/*.toml - Usage: Add the
--saveflag to any command to persist the provided options for future use.
Example:
ExplicitUtil transcribe ./my_videos --whisper-root /path/to/whisper.cpp --saveNext time, you can just run:
ExplicitUtil transcribe ./other_videosThe primary way to use ExplicitUtil is via the CLI entry point.
# Get help and list all commands
ExplicitUtil --help
# Transcribe videos
ExplicitUtil transcribe [FOLDER] --whisper-root [PATH]
# Convert images to WebP
ExplicitUtil convert-pic [FOLDER] --quality 80
# Zip and archive folders
ExplicitUtil archive [SOURCE] [DESTINATION]
# Unzip and extract
ExplicitUtil unzip [FOLDER] --delete
# Generate metadata
ExplicitUtil nfo [MEDIA_PATH]
# Batch add tag to NFO files
ExplicitUtil nfo-tag [NFO_DIR] "MyTag"
# Batch rename video files using namer
ExplicitUtil rename [FOLDER]
# Group files by date (default regex)
ExplicitUtil group [DIRECTORY] --move
# Merge videos
ExplicitUtil merge file1.mp4 file2.mp4 output.mp4
# Remove empty folders
ExplicitUtil remove-empty [TARGET_DIR]Check https://alchemist-aloha.github.io/ExplicitUtil/ExplicitUtil.html for the full API documentation.
See explicit_util_examples.ipynb for interactive examples and library usage.
MIT