Subject: [Cellar] FFV1 Profiles?

From: "Peter B." <[email-masked]>
Date: Mon, 13 Aug 2018 11:05:40 +0200

Hi all :)

I was recently asked for "profiles" for FFV1/MKV (for preservation).

So I think this would be the right place to discuss good parameter
options for different profiles, that can then be implemented e.g. as
Mediaconch policy, as well as maybe also in FFmpeg?

Here's my suggestion for FFV1 profiles, and I'd be very happy to hear
about your opinions:

## Preservation:
  * GOP=1
  * FFV1 version 3
  * SliceCRC=1
  * Slices=24

## IMLS (Intermediate Lossless):
  * GOP=1
  * FFV1 version 3
  * SliceCRC=0
  * Slices=24

I didn't put pix_fmt, aspect ratio or framerate in there, because I'd
say it should be kept as-is, if possible (why not?).
So I'm not speaking about format normalization ;)

As you see, I've also not put coder/context in there yet, since I must
admit I'm not 100% sure about when to choose which. For >8 bpc it does
matter though.

So what do you think about this?

Thanks in advance and nice greetings,
Peter

PS: I'll post another mail regarding possible profile definitions for MKV.

---

From: Jerome Martinez <[email-masked]>
Date: Mon, 13 Aug 2018 11:24:17 +0200

> So what do you think about this?

IMO profiles word should be used for something similar to other formats, 
i.e. a set of features that a decoder must support, with increasing 
level of difficulty for the decoder.
and the only difference between the 2 suggested profiles is only a 
feature not difficult to implement, so it may be in all decoders.
I consider the suggestions more as encoding policies, which should not 
be indicated in the FFV1 bitstream, maybe as MediaConch suggested policy 
&& FFmpeg option for setting all in 1 option.
Example: a profile should indicate that up to 24 slices must be 
supported by the decoder, not that there must be 24 slices (this is a 
user policy, not a decoder constraint).

I don't see obvious features to remove in a decoder, maybe the support 
of GOP not 1 (more work for keeping the status of the decoder between 2 
frames), chroma subsampling, RGB (additional transformation step), 
aspect ratio in all slices not same (this "feature" is actually not 
supported by any decoder AFAIK)... list of supported pix_fmt is also an 
issue, but this is not easy because the list is long (vs other formats). 
then I think more about "levels" indicating max count of slices, 
width/height/frame rate i.e. max count of pixels per second...

---

From: "Peter B." <[email-masked]>
Date: Mon, 13 Aug 2018 16:12:50 +0200

On 13/08/18 11:24, Jerome Martinez wrote:
> be indicated in the FFV1 bitstream, maybe as MediaConch suggested
> policy && FFmpeg option for setting all in 1 option.

Yes!

That's exactly what I meant.
Sorry for the confusion :D

Cheers,
Peter

---

From: "Peter B." <[email-masked]>
Date: Thu, 16 Aug 2018 15:54:10 +0200

Hi everyone :)

In order to define useful encoding policies for FFV1:
Any suggestions regarding the encoding options for "coder" and "context"
for different sources?

For example: coder X performs better on VHS source, but coder Y for
DigiBeta, DV, etc.
In my initial tests (2010), large context resulted in better compression
for VHS.

What are your experiences in that regard?

Thank you very much in advance,
Peter