Log in

View Full Version : N-VOPs with Frame Drop Ratio


DeathTheSheep
22nd September 2005, 00:34
I ran across this in another thread, but since I have a slightly different topic question than "Why are there N-VOPs."
the frame drop ratio allows you to influence how many n-vops are placed in the stream.
-> with the default setting of 0, (only) frames which are 100% the same will get written as n-vop!!! the higher the frame drop ratio the more xvid ignores small differences between frames, therefore will think more frames are the same and therefore will write more n-vops

n-vops are good for saving bitrate, especially for content where lots of frames are the same, eg cartoons
This is pretty cool, in theory. What I'd like to know, though, is why XviD is so far off when it comes time to actually predicting where to place them.

When encoding a motionless cartoon clip -- literally no movement at all -- no N-VOPs were added, regardless of the Frame drop ratio (in fact, on the contrary, I get a bloated file with flashing B-frames!). However, many frames were dropped in extremely bizarre locations, as can be seen with the following clips:
0ratio.avi (http://filepost.us/userfiles/xsquaredx/0ratio.avi)
100ratio.avi (http://filepost.us/userfiles/xsquaredx/100ratio.avi)

The original motionless clip can be found in this thread, outlining the other part of my problem: http://forum.doom9.org/showthread.php?t=100338 .

This happens with the latest CVS (Sept. 16)!

Am I simply misinterpreting what frame drop ratio is for, or is this really a bug?

celtic_druid
22nd September 2005, 01:14
Try encoding the cartoon without bframes.

stephanV
22nd September 2005, 09:30
Yes, n-vops will only be inserted when b-frames are disabled.

DeathTheSheep
22nd September 2005, 18:19
Try encoding the cartoon without bframes.
I have, with exactly the pattern of dropped N-VOPs (they drop in the exact same place, not where they're useful).

I will upload a sample later, but take my word on it for now-- the frame drop ratio is not sentitive to motionless scenes in either encode. Is there a way to tweak N-VOP bias besides using the somewhat flawed (or so it seems) FDR?

[edit]
FDR=Frame Drop Ratio, not Franklin Delano Roosevelt!

celtic_druid
23rd September 2005, 02:08
If I ended 100 identical frames without b-vops, I get 97 N-VOP's 1 I and 2 P's. If I increase the sensitivity I get 99 N-VOP's.

DeathTheSheep
23rd September 2005, 19:09
Hm... odd. Try encoding the source file and AVIS script I described in this (http://forum.doom9.org/showthread.php?p=714607#post714607) thread. What happens for you?

stephanV
23rd September 2005, 19:34
If use frame drop ratio of 50 on that clip, the majority of frames are n-vops. (i have 1 i frame and 2 p frames)

Wilbert
23rd September 2005, 22:22
This is pretty cool, in theory. What I'd like to know, though, is why XviD is so far off when it comes time to actually predicting where to place them.
A while ago i had a discussion with bond about this, because this n-vop stuff doesn't work too well. I'm curious if the corresponding frame comparison is done before or after the compression?

DeathTheSheep
24th September 2005, 05:24
If use frame drop ratio of 50 on that clip, the majority of frames are n-vops. (i have 1 i frame and 2 p frames)

Hmm, yes, without B-frames it does work. Interesting. However, despite the bitrate saved with the N-VOPs (N-VOPs (http://www.filepost.us/userfiles/xsquaredx/50Drop.avi) vs. no N-VOPs (http://www.filepost.us/userfiles/xsquaredx/NoDrop.avi)), the N-VOPs are indeed inserted in odd places (notice the scene where the blond kid is commenting on how Ichiraku has the best ramen... lots of frames are gone even though there is some definate change in frames (who wouldn't notice the kid's huge mouth gabbing and the steam and the subtitles?!)

More importantly, however, is the fact that XviD's N-VOPs don't save nearly as much bitrate as do its B-frames. The exact same clip, with the exact same default settings, was much smaller and better looking at q=7 with B-frames than at q=7 without them (check the above files in this post against this (http://www.filepost.us/userfiles/xsquaredx/B-VOPs.avi)).

[Except, that is, for the still scenes, when the codec doesn't know when to stop using B-frames...so then the bitrate goes up quite a bit for them... but I guess I discuss that in my other current post http://forum.doom9.org/showthread.php?t=100338]

bond
1st October 2005, 11:49
my initial comment plus discussion about this can be found here (http://forum.doom9.org/showthread.php?t=73633), where i also wrote that fdr is ignored with b-frames in xvid, and that there are also other mpeg-4 asp codecs making use of n-vops, like 3ivx or nerodigital

DeathTheSheep
4th October 2005, 02:05
Nice! ;)
Very informative. Say, kinda OT, but does anyone know the status of 3ivX? Or if its N-VOP insertion can be tweaked in the new release?

Cheers,

bond
4th October 2005, 13:21
i dont think it can be tweaked by the user, after all there is no need for tweaking cause you want to drop 100% the same frames only anyways

but 3ivx surely aims at placing the n-vops at correct places, because you can encode that way a vfr stream in dshow in one step:
source -> 3ivx encoder (writes n-vops) -> 3ivx muxer (replaces n-vops and outputs variable framerate) -> vfr .mp4

stephanV
4th October 2005, 13:26
i dont think it can be tweaked by the user, after all there is no need for tweaking cause you want to drop 100% the same frames only anyways

Not really, there surely would need to be a threshold to accommodate for noise and things, otherwise the feature becomes even more useless than it already is.

bond
4th October 2005, 13:35
Not really, there surely would need to be a threshold to accommodate for noise and things, otherwise the feature becomes even more useless than it already is.well i dunno where the real threshold lies in xvid (with the lowest possible setting) and 3ivx, but they do drop frames, so it cant be that bad (or the default thresholds are chosen in a way to account for smaller differences)