[MEncoder-users] Frame Rate and file Size

bruno agostini cartusien at yahoo.fr
Sat Feb 26 11:04:44 CET 2005


I understand your point and it makes sense. However in my case 2 pass
encoding doesn't change much the final result. Futhermore vbirate=83
with 5 fps produces a really awful quality, blocks and artefacts
everywhere. I really need vbitrate=500.

But what I do not understand is why the codec is not able to achieve a
higher compression rate for 5 fps. Indeed, since there is the same
number of frame and same bitrate, changing the frame rate from 30 to 5
fps simply means that a given frame will be displayed 6 times longer.
But I mean, it is the same information, so okay the movie lasts longer,
but it is exactly the same information displayed, so the codec should be
able to produce the same file size, shouldn't it? Moreover if I produce
a -ovc raw movie, the file size does not depend on the fps anymore...

Bruno Agostini


On Fri, 2005-02-25 at 18:01 -0800, Corey Hickey wrote:
> bruno agostini wrote:
> > I have a strange problem I quite don't understand here. I want to make a
> > divx with 2000 jpg. So I use the following command:
> > 
> > mencoder  mf://*.jpg -mf w=512:h=256:fps=30:type=jpg -ofps 30 -nosound
> > -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=500 -o movie.avi
> > 
> > Then I get a 5 MB movie of 67 sec and I am happy with that. But I also
> > want to make a version at 5 fps (it is a scientific movie so that I want
> > to have a slow version to see details without having to settle the speed
> > on the player everytime). So I use:
> > 
> > mencoder  mf://*.jpg -mf w=512:h=256:fps=5:type=jpg -ofps 5 -nosound
> > -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=500 -o movie.avi
> > 
> > I have the same number of frame (2000), the same effective bitrate (I
> > checked), only the fps (i.e. the movie is now 400 sec) has changed, but
> > I get a 25 MB movie! But there is the same amount of information to
> > encode in the second case isn't it? So why should the file size be
> > different?
> >  
> > thanks for your help!
> > 
> 
> I haven't personally tested this but I'm pretty sure I know the answer
> to your question.
> 
> Vbitrate is the number of kilobits per second of video. By reducing the
> framerate to 1/6 for your second video, you increase the length 6 times.
> Lavc is giving 500 kilobits to each second, and since the second video
> is 6 times longer it get 6 times as much data as the first.
> 
> 
> Actually, you may notice that your second video (25 MB) is only 5 times
> as big as the first (5MB). There's two probable reasons for this:
> 
> 1. You're only using one pass, so the actual bitrate used is a
> best-effort approximation of the bitrate you requested.
> 
> 2. Since there are fewer frames per second in your second video, the
> number of kilobits per frame is much higher.
> first video:  500 kilobits / 30 frames =  16.7 kilobits per frame
> second video: 500 kilobits /  6 frames = 100.0 kilobits per frame
> That's a lot more data per frame. If lavc simply doesn't need that much
> data, it won't use it.
> 
> 
> If you want your second video to be smaller, reduce vbitrate.
> 500 / 6 = 83, so try using vbitrate=83. Also, you'll probably get more
> accurate results using two-pass encoding.
> 
> -Corey
> 
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mencoder-users





More information about the MEncoder-users mailing list