Why does ffmpeg convert from jpg to WebP make a difference in results?

Asked 2 years ago, Updated 2 years ago, 111 views

I converted the image from jpg to webp in ffmpeg.

pattern 1
Convert directly from jpg to webp

-vf scale=1200:-1-vcodec libwebp-compression_level6-qscale10

pattern 2
Resize jpg

-vf scale=1200:-1

Convert output jpg to webp

-vcodec libwebp-compression_level6-qscale10

Why does the result change between pattern 1 and pattern 2?
How do I write the results of pattern 2 in one sentence?

ffmpeg

2022-09-30 11:31

1 Answers

JPEG typically performs irreversible compression.That is, it deteriorates when saving with -vf scale=1200:-1.

How do I write the results of pattern 2 in one sentence?

It's impossible.Pattern 1 encodes webp without degradation.

Also, if you save it in PNG format in pattern 2, it will be reversibly compressed, so the deterioration will be suppressed.However, the color changes because the color space is YCbCr in JPEG, while the PNG is RGB.


2022-09-30 11:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.