|
|
@ -79,6 +79,25 @@ |
|
|
|
"command": "cp {input_file} {output_file}" |
|
|
|
} |
|
|
|
}, |
|
|
|
"webp": { |
|
|
|
"jpeg": { |
|
|
|
"processors": ["cwebp"], |
|
|
|
"extensions": [ |
|
|
|
"jpg", |
|
|
|
"jpeg" |
|
|
|
], |
|
|
|
"outputExtension": "webp", |
|
|
|
"command": "cwebp -jpeg_like -q 90 -o {output_file} {input_file}" |
|
|
|
}, |
|
|
|
"png": { |
|
|
|
"processors": ["cwebp"], |
|
|
|
"extensions": [ |
|
|
|
"png" |
|
|
|
], |
|
|
|
"outputExtension": "webp", |
|
|
|
"command": "cwebp -lossless -o {output_file} {input_file}" |
|
|
|
} |
|
|
|
}, |
|
|
|
"aggressive": { |
|
|
|
"jpeg": { |
|
|
|
"processors": ["ffmpeg", "cjpeg"], |
|
|
@ -115,6 +134,43 @@ |
|
|
|
"outputExtension": "ogg", |
|
|
|
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -f wav -| opusenc --bitrate 64 --vbr --downmix-stereo --discard-comments --discard-pictures - {output_file}" |
|
|
|
} |
|
|
|
}, |
|
|
|
"aggressive-webp": { |
|
|
|
"jpeg": { |
|
|
|
"processors": ["cwebp"], |
|
|
|
"extensions": [ |
|
|
|
"jpg", |
|
|
|
"jpeg" |
|
|
|
], |
|
|
|
"outputExtension": "webp", |
|
|
|
"command": "export FILE={output_file} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {input_file} -vf scale=-1:720 ${TEMP_FILE} && cwebp -jpeg_like -q 75 -o {output_file} ${TEMP_FILE} && rm ${TEMP_FILE}" |
|
|
|
}, |
|
|
|
"png": { |
|
|
|
"processors": ["cwebp"], |
|
|
|
"extensions": [ |
|
|
|
"png" |
|
|
|
], |
|
|
|
"outputExtension": "webp", |
|
|
|
"command": "cwebp -o {output_file} ${input_file}" |
|
|
|
}, |
|
|
|
"video": { |
|
|
|
"processors": ["ffmpeg"], |
|
|
|
"extensions": [ |
|
|
|
"mp4", |
|
|
|
"webm" |
|
|
|
], |
|
|
|
"outputExtension": "webm", |
|
|
|
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -vf scale=-1:720 -c:v libvpx-vp9 -b:v 0 -crf 38 -c:a libopus {output_file}" |
|
|
|
}, |
|
|
|
"audio": { |
|
|
|
"processors": ["ffmpeg", "opusenc"], |
|
|
|
"extensions": [ |
|
|
|
"wav", |
|
|
|
"mp3" |
|
|
|
], |
|
|
|
"outputExtension": "ogg", |
|
|
|
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -f wav -| opusenc --bitrate 64 --vbr --downmix-stereo --discard-comments --discard-pictures - {output_file}" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |