ShareX

Actions

What are ShareX actions?

After capture screen you can automatically run configured actions to post-process captures. This is accomplished by running third party applications using CLI arguments and passing file path of the captured file.

How to use ShareX actions?

Example actions

Convert image to WebP using cwebp

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

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

Compress PNG file lossy using pngquant

File name: pngquant.exe
Arguments:

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

Compress PNG file lossless using OptiPNG

File name: optipng.exe
Arguments:

-o2 -strip all "$input"

Convert image to JPEG using MozJPEG

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

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

Convert image to JPEG using ImageMagick

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

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

Convert video to x264 using FFmpeg

File name: ffmpeg.exe
Output file name 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 using FFmpeg

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

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

Convert video to VP8 using FFmpeg

File name: ffmpeg.exe
Output file name 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 using FFmpeg

File name: ffmpeg.exe
Output file name 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 using FFmpeg

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

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

Convert video to Xvid using FFmpeg

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

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

Convert video to GIF using FFmpeg

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

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

Convert video to WebP using FFmpeg

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

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

Convert video to APNG using FFmpeg

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

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

Compress file to ZIP using 7-Zip

File name: 7z.exe
Output file name extension: zip
Arguments:

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

Compress file to 7z using 7-Zip

File name: 7z.exe
Output file name extension: 7z
Arguments:

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