TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

Convert png to jpg using ffmpeg

April 1, 2023

As a documentarian, I've used ffmpeg command-line tool for a while now. It is a powerful tool that can do a lot of things. At work, I use it to convert videos and images.

Prerequisites

Install ffmpeg using homebrew.

Why use ffmpeg?

On macOS, Cleanshot X app by default captures the screenshot in png format. These files are large in file size and have a large resolution (not usually suitable for a web page).

How to use ffmpeg to convert png to jpg?

A jpg can have a smaller file size and is preferred for web pages. To convert a png to jpg using ffmpeg, use the following command:

code
ffmpeg -i input.png -preset ultrafast output.jpg