VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. In ffmpeg, if I use -vf format=rgb24, will I always get the correct colors for any image format, including jpg and webp? What should I set -qscale:v (-q:v) to so I can get the best quality, 2 or 1? Will adding -qmin 1 and -qmax 1 also improve the quality?
    Last edited by The Enigma; 17th Mar 2024 at 14:29.
    Quote Quote  
  2. Member
    Join Date
    Jul 2022
    Location
    Spain
    Search Comp PM
    No, as you can see in the documentation of mjpeg and libwebp, which are the default encoders used by ffmpeg for jpg and webp, neither supports the rgb24 pixel format.

    ffmpeg -help encoder=mjpeg
    Code:
    Encoder mjpeg [MJPEG (Motion JPEG)]:
        General capabilities: threads
        Threading capabilities: frame and slice
        Supported pixel formats: yuvj420p yuvj422p yuvj444p yuv420p yuv422p yuv444p
    ...
    ffmpeg -help encoder=libwebp
    Code:
    Encoder libwebp [libwebp WebP image]:
        General capabilities: dr1
        Threading capabilities: none
        Supported pixel formats: bgra yuv420p yuva420p
    ...
    "-qscale:v (-q:v)" works with mjpeg but not for libwebp.

    Code:
    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)
    To configure the quality of libwebp use the parameter "-quality 0-100" or "-lossless".
    Quote Quote  
  3. That bgra format for libwebp is perhaps 8bit rgb, like rgb24 is, not planar as rgb24 is, but I guess that does not matter. I read, most likely here (poisondeathray inputs) that it could be done losslessly. It was discussed here, try to google "videohelp forum rgb lossless webp"
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Do these topics/posts remind anyone of a recently banned 'Troll' who kept starting topics about 'lossless' pic formats despite already having all the answers presented to him.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Yup, pretty sure it's the same character.


    Scott
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!