snow_xmas
17th September 2011, 15:45
B-frame will cause encoder delay, which occur much more under VFW-mode, that output-file losing frame. But XviD encoder never losing frame even though B-frame has been enabled.
As we have all known, P(frame) after B is encoded earlier than B which is root reason of losing frame. I am told that less than 2 B-frames would not cause delay, as it in XviD. However, it will still lose frame. What is the difference between B-frame in x264 and it in XviD
B-frame is very useful for quality in low-bitrate. But how can avoid delay caused by B-Frame?
LoRd_MuldeR
17th September 2011, 16:53
B-frame will cause encoder delay, which occur much more under VFW-mode, that output-file losing frame. But XviD encoder never losing frame even though B-frame has been enabled.
A proper API will allow the encoder to buffer as much frames as it needs to look ahead and still not loose or delay any frames.
This means that the encoder can read n input frames from the source before the first encoded frame is return back to the main application. At the end of the encode, the encoders internal buffer is flushed.
VfW does NOT work this way. It uses a strict "one frame in, one frame out" scheme, which obviously doesn't work will with the idea of B-Frames (at least without additional hacks+workarounds).
As we have all known, P(frame) after B is encoded earlier than B which is root reason of losing frame. I am told that less than 2 B-frames would not cause delay, as it in XviD. However, it will still lose frame. What is the difference between B-frame in x264 and it in XviD
Some VfW-based MPEG-4 encoders have implemented the "packet bitstream" hack in order to circumvent VfW's problem with B-Frames. It's optional in Xvid, as far as I know.
B-frame is very useful for quality in low-bitrate. But how can avoid delay caused by B-Frame?
Don't use an antiquated API, such as VfW, that was never designed with B-Frames in mind, to encode video with B-Frames ;)
(BTW: The x264 VfW encoder implements a special "VirtualDub Hack" which improves the handling of B-Frames, but works with VirtualDub only - not with all VfW applications)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.