Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediaKeeper

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.

Features

  • 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

Requirements

  • Bash
  • exiftool
  • ImageMagick
  • FFmpeg

Configuration

Copy the example configuration before the first run:

cp config.conf.example config.conf

Then edit config.conf to match your environment.

Directories

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.

General

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.

Timestamp

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.

Image Conversion

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.

Video Conversion

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.

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages