Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th January 2025, 14:34   #1  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 388
Lossy WEBP Colors

I want to make a lossy (yeah, you heard that right) animated WEBP file, but I also want it to have the same colors as my input video. How do I do that with ffmpeg or some other tool? How do I achieve very high quality for lossy webp files (both still and animated)?

Last edited by jay123210599; 11th January 2025 at 16:19.
jay123210599 is offline   Reply With Quote
Old 11th January 2025, 15:36   #2  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 8,387
lossless.
lossy compression at very high quality like crf 1 is often bigger then lossless crf 0.

you don't ask for the best on this forum because there is no answer.
huhn is offline   Reply With Quote
Old 11th January 2025, 16:17   #3  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 388
Quote:
Originally Posted by huhn View Post
lossless.
lossy compression at very high quality like crf 1 is often bigger then lossless crf 0.

you don't ask for the best on this forum because there is no answer.
What should the command be for very high quality lossy animated webp for ffmpeg? Are there any tools that could do the trick?
jay123210599 is offline   Reply With Quote
Old 11th January 2025, 17:15   #4  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 342
Code:
-quality 100
GeoffreyA is offline   Reply With Quote
Old 11th January 2025, 17:26   #5  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 388
Quote:
Originally Posted by GeoffreyA View Post
Code:
-quality 100
What about this?
Code:
-lossless 0

Last edited by jay123210599; 11th January 2025 at 17:29.
jay123210599 is offline   Reply With Quote
Old 11th January 2025, 18:31   #6  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 342
Something along the lines of:

Code:
ffmpeg -i INPUT -lossless 0 -quality 100 OUTPUT.webp
The lossless switch is not strictly necessary because, by default, it is zero.
GeoffreyA is offline   Reply With Quote
Old 11th January 2025, 23:07   #7  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 388
Quote:
Originally Posted by GeoffreyA View Post
Something along the lines of:

Code:
ffmpeg -i INPUT -lossless 0 -quality 100 OUTPUT.webp
The lossless switch is not strictly necessary because, by default, it is zero.
I mean -lossless 0 by itself, without the -quality 100.
jay123210599 is offline   Reply With Quote
Old 11th January 2025, 23:37   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,626
Quote:
Originally Posted by jay123210599 View Post
I mean -lossless 0 by itself, without the -quality 100.
Look at the instructions / help

The default quality is 75 , without the -quality 100

Code:
ffmpeg -h encoder=libwebp
Quote:
libwebp encoder AVOptions:
-lossless <int> E..V....... Use lossless mode (from 0 to 1) (default 0)
-preset <int> E..V....... Configuration preset (from -1 to 5) (default none)
none -1 E..V....... do not use a preset
default 0 E..V....... default preset
picture 1 E..V....... digital picture, like portrait, inner shot
photo 2 E..V....... outdoor photograph, with natural lighting
drawing 3 E..V....... hand or line drawing, with high-contrast details
icon 4 E..V....... small-sized colorful images
text 5 E..V....... text-like
-cr_threshold <int> E..V....... Conditional replenishment threshold (from 0 to INT_MAX) (default 0)
-cr_size <int> E..V....... Conditional replenishment block size (from 0 to 256) (default 16)
-quality <float> E..V....... Quality (from 0 to 100) (default 75)
poisondeathray is offline   Reply With Quote
Old 12th January 2025, 00:27   #9  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 388
What if my inputs are yuv222p or yuv444p videos? Will I still get the same colors if I use lossy webp?
jay123210599 is offline   Reply With Quote
Reply

Tags
image-quality, webp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.