MediaKeeper is a lightweight Bash utility for preparing image and video collections for specific server directories. It was written to expand the functionality of File Browser Quantum.
- Synchronizes timestamps from EXIF metadata
- Converts JPEG images to WebP
- Scale large image files to predefined dimensions
- Resizes videos with FFmpeg
- Incremental processing
- Automatic index management
Supported image formats:
- JPG
- JPEG
- PNG
- TIFF
- BMP
- GIF
- HEIC
- HEIF
Supported video formats:
- MP4
- MOV
- M4V
- AVI
- MKV
- Bash
- exiftool
- ImageMagick
- FFmpeg
Copy the example configuration before the first run:
cp config.conf.example config.confThen edit config.conf to match your environment.
| Variable | Description |
|---|---|
FILES_DIR |
Root directory that MediaKeeper scans recursively for media files. |
INDEX_FILE |
Name of the index file created inside each processed directory. |
| Variable | Description |
|---|---|
MIN_FILE_AGE_HOURS |
Ignore files newer than the specified number of hours. This helps avoid processing files that are still being copied. |
MAX_RUNTIME_HOURS |
Maximum runtime before MediaKeeper exits gracefully. The current file is always finished before the program stops. Set to 0 for unlimited runtime. |
| Variable | Description |
|---|---|
ENABLE_TIMESTAMP_SYNC |
Synchronize the file modification timestamp with the creation date stored in EXIF metadata. |
MIN_VALID_YEAR |
Ignore metadata dates older than this year. |
MAX_FUTURE_YEARS |
Allow timestamps up to this many years in the future. Useful for correcting minor camera clock errors. |
| Variable | Description |
|---|---|
ENABLE_IMAGE_CONVERSION |
Enable automatic image conversion. |
WEBP_QUALITY |
WebP compression quality (0–100). Higher values preserve more image quality but increase file size. |
WEBP_MAX_DIMENSION |
Maximum width or height of the generated WebP image. Images smaller than this value are not enlarged. |
WEBP_CONVERT_SOURCES |
List of image file extensions that should be converted to WebP. |
FORCE_IMAGE_PROCESSING |
Reprocess supported image files even if they already exist in the index. Useful after changing image conversion settings. |
| Variable | Description |
|---|---|
ENABLE_VIDEO_CONVERSION |
Enable automatic video conversion. |
VIDEO_CONVERT_SOURCES |
List of video file extensions that should be converted. |
VIDEO_MAX_WIDTH |
Maximum output video width. |
VIDEO_MAX_HEIGHT |
Maximum output video height. |
VIDEO_CRF |
Constant Rate Factor used by the H.264 encoder. Lower values improve quality and increase file size. |
VIDEO_PRESET |
FFmpeg encoding preset. Slower presets improve compression efficiency but require more processing time. |
VIDEO_AUDIO_BITRATE |
Audio bitrate used for the converted video. |
VIDEO_AUDIO_RATE |
Audio sampling rate in Hz. |
FORCE_VIDEO_PROCESSING |
Reprocess supported video files even if they already exist in the index. Useful after changing video conversion settings. |
MIT License