Log in

View Full Version : Is FFV1 mature enough...


GrofLuigi
2nd March 2007, 21:17
...for production purposes? As far as I can see, no problems here with generic ffdshow_rev979_20070301_clsid (on Win XP SP2), but I'm still reluctant to use it for archive/capture purposes. Anyone experienced crashes/problems with recent builds? And what about parameters? I know there's only two of them, but I couldn't find any explanation as to their meaning and when to use which one of them... Basicaly, I'm asking for people's experiences (and a bit of reassurance maybe).

GL

foxyshadis
2nd March 2007, 23:18
Haven't had any problems or incompatibilities, and I've been using it to archive important captures and pre-filtered things for years. It's not multithreaded so it's not as fast as it could be, but it's never crashed or corrupted on me; I can still read those oldest files fine.

The parameters:
Coder is a pure speed/size tradeoff. It corresponds 100% to CABAC and CAVLC in h.264. AC is slower and smaller, VLC is faster and larger.

Context model is how much memory to use in compression; like rar or 7zip, more memory translates to better compression, but sometimes slower speeds.

I always wished for xvid's adaptive keyframes to go into ffv1, but oh well.

GrofLuigi
3rd March 2007, 00:22
Thank you for the explanation!

akupenguin
3rd March 2007, 03:10
The reason ffv1 never got scenecut detection is that it wouldn't affect compression ratio, only seeking. ffv1 is really an intra-only codec, the only data kept for the pseudo-P-frames is AC/VLC probability tables. (I experimented with an inter-prediction patch, but never cleaned it up enough to commit.)

foxyshadis
3rd March 2007, 04:52
Ah, I've been using it wrong then. kf dist of 10 is only 2% difference from 300, 2 is 4%, and 1 is only 7%. (In AC mode anyway.) I guess I've been using it wrong, and I'm going to have to change ffdshow's default 300. Thanks.

Was inter useful? Based on a couple of quick tests with avisynth-simulated inter modes, it looks like it isn't at all, without motion vectors.

akupenguin
3rd March 2007, 05:43
If you force all pixels to be inter-predicted, then no it isn't any better than intra. Even block-based is iffy. But my patch didn't use mpeg-like macroblocks, it switched between intra and motionless inter per pixel. It also used separate AC contexts for the two modes, with the inter context based on temporal variance (the current intra context is spatial variance).
Of course, coding an intra flag per pixel would have added a ton to the bitrate, so I didn't. Instead, for each pixel, I predict (based on the ratio of spatial to temporal variance in the neighborhood) whether it would be better predicted as intra or inter, and use the predicted mode. Then after seeing it's actually value, update the meta-predictor based on which would actually have been better.
Result: reduces the bitrate by a factor of 2 or 3 in low-motion scenes, and has no effect in high-motion. I don't remember how it compared with other inter-predicted lossless codecs, as I think that was before I added lossless to x264.

GrofLuigi
6th March 2007, 15:18
Back to more practical questions (before you guys scare me off :) ).

1. Is KF distance of, say, 600 frames really truely lossless?

2. Efficiency of 1 KF distance vs Huffy and others is...?

Although I suspect the answers will be "why don't you try for yourself", I must say in my defence that I have a very old rig and so little time...

GL

akupenguin
6th March 2007, 18:55
ffv1 is always lossless, at any settings. But don't even think of using keyint 600, that just sacrifices a bunch of seeking precision and doesn't help compression at all. I'd recommend a max of keyint 50, or less if you care about random access.

Average of 33 random test files I have on hand:
ratio codec
2.79 ffv1 (with inter-prediction patch)
2.59 ffv1 (AC, large context, keyint=50)
2.43 ffv1 (AC, large context, keyint=1)
2.24 huffyuv (ffmpeg version of course)

GrofLuigi
7th March 2007, 00:50
Thank you akupengyin, it's this little bits of knowledge that piece the bigger picture together (bad pun intended unfortunately) :)

GL

WorBry
12th March 2007, 11:55
Foxyshadis/Akupenguin,

I fear my simple inquiry about FFV1 posted over in the FFDShow Tryouts Project thread might be lost (and likely ignored completely) in the heady, high-tech exchanges going on there.

http://forum.doom9.org/showpost.php?p=969203&postcount=663

Any advice you could give would be appreciated?

akupenguin
12th March 2007, 17:11
Linux here, I can't answer anything related to ffdshow.

foxyshadis
12th March 2007, 20:05
Foxyshadis/Akupenguin,

I fear my simple inquiry about FFV1 posted over in the FFDShow Tryouts Project thread might be lost (and likely ignored completely) in the heady, high-tech exchanges going on there.

http://forum.doom9.org/showpost.php?p=969203&postcount=663

Any advice you could give would be appreciated?

I saw it, but I couldn't replicate it initially. I tried a few more, now I can. I'll open a bug report and see what can be done.

WorBry
12th March 2007, 21:13
Thanks Foxyshadis. ClSid also replied to my original inquiry and requested that I upload a sample, which I have done:

http://forum.doom9.org/showthread.php?p=969467#post969467