View Full Version : What's going on? (Filesize and Bi-drectional encoding)
paxos
7th March 2002, 01:03
I encoded a movie yesterday with bitrate 1014 (2-pass)using VirtualDub without using any of the Pro settings. The result was pretty good, with the resultant filesize 670MB. So, I thought I would have a go at trying to add bi-directional encoding. A few sample encodes suggested upping the bitrate to 1330. This resulted in a filesize of 570MB, which was a lot lower than the 700 MB I was aiming for. I tried a third time, this time making sure I deleted the log file and mv file, in case these were causing problems. The third time I tried a bitrate of 1600. This resulted in a filesize of 560MB!!! What on earth is happening? All settings remain the same apart from the bitrate, except I have added bi-directional encoding for the last 2 encodes. This is driving me crazy.
MaTTeR
7th March 2002, 01:35
Stated many times and in many threads in this forum...the added features will definitely affect your final file size.
nice afex twin logo MaTTeR!!!!
anyways, to the original poster, read my post about GOPs, should be a few posts down...
B frames will give you much better file sizes at higher bitrates...
paxos
7th March 2002, 01:54
I appreciate that using bi-directional will give a smaller filesize, which is why I upped the bitrate from 1014 to 1330 - but look at the figures I gave. I don't think you've taken them in. I upped the bitrate to compensate for that and it gave a way too small filesize. I upped it again, and it was smaller still. This is not to be expected. Otherwise I should eventually be able to encode the movie at maximum bitrate and end up with a perfect 10MB encode. I don't think so!
So please, no more glib answers. It should not be that as I increase the bitrate the filesize should get smaller.
actually, with variable bit rate, and b frames, you can get weird results. there are so many factors involved, and you seem to be looking at it in a single pass point of view. If you were doing single passes, than yeah, it would be weird...
but since you are doing VBR, things are different. And remeber, you are selecting an *average* bitrate. so yeah, you might have frames that are 1600, but it (the encoder) might be taking that bandwidth from a different frame....
but try it again, and you'll a limit where the file size will increase...
but I will say, that I have come across films where I took it all the way up to 6000 (divx 3.11), and the file size was the same as 2100. Saving private ryan actually was the film...
the extra bit rate yeilded no extra size.....
kythorn
7th March 2002, 04:51
Internally, DivX doesn't deal straight with bitrates at all. As I understand it, a given frame can be encoded at a given (integer, between 2 and 31) quantizer level. The codec doesn't really have any idea how big the frame will be after compression until it does it. Hence the benefit of 2 pass mode. I've seen a *lot* of posts lately about how badly DivX5 undersizes things and it's "shitty" prediction.
I've experienced this as well, but drawn completely different conclusions. After getting frustrated, I encoded the same movie in 1 pass, quality level = 100 (quantizer 2) mode. The final result was within 5k of what I was getting in 2 pass mode.
The moral of the story: *Especially* if you're using b-frames, do some research before you start griping that "DivX5 isn't using enough bits". It can't arbitrarily start adding bits to your frames to increase the end file size to the point you feel all nice and warm inside, nor should it.
If you *really* want to use more space, increase the resolution a notch, or use a better quality audio, or... I don't know, think of something. Be happy that you now have some extra room to play with instead of getting angry that it's not exactly within 50k of the size you specified. And yes, contrary to popular opinion, the same thing can happen in nandub if you specify an obscenely high bitrate, try 3-4000 sometime.
A bigger file is useless unless it's better quality in some way, wanting it bigger just to fill up a CD is simply asinine.
If anyone out there has any pull with DARC, there's a feature I'd really like to see added to this though. Provide a checkbox somewhere that will let you choose not to discard the first pass video stream. If the first pass is equal to or less than my desired size, there's no reason to go through with the second encode, even if it is 25% faster with stored motion vectors. Xvid has this and I really like it.
Note: This post is not intended to be disparaging to the people in this thread. The discussion is valid, but I figured here was as good a place as any to throw my two cents in.
Additional Note: For the truly pedantic, I do realize you can encode at a quantizer level of 1, but as was pointed out to me, there's really no valid reason to be doing this.
you seem to have a hang on Q levels, could you explain them more?
I am a little stumped on them...
paxos
7th March 2002, 08:36
Originally posted by kythorn
A bigger file is useless unless it's better quality in some way, wanting it bigger just to fill up a CD is simply asinine.
I don't want to just fill up a CD for the sake of it. I want to be able to get the best quality possible to fit on a single CD. I don't think this is asinine. If you are saying I've reached this and altering the bitrate will do no good, then fair enough. What I don't really appreciate is a quick reply telling me that using the extra features will affect filesize. I KNOW THIS! What I was querying was the apparently absurd math whereby each time I upped the bitrate the filesize DROPPED. But thanks for the replies. It's just that I'm getting exasperated having encoded the same damn film 5 times without getting any results I could make sense of.:sly:
MaTTeR
7th March 2002, 08:59
@paxos
I certainly did understand. Sorry if my response wasn't long enough but I've been responding to the same questions just like this for 2 days. I mean if you look through the posts, everyone else is generally talking about the same thing. How do I predict file size with XYZ settings? This is the million dollar question ATM.
I also understand your seeing filesize drop as you increase the bitrate. Do I have a specific answer to this? Not really, the codec has been out a few days and it certainly changes all the variables we are use to seeing. The hope is that some Divx Network folks contribute to this forum so we can get clear specific answers.
paxos
7th March 2002, 09:14
I did actually look through the forums, here and elsewhere, before asking. The only questions I spotted where of the *how do I predict filesize* type. I figured that if I did enough sample encodes, and if the samples were big enough, with the use of a hand-held calculator I should be able to predict the eventual filesize. I wasn't looking for a simple program to input a few results, and read the output. What has thrown me is that I can almost double the bitrate and get the same filesize. So should I keep upping the bitrate, or would I be better altering something else? As I said, the aim is to get the best quality to fit on a CD. I must admit, all the encodes I did look to have the the same quality.
vcespon
7th March 2002, 09:53
Well, here's my 0.03 €
I tried Divx 5 with an action film (M:I-2) at 720x304, GMC, b-frames, no psycovisual, 2 pass. And guess what? It ended on exactly the predicted file size.
Although the final quality was not impressive (well, I'm doing another try now). Maybe the people that's getting too small filesizes are using too small frame sizes (less data -> less bits necessary to encode). I soposse you'll end up with a bigger file if you use a 720x304 resolution than a 512x220 or so.
paxos
7th March 2002, 10:15
I was using 608x336, but I'll try something bigger next time.
movmasty
7th March 2002, 10:35
@paxos
if you get undersized movies, NEVER PUT A HIGER BITRATE!!!
the only result will be to have it undersized....more.
yes i understand your thinking....if it gives me less bytes...ill cheat it giving it more bytes to do....so its less will be what i want...
but the encoder will do just like did the time before....
and...how will you know how much should be the more...to make that its less...come out equal to your wanted....
this will be "improbabily bitrate precision"
you have, in order:
1) set a bigger res if you are under 640xxx
2) set lower max/min DRF(quantizers)
3) set a res also bigger than 640xxx
4) enhance the quality applying some sharp filter
(all that remember me what once said a russian worker: "They cant really pay me so little as little i can work" )
Franky
7th March 2002, 13:06
OK, here's the deal (as far as I've figured).
You can use any Divx4 bitrate calculator for Divx5, but if you get an undersized final movie, DO NOT change the bitrate!
The reason it is undersized is that the video is at maximum quality, so changing the bitrate can not increase it. Instead of filling up the extra bits with redundant data, Divx5 simply removes them. If you want higher quality video, you should instead change the resolution.
paxos
7th March 2002, 16:04
Thanks. I'll experiment along these lines. :)
ProfDrMorph
12th March 2002, 20:09
you said that you shouldn't increase the bitrate if you get an undersized file because it's already at highest quality. But what if you used a too high bitrate in the first place? By using 1-pass encode with minQ = maxQ = 2 you can find out how much space DivX5 needs at most but has anybody tried DECREASING the bitrate? I don't think that an encode with fixed quantizers at 2 will actually turn out to fit on one CD even with B-Frames, GMC and all that stuff. Maybe in the future but not today. So as I said: I think DivX DOESN'T reach the maximum possible quality but has an internal calculation bug so you MAY increase final file size by decreasing the bitrate. Has someone time to test this?
OUTPinged_
12th March 2002, 21:05
erm, guys...
you arent calculating 1/2pass ratio in this case. well that is bad for your encode's health. arbeiten, arbeiten!
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.