# The cwebp bin i have used is the one in libwebp-1.0.2-linux-x86-64
#original JPG file size is 8.9 MB
#scale to 150px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=150:-1 -vframes 1 outputFile.jpg
#resulting file size: 6.4 KB
cwebp -resize 150 0 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 4.1 KB
#scale to 300px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=300:-1 -vframes 1 outputFile.jpg
#resulting file size: 17.6 KB
cwebp -resize 300 0 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 14.0 KB
#scale to 600px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=600:-1 -vframes 1 outputFile.jpg
#resulting file size: 47.4 KB
cwebp -resize 600 0 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 49.1 KB
#scale to 1200px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=1200:-1 -vframes 1 outputFile.jpg
#resulting file size: 140.8 KB
cwebp -resize 1200 0 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 180.4 KB
#scale to 1680px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=1680:-1 -vframes 1 outputFile.jpg
#resulting file size: 225.4 KB
cwebp -resize 1680 0 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 333.8 KB
#scale to 2560px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=2560:-1 -vframes 1 outputFile.jpg
#resulting file size: 434.9 KB
cwebp -resize 2560 0 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 750.3 KB
#scale to 3840px width, auto height (preserve AR)
ffmpeg -y -i inputFile.jpg -f image2 -vf scale=3840:-1 -vframes 1 outputFile.jpg
#resulting file size: 797.8 KB
cwebp -resize 3840 -m 6 inputFile.jpg -o outputFile.webp
#resulting file size: 1.5 MBI have tried to convert this 8K image both to JPG and WebP at lower resolutions: https://wallpapersite.com/images/wallpapers/mountains-7360x4912-rocks-4k-8k-6143.jpgBut in some cases the JPG conversion gave better results than Webp: lower file size for the same resolution.
--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
To post to this group, send email to webp-d...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.
What i would, in your case is:* use the 'get_disto' command-line tool to get an idea of the distortion between the source, the jpeg and the webp images.* compress the JPEG first, record the file size, and then use it as target size for cwebp: 'cwebp -size the_jpg_size -resize ....'Then you can see if there's a real visual difference.
Error while computing the distortion.Error while computing the distortion.#from original 8K , to 4K
cwebp -resize 3840 0 -m 6 -q 100 -size <expectedMaxWebPSize> -af -pass 10 originalFile.jpg -o outputFile.webpWhat i would, in your case is:* use the 'get_disto' command-line tool to get an idea of the distortion between the source, the jpeg and the webp images.* compress the JPEG first, record the file size, and then use it as target size for cwebp: 'cwebp -size the_jpg_size -resize ....'Then you can see if there's a real visual difference.Thanks.Your second suggestion works.Then i tried get_disto to check the distortion of the resulting files, but it gave me:Error while computing the distortion.Why ?