[MEncoder-users] How important are B-frames?

Sylvester sylvester821994 at gmail.com
Thu May 10 13:20:11 CEST 2012


> On Fri, 2012-05-04 at 17:39 -0600, James Hastings-Trew wrote:
> > B-frames allow for a greater amount of compression because they
> > represent a diff from both following frames and previous frames, in both
> > temporal directions. Therefore they are not essential, and basically for
> > years I used mencoder to create mp4 files with zero b-frames with no ill
> > visual effect. Just slightly larger files.
>
> Scott W. Larson wrote:
> When I encode AVC at highest quality, a majority of the frames in the
> video are encoded in B-frames. On average a B-frame takes only one
> fourth the space of a P-frame. This results in a substantial decrease in
> file size and no decrease in quality.
>
> I do not own any devices which can't decode AVC video with B-frames.

I did a test on a high quality short video and came up with this.
Both MEncoder and FFmpeg had exactly the same settings apart from the
B-frames.

MEncoder bframes=3

Video stream:  796.681 kbit/s  (99585 B/s)  size: 5278009 bytes
53.000 secs  1325 frames
x264 [info]: frame I:6     Avg QP:30.99  size: 22885
x264 [info]: frame P:662   Avg QP:34.59  size:  5731
x264 [info]: frame B:657   Avg QP:38.04  size:  2050
x264 [info]: consecutive B-frames:  0.8% 99.2%  0.0%  0.0%

MEncoder bframes=0

Video stream:  798.490 kbit/s  (99811 B/s)  size: 5289993 bytes
53.000 secs  1325 frames
x264 [info]: frame I:6     Avg QP:32.02  size: 20573
x264 [info]: frame P:1319  Avg QP:35.74  size:  3917

FFmpeg bframes=3

Stream #0.0: Video: libx264, yuv420p, 768x576 [PAR 1:1 DAR 4:3],
q=10-51, pass 2, 800 kb/s, 25 tbn, 25 tbc
frame I:6     Avg QP:30.03  size: 26455
[libx264 @ 01caa2b0] frame P:354   Avg QP:33.43  size:  8050
[libx264 @ 01caa2b0] frame B:965   Avg QP:37.09  size:  2361
[libx264 @ 01caa2b0] consecutive B-frames:  1.1%  0.9% 13.8% 84.2%

The MEncoder video with 0 B-frames was only slightly larger by an
insignificant amount.  The FFmpeg was slightly larger than both of
them by an insignificant amount.  The video had lots of movement and
some still scenes.  After viewing them a number of times, I could not
tell the difference.  All were very good quality while playing via
MPlayer.  As said before, MEncoder with bframes=3 played not so well in
others.


More information about the MEncoder-users mailing list