ShareX

Actions

ShareX Actions Explained

After a capture is made, you can instruct ShareX to automatically process it using predefined actions. This involves executing external applicationsCLIwith command-line arguments that include the path to the recently captured file.

Setting Up ShareX Actions

Action Examples

Transform image to WebP with cwebp

File name: cwebp.exe
Output file extension: webp
Arguments:

"$input" -q 75 -o "$output"

Lossy PNG compression using pngquant

File name: pngquant.exe
Arguments:

"$input" --ext=.png --force --skip-if-larger --speed 3 --strip

Lossless PNG compression using OptiPNG

File name: optipng.exe
Arguments:

-o2 -strip all "$input"

Change image to JPEG with MozJPEG

File name: cjpeg.exe
Output file extension: jpg
Arguments:

-quality 90 -outfile "$output" "$input"

Change image to JPEG with ImageMagick

File name: magick.exe
Output file extension: jpg
Arguments:

convert "$input" -quality 85 -interlace plane -sampling-factor 4:2:0 -strip "$output"

Convert video to x264 via FFmpeg

File name: ffmpeg.exe
Output file extension: mp4
Arguments:

-i "$input" -c:v libx264 -preset medium -crf 23 -pix_fmt yuv420p -movflags +faststart -c:a aac -b:a 128k -y "$output"

Convert video to x265 via FFmpeg

File name: ffmpeg.exe
Output file extension: mp4
Arguments:

-i "$input" -c:v libx265 -preset medium -crf 28 -c:a aac -b:a 128k -y "$output"

Convert video to VP8 via FFmpeg

File name: ffmpeg.exe
Output file extension: webm
Arguments:

-i "$input" -c:v libvpx -crf 10 -b:v 0 -c:a libvorbis -q:a 3 -y "$output"

Convert video to VP9 via FFmpeg

File name: ffmpeg.exe
Output file extension: webm
Arguments:

-i "$input" -c:v libvpx-vp9 -crf 31 -b:v 0 -c:a libvorbis -q:a 3 -y "$output"

Convert video to AV1 via FFmpeg

File name: ffmpeg.exe
Output file extension: mkv
Arguments:

-i "$input" -c:v libsvtav1 -crf 35 -c:a libopus -b:a 128k -y "$output"

Convert video to Xvid via FFmpeg

File name: ffmpeg.exe
Output file extension: avi
Arguments:

-i "$input" -c:v libxvid -q:v 10 -c:a libmp3lame -q:a 4 -y "$output"

Convert video to GIF via FFmpeg

File name: ffmpeg.exe
Output file extension: gif
Arguments:

-i "$input" -lavfi "palettegen=stats_mode=full[palette],[0:v][palette]paletteuse=dither=sierra2_4a" -y "$output"

Convert video to WebP via FFmpeg

File name: ffmpeg.exe
File extension for output: webp
Arguments:

-i "$input" -c:v libwebp -lossless 0 -preset default -loop 0 -y "$output"

FFmpeg: Convert Video to APNG

File name: ffmpeg.exe
File extension for output: apng
Arguments:

-i "$input" -f apng -plays 0 -y "$output"

7-Zip: Compress File to ZIP

File name: 7z.exe
File extension for output: zip
Arguments:

a -tzip "$output" "$input" -mx=9

7-Zip: Compress File to 7z

File name: 7z.exe
File extension for output: 7z
Arguments:

a -t7z "$output" "$input" -mx=9