Curious results on the I-Frame testing.
Here's an interesting link regarding I P & B frames if yer' interested. It sound like higher motion sources would benefit from B frames, more than simply using I frames alone.
http://www.disctronics.co.uk/technology/video/video_mpeg.htm
I had no idea you could get such a high compression ratio using only I frames.
I never play with the GOP structure. Some swear by it, claiming to produce miraculous results. I stick with the standard. I only download VCD, and never used it myself, while SVCD, and DVD formats look just fine to my eyes. Besides that, who knows what standalone I'll have in two years? You could always experiment with some of the KVCD (KCVD?) templates. A quick search of the forum should net you a link. He's constantly advertising them.
+ Reply to Thread
Results 121 to 150 of 157
-
Impossible to see the future is. The Dark Side clouds everything...
-
B frames allow the most compression since it allows macroblocks to be re-used from almost anywhere in the current GOP. B frmaes also are the most processing and memory dependant since you must decode every other frame it pulls from before you can decode the frame.
P frames can only use macroblocks from before it in the current GOP
I frames allow no external macroblocks, in essence they are not much better than JPEG compression.
So a mixed GOP generally gives the best combination of size, decoding CPU use and compression. KVCD has an unruley B frame only GOP with a length of 48. You can see why that might improve compression getting those pesky I and P frames out of the way it places an undue burden on the decompression engine of most DVD players. When you have bendwidth to spare it can be a great idea to shorten your GOP to get a less compressed result, but a more "accurate" since encoding erors can build up in a GOP.
Quality and size also depend alot on the encoder too. TMPGenc seems to do a much better job at B frames than the other encodres. CCE's overall result is outstanding despite being locked into a max B frame length of 2 and a max GOP of ~21 ( only 15 in the GUI ). -
Snow, any idea how many B frames can safely be added to a group, without exceeding most players capabilities to render due to increase in overhead?
Impossible to see the future is. The Dark Side clouds everything... -
Originally Posted by snowmoon
I1 B1 B2 P1 B3 B4, I2 B5 B6 P2 B7 B8, . . .
B1 = I1, B2
B2 = B1, P1
B3 = P1, B4
B4 = B3, I2
This illustrates an "open" structure in which B4 is allowed to use a frame in the next GOP as a prediction reference. Had this been a "closed" GOP, B4 would act like a virtual P.
Originally Posted by DJRrumpy
From the decoder's point of view, I-frames are the only "real" frames it has to deal with; Ps and Bs are more like blueprints that tell the decoder how to shift blocks of memory around in order to construct a new picture out of an old one. If the GOP length is limited it's to make sure fresh I-frames come along regularly enough to prevent decoding errors from propagating indefinitely rather than for reasons of speed or memory. -
Originally Posted by DJRumpy
-kwagKVCD.Net - Advanced Video Conversion
http://www.kvcd.net -
@ kwag: I don't think that was what DJRumpy was asking.
@ ACE:
Really it's the encoder that bears the cost, as it needs to hold everything between each pair of I-frames in order to construct the Ps and Bs necessary to complete each GOP.
Regards.Michael Tam
w: Morsels of Evidence -
Originally Posted by vitualis
An MPEG decoder only needs to store two pictures at any one time: the most recently decoded I-frame and the P or B frame that modifies it. According to ISO/IEC 13818-2, 2 MB of memory is enough to decode MPEG-2 MP@ML (720x480, 4:2:0) as well as provide VBV buffer space, a bitmap overlay plane (subtitles), display output buffering, and the rest[1].
This may overload the buffer of some players if you have many more B frames or much longer GOPs than what the player expects.
-------------
[1] Wai-Man Lam and Ligang Lu, "Memory reduction for HDTV decoders," IBM Journal of Research and Development, July 1999. -
But can't B frames also come out of order? So the decoder may still have to decode more than just 3 frames since it really has to decode the stream until it finds the next frame to display.
2mb is a pittance of memory since each frame of 720x480@4:2:0 contains 675k of display data so 2mb would hold 3 frames of output and that does not even cound for overhead. This is fine for standard streams, but for non-standard it's pushing it would you not agree?
That was my understanding. I shoudl re-read those papges again. -
Originally Posted by snowmoon
All decodes are made to the display buffer so the encoder never has to deal with more than one uncompressed frame at a time. If you wanted to exhaust the decoder's memory with a perverse GOP you'd have to figure out how to queue up more than 200 pending Bs, which is probably impossible. -
Oh my gawd, is this ever a long thread. There are both good and bad points to CBR/VBR. I personnaly like multipass VBR better, but there are many factors that come in play anyways, and many arguments. It takes time, but do your own tests on some shorter scenes with different settings and see for yourself what you like... Or read lenghty threads with people fighting :P (They want to help, and that is nice, still) Anyways, good luck
-
Originally Posted by vitualis
Maybe that's more clear.
Regards,
-kwagKVCD.Net - Advanced Video Conversion
http://www.kvcd.net -
It's amazing how many different discussions have gone on under this thread....
Kwag, I was referring to the total number.
Ace: Does this mean a decoder acts much like a film projector, projecting (encoding/decoding) the current frame at hand (plus or minus the frames adjacent to the current frame of course).
If you step through the GOP, the key frame is decoded, and the next frame is a B frame, the decoder holds both the key frame, the current frame (B Frame), and the next frame in memory only? I always assumed it worked between keyframes, holding the entire GOP until the next keyframe was accessed.Impossible to see the future is. The Dark Side clouds everything... -
Does this mean a decoder acts much like a film projector, projecting (encoding/decoding) the current frame at hand (plus or minus the frames adjacent to the current frame of course)
I always assumed it worked between keyframes, holding the entire GOP until the next keyframe was accessed.
I P B B --> I P B B
1 4 2 3 --> 1 2 3 4
but the decoding would still be frame-centric and sequential as opposed to the entire subgroup at a time.
A B-frame can have at most two dependencies, one past and one future, referring only to intra-coded blocks in the next or previous frame and never to other (nested) past or future references. At the instant a B requires a past reference that frame will already be sitting in the display buffer, and a forward reference would be fetched from the next (compressed) frame and decoded in-place as if it were a part of the current frame. When the next frame becomes the current frame only its forward references need resolved from the next compressed frame, and so forth. The decoder thus maintains an orderly, linear decode sequence without regard to GOP structure (in fact, GOPs are purely optional in MPEG-2). -
Just to add a little humar into the thread. . . he, he...
I am not afraid to admit that I don't understand a guDAMN thing about those
Ps and Bs and Is and GOPs you'al R talking about! ...wish I did, but for
the moment, it escapes me.
But, if ONLY, I knew/understood what you'all R talking about, I'd would love
to creat some kind of MPEG-2 encoder, if only to so for example, CVD or something
in that nature. Nothing full-fledge, just something you can drag your AVI's
into, and click a few settings.
I've ben looking for support in the Delphi programing language, but haven't
found anything yetcourse, I would make it FREEWARE!!
Anyways, just wanted to vent out (humarously) my great sence of imagination,
he, he...
I got GOPS, you got GOPS. . .
-vhelp -
Back to the original discussion. Here is something to ponder:
If CBR was Really Better than VBR, Why Are ALL Commercial DVD's Encoded as VBR? Surely not to save space.
All My own dvd's are VBR with a Min 0, Max 9800mbs and the average always tends to hover in the 1.5-2mbs range.
Whats it all boil down too? CBR is a waste. Why anyone would use CBR is beyond me. even CCE's one pass VBR produces more efficiant results. :P -
I believe that the original question was on whether VBR could be better than CBR if the max. bitrate of VBR was the same as CBR...
I think that it has been argued fairly convincingly, yes, though the improvements are probably minor, if not irrelevant in this specific scenario.
Regards.Michael Tam
w: Morsels of Evidence -
The original question was whether VBR was better than CBR at SVCD bitrates. In my opinion* the answer is no.
MPEG at low bitrates is prone to several different kinds of artifacts. The most common of these, in order of annoyance, are mosquitos (little dots that appear within an 8-pixel radius of sharp, contrasty edges), aliasing (a jagged appearance along the edge of diagonal lines), contouring (random off-color squares in areas of regular tone) and the dreaded macroblock (clipping distortion that occurs whenever the peak bitrate exceeds the maximum bitrate).
All of these artifacts are related to the degree of intra-block compression required to achieve the target bitrate. DCT is lossless by itself, so the intra-blocks are scaled according to a quantization matrix designed to discard information at frequencies our eyes aren't likely to notice. But the tighter the compression, the more dramatic the scaling, the less accurately the block will be reconstructed by inverse DCT until it reaches the point of no return (i.e. the entire intra-block is set to the average value of its pixels).
The only way to prevent these artifacts is to have a maximum bitrate above the transparency bitrate for the frame format you're coding for. MPEG-2 is transparent at CCIR-601 frame sizes above 10 Mbps, so we can estimate the critical bitrate for other frame sizes proportionally:
Code:Generic MPEG-2, independent of authoring scheme (bitrates equivalent for PAL/50 and NTSC/60) ------------------------------------------------- Nominal Yield (mins) Frame NTSC Transparency ------------ Format Resolution Bitrate (1) DVD-R CD-R --------- ---------- ------------ ----- ----- 1/4-D1 352 x 240 2.4 Mbps 320 49 1/2-D1 352 x 480 4.9 Mbps 160 24 2/3-D1 480 x 480 6.7 Mbps 118 18 SQUARE D1 640 x 480 8.9 Mbps 88 13 D1 704 x 480 9.8 Mbps 80 12 CCIR-601 720 x 480 10.0 Mbps 78 12 ---------- (1) Video stream only, not inclusive of audio
The bitrate for SVCD is so constrained that all VBR can buy you is more recording time at approximately the same quality. If 2.5 Mbps isn't enough to reproduce the picture without artifacting, it's not going to look any better at a lower average bitrate. It might even look slightly worse considering all the scenes will be scaled to fit the bitrate rather than only those that actually need it.
By the same token, CBR above the transparency bitrate is a waste of space. Beyond a certain point the program isn't going to look any better, it's just going to occupy more storage -- which defeats the purpose of compressing it in the first place.
If the program is short enough to fit on a CDR at the SVCD maximum bitrate, the only way you're going to improve upon that is to increase the bitrate or reduce the data rate. Nothing else is going to squeeze enough bits out of the picture to make an appreciable difference.
* Just my $0.02, offered for what it's worth. -
Originally Posted by vitualis
Originally Posted by A.C.E. -
The original question was:
If my VBR encoding has a maximum bitrate setting of 2520, and my CBR setting is also 2520, I can't see how VBR can be better, since with CBR you're giving it the maximum bitrate all the time.
@ regain: I have always stated throughout this entire thread that the difference in quality in the above scenario will be minor, probably completely unnoticeable. I have also always stated throughout this entire thread that if you are in the situation of doing the above, to simply encode in CBR.
However, with all other things being equal, a multipass VBR encoding of the same max. and average bitrate (essentially, multipass CBR) WILL theoretically yield better quality.
It has been explained at least half a dozen times in this thread why this is so by a number of different people. I suggest you read the IBM paper that was linked to previously for more details on how it is definitely so in the particular scenario of fades.
@ all: please read the ENTIRE thread!
Regards.Michael Tam
w: Morsels of Evidence -
If I want to convert a DIVX to mpeg2 svcd file, and the movie is a non-action film(people mostly standing around talking) What type of settings should I use? If VBR 2 pass...what type of min,avg,max settings should I use? Is highest quality motion search precision overkill, or will normal suffice? Is motion estimate search(fast) the same as low quality(fast)?
If I setup TMGENc to CBR ,highest quality motion search precision, a 582MB Divx file would take 32 hours to decode!!!!! IF motion search precision( I will call this MSP from now on) is set to motion estimate search(fast) the conversion would take 7 hours. -
@ Mocha: your question doesn't really have anything to do with the discussion of the thread. Try starting a new thread.
Regards.Michael Tam
w: Morsels of Evidence -
My vote is for CBR under the conditions of this thread
Quote the first post
If my VBR encoding has a maximum bitrate setting of 2520, and my CBR setting is also 2520, I can't see how VBR can be better, since with CBR you're giving it the maximum bitrate all the time.
+my 2 cents -
How about actually reading the entire thread?
Before the discussion in this thread and the linking to a number of relevant articles (e.g., the IBM paper), I would have agreed with you. But it seems obvious once you think about it harder and actually read the literature, the in the specific situation above, VBR could theoretically do better.
Two short summaries of my points:
http://www.vcdhelp.com/forum/viewtopic.php?p=346959#346959
http://www.vcdhelp.com/forum/viewtopic.php?p=347124#347124
The actual IBM article was linked curtesy of DJRumpy I believe.
Regards.Michael Tam
w: Morsels of Evidence -
read the thread.
read the IBM Article.
plus.
quoting directly from the link
The general conclusion is that the second-pass VBR sequences visually appear to have a higher overall quality than the ones coded with CBR. For VBR to visually outperform CBR, a mix of "easy" scenes and "difficult" scenes is always required. If all scenes were the same (easy or difficult), the VBR results would be equal to those for CBR. The principle of VBR relies on taking bits from easy scenes and spending them on the difficult ones instead. In visual evaluations by different viewers, it was found that the visual quality of an entire video sequence is judged by the minimum quality across the whole sequence. This minimum quality is usually found in the easiest scenes, as coding artifacts are the most noticeable there. A good VBR performance is thus founded on removing bits safely from the easier scenes (i.e., without noticeably distorting their quality). These bits are then redistributed over the more difficult scenes, such that the entire video is perceived to have a constant quality.
and remembering that in this case
If my VBR encoding has a maximum bitrate setting of 2520, and my CBR setting is also 2520, I can't see how VBR can be better, since with CBR you're giving it the maximum bitrate all the time.
Assuming we are encoding SVCD 480x576 PAL
480x576x25 =6912000 Pixels a second
as a comparsion DVD-
720x576x25 =10368000 Pixels a second.
say the DVD was averaging 6mbit/s
6912000/10368000 x100= 66% so we need 66% of the bitrate of the DVD to achive the same bitrate per pixel !
66% of 6Mbit/s =3.96Mbit/sec this nowhere near 2520!
even if the DVD average was 5mbit this would be around 3.3Mbit!
Taking infos directly from the IBM link
A good VBR performance is thus founded on removing bits safely from the easier scenes (i.e., without noticeably distorting their quality). -
Your forgetting the original question. MIN/AVG/MAX is all 2520, so no frames would be shorted for bits. This is where the motion detection comes into play. Multipass VBR offers better motion detection than CBR. All things being equal (Bitrate in this case), VBR would produce better quality.
Impossible to see the future is. The Dark Side clouds everything... -
Originally Posted by Oracle
All things being equal, if you have a bandwidth of 2.5 Mbps available to you, there's no reason you can't code 3-pass VBR at 2500/2500/2500 and get the prediction performace of multi-pass encoding along with the more gentle compression ratio of CBR. In fact, it would probably be very difficult to tell the difference between the two because the only bits the encoder could discard would be the ones related to complex motion (such as the oft-repeated fade) that don't amount to very much by themselves.
Originally Posted by oracle
But if the transparency bitrate for some sequence is 3.35 Mbps and the encoder can't exceed 2.5 Mbps, once it reaches that bitrate it has to throw the rest of what it takes from the simple scenes away -- no matter how badly the difficult scenes need them -- because if it didn't, it would exceed the maximum bitrate by a wide margin.
In visual evaluations by different viewers, it was found that the visual quality of an entire video sequence is judged by the minimum quality across the whole sequence. -
The bottom line is that VBR or CBR, single-pass or multi-pass, if the maximum bitrate is 2.5 Mbps and a particular scene requires 3.5 Mbps to reproduce, you're going to get some nasty macroblocks even if those fades lookImpossible to see the future is. The Dark Side clouds everything...
-
DJRumpy: Riiight. That's the inevitable, inescapable, irrefutable point.
In order for VBR to kick CBR's ass you need a maximum bitrate above the transparency bitrate for the frame format you're coding to: If 1/2-D1 is transparent at 5 Mbps, a VBR recording at 1250/2500/5000 will look far superior to a CBR at 2500 even though they have the same average bitrate. But if the maximum bitrate is 2500, VBR at 2500/2500/2500 will look no better that CBR at 2500, and VBR at 625/1250/2500 will look substantially worse.
The SVCD bitrate is so limited that you just can't do better than CBR in any visually perceptible way. VBR will make the low-motion scenes look as good as they can get, but the high-motion scenes will still suffer artifacting proportional to the deficit in bitrate. And if "the visual quality of an entire video sequence is judged by the minimum quality across the whole sequence," once that picture starts to show contours or macroblocks the VBR vs. CBR debate is over. Both lose.
And if the discussion then becomes about how VBR loses only slighty less than CBR because, macroblocks aside, the scene transitions theoretically look better... I'll leave that discussion alone. -
I vote we shoot this thread in the head, and put it out of our misery...
:PImpossible to see the future is. The Dark Side clouds everything... -
Originally Posted by A.C.E.
Good discussion though, I'm even learning new things.
Similar Threads
-
cbr to vbr
By dynamix1 in forum AudioReplies: 1Last Post: 17th Mar 2009, 14:12 -
CBR vs VBR
By prl in forum Newbie / General discussionsReplies: 5Last Post: 11th Jan 2009, 18:48 -
question about vbr v/s cbr and 2 pass vbr
By perfection in forum Newbie / General discussionsReplies: 4Last Post: 14th Dec 2008, 03:55 -
VBR or CBR?
By dizzie in forum ffmpegX general discussionReplies: 1Last Post: 29th Jun 2007, 14:28 -
CBR VBR Discussion
By josel in forum Newbie / General discussionsReplies: 11Last Post: 19th May 2007, 19:51