[MPlayer-users] B frames vs filesize question

Steven M. Schultz sms at 2BSD.COM
Sat May 25 20:11:01 CEST 2002


Hi -

	I'm seeing something strange that has me puzzled.

	On other occasions I have added the 'vmax_b_frames=2' to the commands
	and the resulting file was quite a bit smaller than without B frames.

	Tonight the output file is the same size with or without the
	vmax_b_frames=2 option.   Would this indicate that somehow B frames
	are not being generated?

	With a 16 minute movie (~29000 frames) this script:
--------------
#!/bin/sh

rm -f frameno.avi lavc_stats.txt title1.avi

mencoder -v -dvd 2 -aid 128 -vop scale=320:240 -sws 2 \
	-oac mp3lame -lameopts vbr=3:br=128:q=4 \
	-ovc frameno -o frameno.avi

mencoder -v -dvd 2 -aid 128 -vop scale=320:240 -sws 2 \
	-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=500:vhq:keyint=150:vpass=1 \
	-oac copy -lameopts vbr=3:br=128:q=4 -o title1.avi

mencoder -v -dvd 2 -aid 128 -vop scale=320:240 -sws 2 \
	-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=500:vhq::keyint=150:vpass=2 \
	-oac copy -lameopts vbr=3:br=128:q=4 -o title1.avi
----------------

	produces an avi file:

-rw-r--r--  1 sms  staff  74696180 May 24 00:42 title1.avi

	But the script:
---------------
#!/bin/sh

rm -f frameno.avi lavc_stats.txt title1.avi

mencoder -v -dvd 2 -aid 128 -vop scale=320:240 -sws 2 \
	-oac mp3lame -lameopts vbr=3:br=128:q=4 \
	-ovc frameno -o frameno.avi

mencoder -v -dvd 2 -aid 128 -vop scale=320:240 -sws 2 \
	-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=500:vhq:vmax_b_frames=2:keyint=150:vpass=1 \
	-oac copy -lameopts vbr=3:br=128:q=4 -o title1.avi

mencoder -v -dvd 2 -aid 128 -vop scale=320:240 -sws 2 \
	-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=500:vhq:vmax_b_frames=2:keyint=150:vpass=2 \
	-oac copy -lameopts vbr=3:br=128:q=4 -o title1.avi
--------------

	produces a file:

-rw-r--r--  1 sms  staff  74646636 May 23 23:52 title1.avi

	Only about 50000 bytes difference between the two file sizes - that
	seems quite small.

	Should there be a larger difference in file sizes?  Using B frames
	has made a larger difference in the past so I'm wondering if they've
	been (accidentally) disabled.

	Cheers,
	Steven Schultz
	sms at 2bsd.com




More information about the MPlayer-users mailing list