So i have this very strange problem with a 24 FPS movie, which i hope to get some assistance with from professionals over here
The problem is that no matter how i try, i can’t get it (or a sample of it) to obey the set size (2 Pass Xvid) or bitrate (Single Pass Xvid) – after conversion it always turns out about 1/3 larger.
Usually i encode with TMPGEnc VMW 5 using Xvid 1.3.2 from xvid.org and default settings (naturally except bitrate or size). And i’ve done so numerous times even this autumn, so i’m really clueless of why this particular film doesn’t work.
Other software i’ve tried:
Xvid 1.3.1 & 1.2.2
In regards of Xvid config, i’ve tried so much (things i’ve never needed to touch before) to no avail:
Four CC, all options
Motion search precision, some options
Frame drop interval
Quantization, many min/max values from lots of forums
Xvid Home, Generic Standalone, Unrestricted profile
Quantization type, H.263 and MPEG
B-VOP, turning on/off
Reaction Delay Factor
Resolution change, progressive/interlaced, other FPS etc, etc.
I’ve also tried encoding on a fresh machine install (naturally not all of the above options), in case something was wrong with my particular setup, but the results are exactly the same: bitrate of the movie always comes out much higher then set. The same thing for 2 Pass encoding – set size is never met.
One more interesting observation: the movie does encode great to other formats and codecs (tried MPEG2 and WMV), but then i try to use that re-encoding to encode the size i want in Xvid, the problem persists. In other words, it actually persists through several encode iterations to different formats. I find it almost hard to believe myself...
So i’m turning to you, guys. Attached is a 20 second 500 frame clip from the movie, encoded in 2 Pass Xvid 1.3.2 (no sound). And if i try to re-encode it to a set bitrate or set a 2 Pass size, it doesn’t obey and gets much bigger (this particular clip was actually set to become 2048 Kb on a 2 Pass encoding). The full film behaves the same way, just on a larger scale.
Please, can someone try to encode it and say what the problem really is?
+ Reply to Thread
Results 1 to 17 of 17
Thread: Xvid bitrate trouble
Last edited by Космик; 22nd Dec 2013 at 21:16.
Are you trying to keep it at 1920*1080 ? The sample file is extremely poor, bitrate too low,
full of macro blocks. That's not fit for anything.
What bitrate are you actually trying to achieve? Why don't you use mkv/mp4 with H.264 video ?
Have you tried CQ mode instead of specifying a bitrate ?
The resolution is really not important, i just kept the original BD rip’s one for this clip (i’ve tried lower ones too). In regards of bitrate, i’m trying to fit the movie in an ≈2 Gb window.
This sample file is encoded small for easy downloading. Naturally, i could encode a 300 Mb sample and upload it, but that’s not what the problem is. The problem is that i can’t set a certain size or CBR, it always gets much higher. I’ve tried both MP4 and MKV as containers, no change.
Did you try to encode it with 2 Pass or CBR? Did your set parameters work? In that case, what settings did you use?
Can you give a specific example of what resolution you used, What bitrate did you set, and what did you actually get.
What was your source? High Quality blu ray ? You're trying to get the whole movie at ~ 2GB?
This should be possible - perhaps reduce the resolution to 720p?
Don't forget, as the resolution is decreased, you can get away with lower bitrate.
Yep, 1080p BD. I have tried 720p – size/bitrate settings are still ignored when coding.
Regarding the bitrate, i’ve tried so many combos, i don’t even recall. Generally, the actual resolution becomes ≈ 1/3 bigger then the one set. If there isn’t something terribly wrong with the 2 systems & 6 programs i’ve tried, this should be easy to replicate: just try to encode the attached clip with any set CBR or a 2 Pass set size. You should see that it’s impossible with this clip (or the whole movie as well) – it will not follow the settings one put it. How is this even possible? What’s wrong with it?
Assuming Xvid really has a bitrate control issue.....
and before you give a try (if possible) to DivX......
Frame drop === you should NEVER let the codec drop frames
Min/Max quantizers == the default values (2;31) should be OK
Quantization type: you should use MPEG + a custom quantization matrix (yes, this is a homework for you)
B-frames = yes, and there is no point in using more than 2 consecutive ones;
Resolution (my educated guess): max width = 1024, max height = 640;
Trellis + Variable Adaptive Quantization are bitrate-savers as well .
Last edited by El Heggunte; 22nd Dec 2013 at 23:09. Reason: ......
I could add that i have successfully encoded 1080p (!) in less then 1500 Kbit/sec (!) numerous times. (It actually looks quite good on lowres (1280·1024, 800·600 etc.) monitors/projectors.) Now, with this movie, even 480p fail to hit set bitrate. What can be wrong? Same default settings.
If the source video really is hard to compress,
then there is not much you can do besides filtering it before re-encoding.
I don't have the particular version of xvid installed, so my test is meaningless.
Perhaps try uninstalling that version, and install AutoGK and use the version that comes with it.
See if you get the same issue. (This is the version I use). I also have the Divx 6.85 codec installed,
on a second XP install. I currently encoding a short music video, 1080p source, 25 fps, at 1750 kbps 720p,
using Virtualdub. It looks terrible, but I get the bitrate I asked for.
Here's the result.
Last edited by davexnet; 23rd Dec 2013 at 00:57.
AutoGK before, so thank you for the tip. It does produce some results, but not really solves the problem. When i chose automatic resolution, it does match the set size (i tried 2 Mb), but at an expense of a very low resolution (528·304). Sadly, there are almost no options, so i can’t control the process. The standard Xvid config window also doesn’t appear. Then i force-kept the resolution, the file actually got bigger.
PS: could you shrink your picture? It makes the page hard to navigate now
At least if you installed AutoGK and the version of Xvid that came with it?
(Did you uninstall the other xvid first?)
You can try Virtualdub to see if you can achieve your targets.
AutoGK does certain compressibility tests, and it tries to pick the resolution that ensures some quality based on the
bitrate you chose. Not surprised it was small. Use Virtualdub, you have full access to the encoder settings.
I'll see what I can do about that big picture.
I am after some theory first. So i set a bitrate, say 1500. And i get 1750. Ok, fail – but then i set 1300 and get 1500. So the settings kind of follow what is set, just not exactly. The movie does have very many fast scenes, so i can actually understand that it’s hard to compress bitrate-wise.
The Xvid configuration has so many options. What settings are the most important for the size, besides bitrate and resolution? A person higher up mentioned custom quantization matrix, but that sounds like very deep water for me.
Why don't you upload here to the forum 10 or 15 seconds or so of your source. Then we'll know what we're dealing with.
On the Paul McCartney clip I encoded above, I specified 1750 kbps, but got 1745 - as you can see it's very close.
I believe the forum allows you to upload,files up to 500MB. I've never used custom matrix in xvid, you'll have to read up on it.
You can start off by opening the xvid encoder dialog and setting it all to default. Then set your bitrate. It's a reasonable
place to start.
Yeah, that was my idea first, but the fact is – i don’t know how to cut out 10 seconds from an m2ts file without re-encoding it ^^ About default settings – actually that’s how i usually encode (except bitrate, of course). I usually don’t even touch the resolution. The whole reason for this thread is that, suddenly, with this movie, it no longer works, and misses the set size so badly.
Last edited by Космик; 23rd Dec 2013 at 11:14.
Getting the wrong size sometimes stems from installing a different version of XviD over an already existing version where you should remove the original one first. I'd suggest first removing XviD using Add/Remove Programs, installing it again, and then encoding.
Also, if AutoGK gave you that small resolution then the filesize you chose was too small for that particular video. You can force the resolution you want in advanced settings, but if going for the same size as what produced that 528x304 result, yours will look like crap at 1080p.
Yep, that’s what i have realized now. One simply can’t fit a fast-paced almost 2½ hour long film into a too small size window without decreasing resolution or playing deeply with complicated settings. Just decreasing the bitrate can only get one so far. I have now increased the size window and it seems to encode fine. Thanks all for valuable tips