A photo and video processing script
1.1K
This script will process (resize, compress...) photos and videos according to the specified options
process-media use a yaml configuration file to specify somes options and template format who define how to process photos and videos.
Here is a photo format example:
web_photo:
type: 'photo'
rotate: 'auto'
resize: 1920
compress: 90
progressive: true
strip: true
strip_exclude: 'gps'
output_dir: 'web'
Here we define a photo format named web_photo.
The resulting photo(s) will be auto-rotated, resized, compressed, progressive jpeg enabled and all metadata will be removed except GPS informations.
By default two photo format (web_photo, archive_photo) and two video format (web_video, archive_video) are defined, default configuration file is available here.
Usage: ./process-media <path> [options]
<path> is the path to photos or videos to process
Options:
-t,--type {photo,video} Type of files to process (default: photo,video)
-f,--format {format1,...} Format to generate (default: all format defined in config file)
-c,--config <config_file> Config file to load (default: search local process-media.yaml file or in /etc)
-m,--max_threads <num_threads> Maximum allowed threads (default: number of cpu(s)/core(s))
-tz,--tzoffset Allow to change the default timezone offset used to rename file(s) (in seconds)
-k,--keep_name Do not rename file
-v,--verbose Verbose output
-o,--overwrite Overwrite existing files
-b,--batch Run in non-interactive mode, allowing to run in a crontab
-h,--help This help text
docker run -it --rm -v "$(pwd)":/media llavaud/process-media
docker run -it --rm -v /home/foo:/media llavaud/process-media -f web_photo
docker run -it --rm -v /home/foo:/media -v /home/foo/process-media.yaml:/etc/process-media.yaml -f web_photo
Content type
Image
Digest
Size
318.7 MB
Last updated
almost 8 years ago
docker pull llavaud/process-media