VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hi,

    I found a post on Topaz Video site using FFV1 - FFmpeg LossLess Encoder.


    In VEAI you can output to Ffv1 FFmpeg LossLess Encoder v3.4 by adding the following lines to the encoders.json…
    {
    “text”: “FFV1 - FFmpeg LossLess Encoder v3.4”,
    “encoder”: “-c:v ffv1 -coder 1 -context 0 -g 1 -level 3 -slices 4 -slicecrc 1 -pix_fmt yuv422p10le”,
    “ext”: [
    “avi”
    ],
    “transcode”: “aac -b:a 192k -ac 2”,
    “os”: “windows”,
    “minSize”: [1,1],
    “maxSize”: [16255,16255],
    “maxBitDepth”: 10,
    “doNotScaleFullColorRange”: “transcode”
    },


    I am also interested in a users question so posted it here.

    Question is, what are the Maximum Possible Quality Settings using FFV1?
    How close can it get to Lagarith RGBA32?

    Not worried about size or processing time.
    Thanks
    Quote Quote  
  2. There is no quality difference if something is lossless and it's in the same pixel format

    Lossless is "either / or" , "yes or no" . It's a binary condition. It's either lossless or not lossless (ie. lossy) .

    But if the input is 8bit RGB, then -pix_fmt yuv422p10le is lossy in terms of pixel format .

    But FFV1 supports gbrp/gbrpa (essentially same as RGB, just arranged differently in planar configuration) . That would be the same as lagarith RGB24 (or RGB32 if you have alpha) in terms of quality. PSNR would be infinity
    Quote Quote  
  3. Maximum Quality Settings is nothing to do with Lossless and doesn't specify any original state because in this case it is loaded in a software and processed.
    I might also want this information for other software or conditions not specified here!
    So the question relates to the maximum quality settings possible?
    I only mention Lagarith RGBA32 because it is the highest quality save I know of to use as example, and because it works well in multi-save processing!


    I am still trying to work this out for FFV1 like the MaxBitDepth possible.
    16?

    Highest quality pixel format? yuva444p16le, rgba64le, rgb48le?
    Going by reply, the highest FFV1 quality settings would be gbrp16le or rgba64le?
    A little confused.

    Supported pixel formats: yuv420p yuva420p yuva422p yuv444p yuva444p yuv440p yuv422p yuv411p yuv410p bgr0 *bgra* yuv420p16le yuv422p16le yuv444p16le yuv444p9le yuv422p9le yuv420p9le yuv420p10le yuv422p10le yuv444p10le yuv420p12le yuv422p12le yuv444p12le yuva444p16le yuva422p16le yuva420p16le yuva444p10le yuva422p10le yuva420p10le yuva444p9le yuva422p9le yuva420p9le gray16le gray gbrp9le gbrp10le gbrp12le gbrp14le gbrap10le gbrap12le ya8 gray10le gray12le gbrp16le rgb48le gbrap16le rgba64le gray9le yuv420p14le yuv422p14le yuv444p14le yuv440p10le yuv440p12le

    -slices etc
    Last edited by Tom4; 9th May 2023 at 22:02.
    Quote Quote  
  4. The maximum quality would the source pixel format. Always. FFV1 is always lossless , but only compared to the source pixel format.

    It's always the same 100% quality if you use the same pixel format. That's what "lossless" means. No quality loss. Same quality as input. You can't get higher than infinite psnr .

    If you started with 16bit RGB, then lagarith RGBA32 be would be considered lower quality, because it only supports 8bit . You could measure that quality loss

    For something to be "lossless" you need a reference, or to compare to the input

    To measure "quality" you also need a reference, something to compare to (usually the input)

    If your frame of reference is 8bit RGB, then 16bit gbrp16le or rgba64 would be overkill. You'd waste massive filesizes for nothing

    If you don't have an alpha channel, then you never need "A" . RGB24 instead of RGB32. gbrp16le instead of gbrpa16le . Functionally, the planar vs. packed are the same in quality, but planar formats are going to be faster to process. rgba64le is packed, gbrpa16le is the planar equivalent. Both have alpha channel (because of the "a")
    Quote Quote  
  5. Every time you re-save a video after process there is a loss of quality, which is why people who process and save the same file 10 times use Lagarith RGB32 or similar to reduce any loss to minimum.

    This would not be perfectly accurate in description for argumentative types, but it is close enough for me.
    You keep referring to the initial state of video, which I have not included as this question is not video specific.
    You refer to file size and processing time in your argument, when I stated in post "Not worried about size or processing time."

    Please do not reply, you are just arguing with people for your entertainment.
    Last edited by Tom4; 9th May 2023 at 23:32.
    Quote Quote  
  6. Originally Posted by Tom4 View Post
    Every time you re-save a video after process there is a loss of quality, which is why people who process and save the same file 10 times use Lagarith RGB32 or similar to reduce any loss to minimum.

    This would not be perfectly accurate in description for argumentative types, but it is close enough for me.
    Not "reduce any loss to a minimum" - There would be no quality loss if the input file was 8bit RGB. Lagarith is a lossless codec like FFV1. That's why people use it

    Please do not reply, you are just arguing with people for your entertainment.
    Actually i'm trying to help; Can you point out where there were any arguments posted? I've only posted factual information

    You mentioned "I might also want this information for other software or conditions not specified here!" - that's why the pixel format is so important. You need to understand how the program is working, what it's using "underneath the hood". This is especially important for things like NLE's - If you make a mistake, often you no longer have lossless, thus you no longer have maximum quality. ie. You have lower quality . Such as the -pix_fmt yuv422p10le mistake

    For VEAI specifically, internally it works in RGB, but for some models it was able to output in RGB float (32bit) . The absolute highest quality was EXR float export , but it was broken and buggy in some of the point releases

    If you were "content" with Lagarith RGB32 , then the functional equivalent would actually be bgra , I don't see gbrap on that list. Exactly the same quality as Lagarith RGB32. One big difference between lagarith vs FFV1, is FFV1 supports temporal compression if you use -g greater than 1 . This usually means smaller filesizes , but same quality as lagarith when comparing the same pixel format.

    If you're ok with 16bit TIFF or 16bit PNG output quality from VEIA, then the functional equivalent would be gbrp16le or gbrap16le (if you wanted alpha). Again the benefit is the possiblity to use temporal compression , and reduce filesizes with the maximum (lossless) quality
    Quote Quote  
  7. Your last post is about where I landed on the subject.
    Thanks
    Quote Quote  
  8. As many pointed earlier - lossless is lossless - so in terms of quality any lossless codec already provide maximum quality - difference between lossless codecs is coding gain - bigger or smaller file size, FFV1 is covered by https://trac.ffmpeg.org/wiki/Encode/FFV1 - also lossless RGB to YCoCg-R conversion could improve coding gain if used (sadly AFAIK none of lossless codecs support this internally with perhaps exception of HEVC and related in lossless mode with Adaptive color transform active).
    Quote Quote  



Similar Threads

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