VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    All right, I promise this will be the last, last time I will ask about lossy and lossless image formats.

    If you make images in lossy format with the maximum possible bitrate, you won't be able to see the quality loss even if you zoom in? If so, what is the maximum bitrate for images? If you convert from a lossy format to lossless (for both videos and images), the output will also be lossless?
    Quote Quote  
  2. Originally Posted by Jay123210599 View Post
    All right, I promise this will be the last, last time I will ask about lossy and lossless image formats.
    I quoting this

    If you make images in lossy format with the maximum possible bitrate, you won't be able to see the quality loss even if you zoom in?
    Depends on the source content complexity, the encoder and settings used, the viewer's eyes.

    eg. A black frame is very simple and you won't see the quality loss with even a few kb. In fact a lossy encoder can produce lossless results for simple content.

    There can be large variations in encoders for the same format. e.g .vdub jpeg vs. ffmpeg jpeg. vs mozilla jpeg. vs. guetzli jpeg vs. photoshop jpeg etc... Some can produce very high quality results on certain types of content, but perform less well on others at the highest quality setting. Some are optimized for lower filesizes with good quality. Some are optimzed for speed.


    There are large variations in viewer perception. Some people can see small differences, others cannot



    If so, what is the maximum bitrate for images?
    Depends on the source content complexity, the encoder and settings used

    Usually you will hit the maximum bitrate for that given lossy encoder and source, at the highest quality level setting


    If you convert from a lossy format to lossless (for both videos and images), the output will also be lossless?
    It will be lossless compared to the direct lossy input in the same pixel format, assuming everything else is handled correctly.

    If the pixel format changes, the output is technically not lossless unless the pixel format is reversible to produce the original direct lossy uncompressed source data
    Quote Quote  
  3. Originally Posted by Jay123210599 View Post
    If you make images in lossy format with the maximum possible bitrate, you won't be able to see the quality loss even if you zoom in?
    It depends on how closely you look. Looking at too images side by side -- you may not see a difference. A/B flipping between the two images -- you may see a difference. A/B flipping and using a screen magnifier to zoom in 8x -- you will likely see a difference.

    Originally Posted by Jay123210599 View Post
    If so, what is the maximum bitrate for images?
    Bitrate is the image/file size divided by the running time. Images don't have a running time, so they don't have a bitrate.

    Originally Posted by Jay123210599 View Post
    If you convert from a lossy format to lossless (for both videos and images), the output will also be lossless?
    Yes. As long as you don't change anything else like the chroma subsampling, frame rate, etc.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Images don't have a running time, so they don't have a bitrate.
    Good point - it's just "bits" not a "rate" for a static image
    Quote Quote  
  5. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Avidemux jpeg vs ffmpeg jpeg vs -lossless 0 webp. Which one has the higher quality? What is the highest bit rate for RGA images (like 24 bit or higher)?
    Quote Quote  
  6. Originally Posted by Jay123210599 View Post
    Avidemux jpeg vs ffmpeg jpeg vs -lossless 0 webp. Which one has the higher quality?
    Not webp for high lossy quality (-lossless 0 -quality 100) . It's YUV420 , and quality is not as high as other compression types at the highest settings

    Not sure about avidemux, never used it for jpeg

    Highest for jpeg on most types of sources is probably mozjpeg @ -quality 100

    You can do some tests and zoom in, and/or measure the quality with metrics such as PSNR, SSIM . This was demonstrated in one of your threads

    For single images, AVIF with -crf 1 produces very high quality, but the compatibility is substantially lower

    What is the highest bit rate for RGA images (like 24 bit or higher)?
    You mean "bits" or filesize ; there is no bitrate for images as jagabo pointed out above

    For RGB , it depends on compression type, the specific encoder and settings used , lossy vs,. lossless., speed tradeoff.

    Jpeg officially supports RGB mode, but the majority are stored as YUV because the compression is higher. RGB does not compress as well

    It's easy for you to do some tests on your own content
    Quote Quote  
  7. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Jay123210599 View Post
    Avidemux jpeg vs ffmpeg jpeg vs -lossless 0 webp. Which one has the higher quality?
    Not webp for high lossy quality (-lossless 0 -quality 100) . It's YUV420 , and quality is not as high as other compression types

    Not sure about avidemux, never used it for jpeg

    Highest for jpeg on most types of sources is probably mozjpeg @ -quality 100

    You can do some tests and zoom in, and/or measure the quality with metrics such as PSNR, SSIM . This was demonstrated in one of your threads

    For single images, AVIF with -crf 1 produces very high quality, but the compatibility is substantially lower

    What is the highest bit rate for RGA images (like 24 bit or higher)?
    You mean "bits" or filesize ; there is no bitrate for images as jagabo pointed out above

    For RGB , it depends on compression type, the specific encoder and settings used , lossy vs,. lossless., speed tradeoff.

    Jpeg officially supports RGB mode, but the majority are stored as YUV because the compression is higher. RGB does not compress as well

    It's easy for you to do some tests on your own content
    Where can I get mozjpeg? Is it in ffmpeg? Also, do jpegs support YUV (4:2:0, 4:2:2, 4:4:4)? Are lossy webp files incompatible with 4:2:2 and 4:4:4?
    Quote Quote  
  8. Originally Posted by Jay123210599 View Post
    Where can I get mozjpeg?
    Is google broken ? Try bing or yahoo

    https://github.com/mozilla/mozjpeg

    windows binaries
    https://github.com/garyzyg/mozjpeg-windows/releases

    Is it in ffmpeg?
    No


    Also, do jpegs support YUV (4:2:0, 4:2:2, 4:4:4)?
    Yes

    Are lossy webp files incompatible with 4:2:2 and 4:4:4?
    They are "compatible" in the sense that it can work - but they get downsampled to 4:2:0

    lossy webp is YUV420 only

    In case you forgot
    https://forum.videohelp.com/threads/413134-Change-the-DPI#post2720505
    Quote Quote  
  9. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Jay123210599 View Post
    Where can I get mozjpeg?
    Is google broken ? Try bing or yahoo

    https://github.com/mozilla/mozjpeg

    windows binaries
    https://github.com/garyzyg/mozjpeg-windows/releases

    Is it in ffmpeg?
    No


    Also, do jpegs support YUV (4:2:0, 4:2:2, 4:4:4)?
    Yes

    Are lossy webp files incompatible with 4:2:2 and 4:4:4?
    They are "compatible" in the sense that it can work - but they get downsampled to 4:2:0

    lossy webp is YUV420 only

    In case you forgot
    https://forum.videohelp.com/threads/413134-Change-the-DPI#post2720505
    Just like how all forms of YUV are converted to RGB/RGBA, for both lossless webp and png files, no matter what I put for -vf?
    Quote Quote  
  10. Originally Posted by Jay123210599 View Post

    Just like how all forms of YUV are converted to RGB/RGBA, for both lossless webp and png files, no matter what I put for -vf?
    Yes . If the output is lossless webp, or PNG, it has to be RGB/RGBA

    The steps in between help determine if the conversion is correct, or the colors are wrong or some other errors. Sometimes some of the inbetween steps are "automatic" in ffmpeg . Sometimes it's correct, sometimes not - some of the automatic behaviour depends on the source file type and how it 's flagged. If you get the wrong results, you might have to adjust some filters or commands. You can use -report to see a debug report and see what is going on behind the scenes
    Quote Quote  
  11. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Jay123210599 View Post

    Just like how all forms of YUV are converted to RGB/RGBA, for both lossless webp and png files, no matter what I put for -vf?
    Yes . If the output is lossless webp, or PNG, it has to be RGB/RGBA

    The steps in between help determine if the conversion is correct, or the colors are wrong or some other errors. Sometimes some of the inbetween steps are "automatic" in ffmpeg . Sometimes it's correct, sometimes not - some of the automatic behaviour depends on the source file type and how it 's flagged. If you get the wrong results, you might have to adjust some filters or commands. You can use -report to see a debug report and see what is going on behind the scenes
    Wait a minute, uncompressed image formats are also lossless, right? Do they compress better in 7z/zip/rar/zqad files than losslessly compressed images? Which one is the smallest one?
    Quote Quote  
  12. Originally Posted by Jay123210599 View Post
    Wait a minute, uncompressed image formats are also lossless, right?
    Yes, lossless compared to the same pixel format

    So 8bit RGB PNG could decompress/uncompress to 8bit BMP, and that BMP is lossless compared to the PNG

    Do they compress better in 7z/zip/rar/zqad files than losslessly compressed images? Which one is the smallest one?
    Overall similar compression ratios for zip/rar/7z, because they use similar algorithms. Some results are slightly bigger, some slightly smaller. It also depends on the content

    But there are other slower archive compressors that even achieve higher ratios like zpaq. There are probably even slower better more exotic ones that might take 1000x slower for compression and decompression. You can search for benchmarks. But what you should really do is test on your content. Because the results can be different than published benchmarks, because the content is different.

    Biggest drawback of archive compressors - You cannot "view" something in an archive very easily. Whereas a PNG can be embedded and displayed automatically .

    You could also upload the (cut) original compressed video, it will be absolute smallest
    Quote Quote  



Similar Threads

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