Log in

View Full Version : NVOP, what is it and how do I turn it off?


Pages : [1] 2

Elias
19th April 2005, 23:53
I've been randomly getting NVOP on my XviD encodes. I don't use Packed Bitstream and GSpot says that NVOPs are characteristics of Packed bitstream. So, my question is: what is NVOP and how do I turn it off? What's the pros and cons with it? Is it good for hardware support? I've noticed that MP4Box removes NVOPs, and as a result of it, the final *.mp4 file gets a weird frame rate, like say 24.96 instead of 25.00 and that's the main reason why I want to turn NVOP off. Thanks in advance for all the help.

*.mp4 guy
20th April 2005, 00:19
an Nvop is a frame that doesn't exist, they are used as place holders in avi-files so there is no way to turn them off.

Elias
20th April 2005, 06:40
Originally posted by *.mp4 guy
an Nvop is a frame that doesn't exist, they are used as place holders in avi-files so there is no way to turn them off. Damn! But why is it produced when encoding to MPEG-4 SP/ASP? I mean, there must be some way to prevent it?

Koepi
20th April 2005, 08:29
There is. Disable b-frames.

Elias
20th April 2005, 11:37
Originally posted by Koepi
There is. Disable b-frames. That's the funny part. I never use b-frames, yet I still get NVOP on some encodes. I have no idea why.

Koepi
20th April 2005, 12:32
Do you set frame drop ratio to something different than 0?

Elias
20th April 2005, 13:07
Originally posted by Koepi
Do you set frame drop ratio to something different than 0? No. I never touch that. It seems to come at random. Some encodes get NVOPs, other encodes don't. Even though I use the same settings. I just tried XviD with ffdshow, and no NVOPs here.

*.mp4 guy
20th April 2005, 19:18
There is. Disable b-frames.

I thought nvops were also used when Xvid finds two identicle frames in a row?

Elias
20th April 2005, 19:20
Originally posted by *.mp4 guy
I thought nvops were also used when Xvid finds to identicle frames in a row? I have no idea, but trust me, b-frames is disabled. I never use b-frames. I tried the same settings with XviD in ffdshow and didn't get any NVOPs. I am using adaptive quantization. Could this be the reason?

Shinigami-Sama
21st April 2005, 00:24
learn somthin new every day
now I know what n-frames b-frames i-frames and p-frames aer :D
always wondered bout them and the other ones

stephanV
21st April 2005, 08:24
If you use no b-frames and you do not use frame dropping then there is no reason for the codec to use n-vops. So you are doing something wrong, or it is a bug.

Elias
21st April 2005, 08:32
Originally posted by stephanV
If you use no b-frames and you do not use frame dropping then there is no reason for the codec to use n-vops. So you are doing something wrong, or it is a bug. Trust me, I don't use B-Frames because I want QT compatibility. And why would I want to use frame dropping? It must be a bug. I am using koepi's latest beta version. I also got this with beta1. I'll try celtic's versions later. Here's a screenshot that proves there's no b-frames, yet there are nvops.

http://img247.echo.cx/img247/8750/xvidnvopnobframes6np.png

Nic
21st April 2005, 09:19
Really strange, frame drops and b-frames are the only places in the code where an N-VOP is being written....I'll keep looking.
Elias, could you give me your exact settings and the name of the app(s) you use to test for N-VOPs so I can try and replicate it. Thanks.

-Nic

ps
For those interested; N-VOPs in the code are written using the BitstreamWriteVopHeader function and with the vop_coded parameter set to 0.

edit: It might be possible for you to get N-VOPs if packed bitrstream is turned on even if max b-frames is set to 0. Is that correct in your case? If so it's probably a bug. I could be wrong, only just started looking, but I think we set the code to flush b-frames even if there aren't any. (and hence N-VOPs are written)

Elias
21st April 2005, 09:48
Originally posted by Nic
Really strange, frame drops and b-frames are the only places in the code where an N-VOP is being written....I'll keep looking.
Elias, could you give me your exact settings and the name of the app(s) you use to test for N-VOPs so I can try and replicate it. Thanks.

-Nic

ps
For those interested; N-VOPs in the code are written using the BitstreamWriteVopHeader function and with the vop_coded parameter set to 0. Sure. I was using this version (I'll provide the information from the installation). XviD-1.1.0-Beta2-04042005 _Beta Release_

Based on CVS from 04.04.2005 07:00h MET

Changelog to XviD-1.1-Beta 1:

XviD home: http://www.xvid.org/
Doom9's forum: http://forum.doom9.org/forumdisplay.php?s=&forumid=52

eMail: info at koepi dot org (replace the at with @ and the dot with a .)
URL: http://www.koepi.org/
Then I tried Celtic Druid's 1.1Beta2 version from this link http://www.aziendeassociate.it/cd///xvid-1.1.0-beta2-ICL7.0.exe
It seems his version doesn't have any problems with NVOPs, however, I can't seem to get a steady bitrate with it in 2pass mode :/ And trust me guys, I am NOT using framedrops. Below are screenshots of my XviD settings. They were taken from Celtic Druid's XviD compile. However, I use the exact same settings with Koepi's version. I don't change anything from the default settings except the changes you can see on the pictures (like unchecking b-frames, changing the min/max quantz from 1-31 to 2-12 etc).

http://img253.echo.cx/img253/2496/xvidnvop13rc.th.png (http://img253.echo.cx/my.php?image=xvidnvop13rc.png) http://img256.echo.cx/img256/8972/xvidnvop22qh.th.png (http://img256.echo.cx/my.php?image=xvidnvop22qh.png) http://img256.echo.cx/img256/2506/xvidnvop33rm.th.png (http://img256.echo.cx/my.php?image=xvidnvop33rm.png) http://img256.echo.cx/img256/244/xvidnvop46cu.th.png (http://img256.echo.cx/my.php?image=xvidnvop46cu.png) http://img256.echo.cx/img256/83/xvidnvop52oq.th.png (http://img256.echo.cx/my.php?image=xvidnvop52oq.png) http://img256.echo.cx/img256/9361/xvidnvop67xu.th.png (http://img256.echo.cx/my.php?image=xvidnvop67xu.png) http://img256.echo.cx/img256/2268/xvidnvop79im.th.png (http://img256.echo.cx/my.php?image=xvidnvop79im.png) http://img256.echo.cx/img256/3669/xvidnvop81yc.th.png (http://img256.echo.cx/my.php?image=xvidnvop81yc.png) http://img256.echo.cx/img256/7966/xvidnvop96cc.th.png (http://img256.echo.cx/my.php?image=xvidnvop96cc.png) http://img256.echo.cx/img256/2571/xvidnvop108ai.th.png (http://img256.echo.cx/my.php?image=xvidnvop108ai.png)

I don't think that the min/max quantizer change is the problem, although these quant settings are the old DivX 5.02 quant settings, I didn't get NVOPs while using them with Celtic's 1.1 beta 2. However, his version had much more problem getting an accurate average bitrate with 2pass (unlike koepi's build). I encoded the clips with the latest VirtualDub 1.6.5 experimental release. I believe I got NVOPs with the stable release too (1.5.10), however, I used MP4BoxGUI back then with MP4Box, and the GUI for some reason doesn't remove the NVOP frames, so I didn't care either way about what NVOPs was. Both MPEG4Modifier 1.3.2 and GSpot 2.52 b2 claim that the XviD files have NVOPs... and MP4Box compiled by celtic (latest CVS as of now). Anything more you wanted to know? :)

Elias
21st April 2005, 09:57
Originally posted by Nic
edit: It might be possible for you to get N-VOPs if packed bitrstream is turned on even if max b-frames is set to 0. Is that correct in your case? If so it's probably a bug. I could be wrong, only just started looking, but I think we set the code to flush b-frames even if there aren't any. (and hence N-VOPs are written) I never turn on packed bitstream due to the fact that it breaks the MPEG-4 compliance (so I've heard), and I'm really anal when it comes to keeping the MPEG-4 compliance as much as possible :) Check the settings I provided in the previous post.

Edit: I forgot to say that with Koepi's build, I get NVOPs every now and then. With some clips, I always get NVOPs, with other clips, I never get it. Even though I never change the settings (except bitrate maybe).

SeeMoreDigital
21st April 2005, 10:10
I must admit, I too have seen the N-VOP symbol appear in GSpot when generating encodes without B-VOP using XviD Beta1 and 2

However, when you feed the same file into MPEG4 Modifier and click on the "Video Info" button, it reports... N-VOPs: 0 (0.00%)

Maybe it's a bug in GSpot :eek: Which reminds me... SteveG has been very quite of late ;)


Cheers

Doom9
21st April 2005, 10:14
I guess there could be a problem here, but I must ask.. why write an AVI if you're going MP4? instead of putting the video data in an ill suited (though perfectly working) container for that, why not write a raw stream (say in mencoder), and put that into an mp4? I'm not the guy to root for another container, yet in this case I don't see the sense in using AVI.

Elias
21st April 2005, 10:15
Originally posted by SeeMoreDigital
I must admit, I too have seen the N-VOP symbol appear in GSpot when generating encodes without B-VOP using XviD Beta1 and 2

However, when you feed the same file into MPEG4 Modifier and click on the "Video Info" button, it reports... N-VOPs: 0 (0.00%)

Maybe it's a bug in GSpot :eek: Which reminds me... SteveG has been very quite of late ;) Hehe, perhaps. Gspot can't for some reason recognize the bitrate for MPEG-4 video encoded via ffdshow :) I have on the other hand, seen the NVOP symbol appear in MPEG4Modifier and MP4Box via commandline removes the NVOPs, so I guess they're just there :/

Elias
21st April 2005, 10:17
Originally posted by Doom9
I guess there could be a problem here, but I must ask.. why write an AVI if you're going MP4? instead of putting the video data in an ill suited (though perfectly working) container for that, why not write a raw stream (say in mencoder), and put that into an mp4? I'm not the guy to root for another container, yet in this case I don't see the sense in using AVI. Well, it usually works pretty good doing it this way because I use MP4Box, since I want to get the 3GPP Timed Text streams etc. And frankly, I don't know anything about mencoder :) MP4Box kicks ass btw :D And of course, not to forget: VirtualDub. I'd kill myself if I had to use anything else for encoding.

Nic
21st April 2005, 10:34
Well, just for you:
http://nic.dnsalias.com/XviD_Install_Elias.exe

This is the latest CVS (got just now) with a very simple pure VC6 SP6 compile (so nice and small (350kb) compared to an Intel one).

Let me know how you get on with this one (do a load defaults before setting your normal parameters). If you still have problems let me know then we can solve them.

-Nic

SeeMoreDigital
21st April 2005, 10:47
Originally posted by Nic
Well, just for you:
http://nic.dnsalias.com/XviD_Install_Elias.exe
-Nic Well if that ain't service, I don't know what is ;)

Elias, are you able to email/provide a short N-VOP example clip?


Cheers

Elias
21st April 2005, 10:53
Originally posted by SeeMoreDigital
Well if that ain't service, I don't know what is ;)

Elias, are you able to email/provide a short N-VOP example clip?


Cheers Hehe yeah :) I'll see if I can still generate some with the Koepi 1.1 beta 2. I don't know if all the uninstalling/installing has somehow affected XviD on my system. I just tried this version nic uploaded for me, and I don't seem to get any NVOPs anymore. However, it seems to act exactly like Celtic Druid's compile of 1.1 beta 2 (that is, no NVOPs, and irregular bitrate). But the NVOP issue seems to be solved with the "Elias XviD." I'll try some more encoding later today when I have more time, and I was planning on a clean format of XP too, so I'll try it with that as well. If you want samples, PM me your emails and I'll try to fix some for you (deleted all the old ones).

Didée
21st April 2005, 11:08
Originally posted by Elias
And of course, not to forget: VirtualDub. I'd kill myself if I had to use anything else for encoding.
What about using ffdshow's vfw codec interface for encoding to XviD? In ffdshow too, you have the option to output raw frames, which you later can mux into mp4. (Though I haven't tried that myself, yet.)

Nic
21st April 2005, 11:10
Could you explain the "irregular bitrate" a bit more? What is your target bitrate and what is it coming out as? (i.e. undersized, oversized). You're restricting the quantizers quite a bit and that's probably causing it. Why are you doing that?

-Nic

Elias
21st April 2005, 11:14
Originally posted by Nic
Could you explain the "irregular bitrate" a bit more? What is your target bitrate and what is it coming out as? (i.e. undersized, oversized). You're restricting the quantizers quite a bit and that's probably causing it. Why are you doing that?

-Nic Well, when I used the default 1-31 settings, I got huge oversized videos. So I created a thread about this and checked numerous other threads, and someone said that changing the quant settings could prevent the oversize issue. Then I checked the DivX 5.02 quant settings, and just went after the settings used in DivX 5.02 and the oversize issue was gone :) I'm getting like 1193/1092 etc when I set 1150. I get these bitrates from checking in GSpot.

Nic
21st April 2005, 11:21
"getting like 1193/1092 etc when I set 1150"
Is that with Koepi's build? If that's with mine or Celtic's then I don't see the problem (?)

Test what you get now with my build with your quant settings(2-12) and the default and let me know how you get on.

-Nic

Elias
21st April 2005, 11:30
Originally posted by Nic
"getting like 1193/1092 etc when I set 1150"
Is that with Koepi's build? If that's with mine or Celtic's then I don't see the problem (?)

Test what you get now with my build with your quant settings(2-12) and the default and let me know how you get on.

-Nic I will. At the moment, I am trying to generate one clip with the NVOP frames with Koepi's build. I failed on every clip I've tried so far, except for one... and it's an embarrassing webcam clip of myself that I'm not quite sure if I want to send to you guys :D I will now try to encode the same clip with the XviD Elias/Celtic versions and see if I get any NVOPs with these versions of XviD. Either way, more testing to come later today.

Elias
21st April 2005, 12:53
Okay boys and girls, I'm almost done with all the NVOP samples now. I only got Celtic Druid's version to encode. I can't send them via email though, so if you want them for inspection, join irc on irc.freenode.org #xvid and I'll send them to you.

edit: or wait, I can send them via Gmail to your Gmail or if you have an email that can handle 7 mb files. All in all, the files take 40 mb together.

Koepi
21st April 2005, 14:19
Is the behaviour constant, i.e. if you enocde the clip (with my build) again, are the nvops still there?

There shouldn't be any differences in that matter from beta2 to current CVS because there weren't patches applied since beta2 which concern this...

Cheers
Koepi

Elias
21st April 2005, 14:23
Originally posted by Koepi
Is the behaviour constant, i.e. if you enocde the clip (with my build) again, are the nvops still there?

There shouldn't be any differences in that matter from beta2 to current CVS because there weren't patches applied since beta2 which concern this...

Cheers
Koepi Actually, I got NVOPs by using all versions (Koepi, Celtic Druid and Nic Elias). I think you better have a look at the samples, and the original mpg source. Just tell me where to upload them and I'll do it. You can try using the mpg source to encode using my settings and see if you don't get NVOPs.

SeeMoreDigital
21st April 2005, 14:40
Hi Elias,

What information does MPEG4 Modifier provide about the N-VOP's?


Cheers

Elias
21st April 2005, 14:42
Originally posted by SeeMoreDigital
Hi Elias,

What information does MPEG4 Modifier provide about the N-VOP's?

Packed bitstream: No
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Custom pixel shape (10:11 = 0,90909)
Quant type: H.263

I-VOPs: 18 (1,13%)
P-VOPs: 1504 (94,59%)
B-VOPs: 0 (0,00%)
S-VOPs: 0 (0,00%)
N-VOPs: 68 (4,28%)

SeeMoreDigital, I added your msn adress on MSN Messenger, so go online and I'll send you the NVOP samples :)

Elias
21st April 2005, 16:13
Originally posted by Koepi
Is the behaviour constant, i.e. if you enocde the clip (with my build) again, are the nvops still there?Yes, NVOPs are still there when re-encoding.

SeeMoreDigital
21st April 2005, 16:37
Originally posted by Elias
SeeMoreDigital, I added your msn adress on MSN Messenger, so go online and I'll send you the NVOP samples :) Personally, I've never experienced anything other than "zero" N-VOP's with my 0-B-VOP tests, so this is well weird :confused:

With regard to MSN Messenger... Sorry I don't use it.


Cheers

Doom9
21st April 2005, 16:50
And frankly, I don't know anything about mencoder MP4Box kicks ass btw And of course, not to forget: VirtualDub. I'd kill myself if I had to use anything else for encoding.First of all MP4Box works with raw MPEG-4 video stream.. in fact it contains ugly code to get rid of some of the AVI deficiencies..

At one hand you go on an AVI bashing spree, then you use the container and the so detestful VfW interface for encoding? You realize that this this is highly contradictory, even worse it completely ruins your credibility. So, if you rather kill yourself than use anything than AVI/VfW, I expect you to put a stop to the MP4 madness right now. The tools to do it without AVI/VfW are readily available.

bond
21st April 2005, 20:01
guys, cool down, from my point of view there is absolutely nothing wrong with either xvid nor mp4box, lets not get mad on a non issue :D


n-vops are frames that tell the decoder to display the frame before again
they are perfectly compliant to the mpeg-4 standard, so no need to "find a way to disable them"

-> xvid will only place real n-vops in the stream when NOT using b-frames (xvid places dummy n-vops in the stream when using packed bitstream, but thats a totally different story)!!!

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

Originally posted by Elias
I've noticed that MP4Box removes NVOPs, and as a result of it, the final *.mp4 file gets a weird frame rate, like say 24.96 instead of 25.00 and that's the main reason why I want to turn NVOP offthe next step for saving bitrate would be to remove the n-vops and instead create a variable framerate stream, and thats what mp4box does by default (therefore the framerate you get is not wierd at all, as you now have a vfr stream)

imagine the following stream where frame 2 and 3 are the same (and 1fps):
I P P - the stream is 3 seconds long (as one frame is displayed for 1sec)
a smart encoder, like xvid, recognizes that frame 2 and 3 are the same and therefore to save bitrate writes frame 3 as n-vop (which tells the decoder to display the frame 2 two times)
I P N - the stream is again 3 seconds long, with 1 fps
an even smarter encoder (using a smarter container than avi, eg mp4 or mkv) can save even more bitrate by not writing the n-vop, but instead write a variable framerate stream and tell the decoder to display frame 2 twice as long, so you only have
I P - the stream is of course still 3 seconds long (frame 2 displayed 2 seconds), but the average framerate is now 1.5fps (3/2)

if you want to leave the n-vops in when importing to .mp4 with mp4box use the -nodrop option

Is it good for hardware support? its not good, nor bad for hardware. n-vops are 100% spec compliant


i hope this clears things up

stephanV
21st April 2005, 20:52
Originally posted by bond
-> 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
I sincerly hope that this isnt true... :scared:

bond
21st April 2005, 20:56
Originally posted by stephanV
I sincerly hope that this isnt true... :scared: why? i think thats pretty smart of xvid :)
and as i also said, when enabling b-frames, xvid will not write real n-vops

i think you can see the framedropratio as some sort of threshold, which sets the limit when two frames are the same/a n-vop should be written

stephanV
21st April 2005, 22:29
Originally posted by bond
why? i think thats pretty smart of xvid :)
Because 0 = 0, if i want no n-vops i want no n-vops, even when they are 100% equal (in which case a p-frame should be pretty efficient too).

The idea of a codec dropping frames just scares me somehow... :scared:

bond
21st April 2005, 22:58
the name "frame drop ratio" is confusing imho

a 0 doesnt mean that 0 frames will get dropped. after all the setting defines a ratio and not a number of frames,
apart from that i dont think it can be said that frames get dropped, cause the frames are still there in the output (same framenumber as in the input etc...)

for me thats perfectly fine, you want see any difference during playback

stephanV
22nd April 2005, 09:17
Originally posted by bond
the name "frame drop ratio" is confusing imho

a 0 doesnt mean that 0 frames will get dropped. after all the setting defines a ratio and not a number of frames,[/b]
Still a ratio of 0 to something still should mean 0 frames should be dropped. Of course its probably not a ratio (that would be really bad) but a treshhold and in that case it would make some sort of sense that 100% identical would be dropped (it depends if you see a treshhold as < or =<), but i still rather see it didnt, unless the first frame is encoded perfectly (which it probably never is).

apart from that i dont think it can be said that frames get dropped, cause the frames are still there in the output (same framenumber as in the input etc...)
Frames do get dropped, because frames in the original source get skipped by the encoder and get replaced by a n-vop.

Maybe i should just try and see if it inserts any n-vops on identical frames though...

stephanV
22nd April 2005, 09:55
Originally posted by stephanV
Maybe i should just try and see if it inserts any n-vops on identical frames though...

In a row of 100 identical frames the first 8 frames are encoded as I and P, the other 92 are n-vops. So it does at least seem the codec corrects for encoding errors... oh well, could be worse...

Doom9
22nd April 2005, 10:20
since "true" NVOPs don't break anything.. all you possibly needed to be worried about is the dummy NVOPs you get from using packed bitstream. Turn that off and compatiblity is a no brainer, no?

It might be interesting to find out about the size difference between a stream with true NVOPs in MP4 and one where the NVOPs have been removed. And for that matter why those frames no longer exist in the AVC standard (afaik).

SeeMoreDigital
22nd April 2005, 10:52
Maybe a slight change to XviD's GUI would not do any harm either: -

http://img259.echo.cx/img259/9661/xvidguinvop5dv.png

This way, users would know that the implementation is supposed to be off ;)


Cheers

stephanV
22nd April 2005, 10:54
Originally posted by Doom9
since "true" NVOPs don't break anything.. all you possibly needed to be worried about is the dummy NVOPs you get from using packed bitstream. Turn that off and compatibility is a no brainer, no?
Trust me, the last few things i care about is stuff like "compatibility" and "interoperability". If a video plays it plays, I'm not gonna bother with being fully MPEG4 compliant or silly things like that. I just don't like the idea of the codec dropping frames when i dont want it to.

To give you an indication how useless this is:

Say you encode a video (25 fps) at an average rate 37500 bytes/s (= 300 kbps and obviously a rather low number), if I'm right n-vops take up 6 bytes a piece and my last encoded p-frame in my test was 60 bytes.

Now you could say: this is great, a 100-(6/60)*100% = 90% gain! Right? Wrong... at least thats a matter of interpretation.

Another way of representing the gain would be saying the savings are (60-6)*25 = 1350 bytes/s, which calculated on the average bit rate would be a saving of 3.6%. Now if you consider that it in this case it took 8 frames to come to an n-vop, and that I hope a video (even a cartoon/anime/whatever) does not have a lot of parts longer than 0.32 seconds with absolutely (!) no movement, the true gain becomes rather small (I think saving on overhead with some creative AVI muxing is a lot more useful).

[edit]Why do i care actually... im always using b-frames anyway... :rolleyes:

Shinigami-Sama
22nd April 2005, 20:10
Originally posted by stephanV
[edit]Why do i care actually... im always using b-frames anyway... :rolleyes: [/B]
cause error reports are the only way to get a "Real" person to share information other than read hte faqs which are horribly outadated?
or becuase you ogt mad at something you didn't want to happen?

either way I'm happy I learnt what n-frames are :D

Elias
30th May 2005, 21:08
Why are NVOPs created with high resolution files only? And especially, if the movie has a long length. That's the basic conclusion I can come up with after like, 50 encodes or something like that.

Gawwad
2nd March 2006, 17:48
hello guyz :)
i am a staxrip user
http://forum.doom9.org/showthread.php?p=792694#post792694

i just noticed that staxrip always produces nvop xvid videos (according to gspot)
with my Philips DVP5100 stand alone divx player, i get a poor frame rate playback when i play such videos
so how can i disable this nvop from the xvid settings?!
note: i am using the lastest xvid version (i think)

thanx in advance
:thanks:

Elias
2nd March 2006, 17:51
This is what I suspected, and wanted to just turn it off. I don't need NVops to improve the quality in my encodes, I just raise the bitrate.

bond
2nd March 2006, 17:51
are you sure thats caused by the n-vops? i somehow doubt it

try disabling packed bitstream