PDA

View Full Version : Having Issues With Reaching Desired Filesize - Please Help


HBK
18th July 2003, 00:44
Hey guys,

I've been encoding some episodes of 24. As you may or may not know, each episode of 24 is about 43 minutes long so basically you end up with the same video bitrate (roughly 900kbit/s) for each episode encode. My final target filesize is 300MB which includes 96kbit/s MP3 audio. I am using Gordian Knot for the calculations and VirtualDub for the encoding.

Here is the following info that is relevant to my encodes...

576x320 (source is 16:9 NTSC)
Neutral Bicubic Resize
Audio bitrate - 96kbit/s MP3 Audio
Video bitrate - 900kbit/s

Motion Search Precision - Ultra High
VHQ Mode - 4 (Wide Search)
Maximum I-Frame Interval - 240
Minimum I-Frame Interval - 1
Use Chroma Motion

Maximum B-Frames - 2
B-Frame Quant Ratio - 150
B-Frame Quant Offset - 75
B-Frame Threshold - 40

Min/Max I-Frame Quant - 2/31 (defaults)
Min/Max p-Frame Quant - 2/31 (defaults)

Below I-Frame Distance - 12
I-Frame bitrate Reduction - 24
Bitrate Payback Delay - 240
Payback Proportionally

Here's the funny thing. I've managed to encode the first 2 episodes and have hit bang on 300MB which was my desired filesize. Great stuff. The problem is, I've tried to encode episodes 3 and 4, with the same settings (but obviously with slightly different calculations), but I end up with either undersized video or oversized video.

Can anyone suggest what's going wrong here? As I say, all episodes are the same length, same encoding resolution and same target filesize, yet I'm getting serious problems with obtaining my target filesize with some episodes, but not with others? Is there a known issue that B-Frames can cause trouble with desired filesizes? Or should you always hit your desired filesize if everything is ok?

Thanks in advance for any help, I apologise for the long post.

Dave.

Asmodian
18th July 2003, 01:37
Which version of Xvid are you using? Which quant matrix? Are you using packed bitstream? I believe using packed bitstream may cause size problems but have not had the issue myself. [EDIT] Becuase I don't use packed bitstream.
Are you watching your quant ranges? If not I would suggest getting debugview and watching your quant ranges to make sure your undersized files are not just constant quant 2 encodes.

Asmodian
18th July 2003, 01:40
Oh yea... what resolution are you encoding at?

HBK
18th July 2003, 02:09
Hi guys,

Not using packed bitstream.
I'm using the 24th June Koepi build.
I'm encoding at 576x320.
I haven't watched my quant ranges. Maybe I should give that a try.

junglemike
18th July 2003, 21:06
Undersized files can be in the case codec has redistributed all the bits and cannot make the file any bigger(it is already at max. q-ty with current settings) In this case, first pass, too will be undersized(the same size as second) This heppends when you apply filters that help compressiblility very well(but may harm q-ty), like themporal smoother. Or movie is very dark/brifght/has little action(movement). What i cannot understand - is how can you get _undersized_ files !?. Are you sure your bitrate calculations are OK. There is no reason for that. I mean, if you ask Xvid to give you 50mb - you will get exactly 50mb(with aufil q-ty). check calculations again.

Sorrow
21st July 2003, 15:47
I've had the same thing happen with some anime eps. Shooting for 210mb ea. First 2 eps hit the mark, after that I've had everything from 130-210. Not sure why, it just seems to have started doing it. Previous series encodes have all hit thier mark with in a few mb of each other, and I haven't changed anything on my system. Another odd thing is the 130mb encode looks just as good as the 210.

S.

unmei
21st July 2003, 17:24
>576x320 Neutral Bicubic Resize <- maybe no resizing necessary..GK might still "think in old xvid terms", dont trust it fully. 24/6 is a different world from older builds (half a year ago or so), especially for cartoons/anime. I currently encode Legend of Basara at 640x480, 910kbit/s and the quality is closest to DVD i ever reached (before i used bitrates 1200-1500!). If you absolutely want to resize, use LanzcosResize() it will produce a sharper, less compressible picture.

>B-Frame Threshold - 40 <- try 0, why do you say you want more b-frames than optimal if your files are undersized ?

>Another odd thing is the 130mb encode looks just as good as the 210.
A clear sign of oversaturation. too much filters, too small resolution.

Drop All smoother/washer/temp softer plugins. Convolution3D, warpsharp etc are not necessary in most cases and most people overuse it in a way it hurts the eye more than some xvid blocks (including many of the fansub encoding "guru"s). Once you are above your desired filesize you can still readd "a few" with lower settings.

I ran into the undersize too earlier (march-may?) then i rethought my filter stategy and asked myself why should all these filter be there? - it's not a law of nature :) Now i happlily hit my filesizes and get better results than before..

HBK
21st July 2003, 21:57
So would changing from Neutral Bicubic filtering to Lanzcos filtering possibly fix the undersized video I'm getting?

Sorrow
24th July 2003, 17:29
[QUOTE]Originally posted by unmei
>Another odd thing is the 130mb encode looks just as good as the 210.
A clear sign of oversaturation. too much filters, too small resolution.

Um, 640x480, and the only filter was convolution3d. Noticable difference without it though, so I like having it. But I can live with the odd sizes. I just thought it was wierd they used to all hit the mark, and now they don't. I haven't changed my process or settings in a long time.


S.