A lil help w/ game footage and xvid

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

A lil help w/ game footage and xvid

Postby MiyaDV » Wed Dec 27, 2006 7:40 am

Well, xvid always gives me these huge sizes, and not too good quality... ( I follow the guide on the site )

I get 8.29mb for a 10second duration, 740x480, is that normal? ><
Anyway heres link to the encode:

If any of you could give me any tips on what to change to encode the game better it would really help, since that guide was made for encoding anime shouldn't encode games too well.

I also tryed encoding with .h264 with the game, it didnt go out to well..

(Also I seen some pretty damn nice quality amvs with xvid encode, and their like 45mb at 3:00 mins sometimes ><, I don't get how they do it)

So I'm basicaly asking:

Do any of you have XviD/H.264 guides to encoding game footage, or tips on what options I should play around with to encode that specific game.

Thanks.
User avatar
MiyaDV
 
Joined: 29 Aug 2006

Postby MiyaDV » Wed Dec 27, 2006 7:50 am

Arrr >< forgot the link:

http://www.megaupload.com/?d=R9PTO0P5
User avatar
MiyaDV
 
Joined: 29 Aug 2006

Postby Gepetto » Wed Dec 27, 2006 9:41 am

Well, the encode was properly done, as far as I can tell. But the file is way too damn big.

Try using a higher quantizer. On the XviD settings box, scroll the Target Quantizer tab or change the number on the box, thus:

Image

I was able to get good results re-encoding your 2nd pass file on single pass with quantizers 13-17. However, since your source file is higher quality than the compressed version and you'll be doing a 2-pass method, you may be able to push it higher while still looking good. However, if your aim is a high quality/size ratio and you don't mind using a less popular codec, I strongly reccomend you persist on using x.264 compression.

By the way, don't mind any of the settings on my screenshot. I just opened up vdub with the default settings for the sake of taking a picture.
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile
User avatar
Gepetto
Mr. Poopy Pants
 
Joined: 10 Jun 2004
Location: The Tokyo Settlement
Status: Bored to tears

Postby Zero1 » Wed Dec 27, 2006 10:27 am

There isn't a great deal you can do with that since there is so much motion. Using x264 with really insane settings will help, but all these codecs work primarily on the basis of exploiting temporal redundancy (think newsreader where only the mouth and head is moving but the background always stays still, only the head and mouth is coded and the background is "recycled" from previous frames). With a video that is constantly changing, it can't take advantage of that kind of redundancy.

There isn#t even a lot of spatial redundancy either, its fairly detailed and the textures also add to the complexity (when I say spatial redundancy, I'm talking about something like anime where you have large areas with no detail and all the same colour, like a characters face for example).

What makes H.264 so great is that it can exploit spatial and temporal redundancy in more ways than ASP (eg DivX/XviD), but if there is barely any spatial or temporal redundancy to begin with, you greatly reduce the effectiveness of the codec. The gap between MPEG-2, ASP and H.264 closes up (the bigger (more advanced) they are, the harder they fall (more features are rendered useless)).

Of course H.264 has a few tricks up it's sleeve other than advanced temporal and spatial exploitation, for example CABAC helps out a good bit (CABAC is an entropy coder, it basically compresses the bitstream elements losslessly like Winzip). ASP (DivX/XviD) use modified huffman tables, which is sort of like Winzip for video bitstreams. CABAC is many times more efficient than huffman (an estimate is 10-15%, rising for high bitrate encodes), but again this can also suffer if the video does not have much redundancy.

All I can suggest is you perhaps filter a little (if filesize really is such a concern) and use x264 with maxed settings. Be prepared for a wait though; less than 1FPS is not uncommon (unless you have a dual core).

Also seeing as there is no music and it's simple sound effects, you might want to consider using AAC audio with a VBR encoder to save even more filesize. Nero have a nice, free encoder (it's a command line, but there should be some GUI frontends for it out there, maybe check doom9) http://www.nero.com/nerodigital/eng/down-ndaudio.php

You might try encoding with -q 0.25 -lc or something similar, and see how that sounds. The beauty of this is that it's more efficient than MP3, so you can get the same or better quality at a lower bitrate to start off with. The other thing (and it's key that you used this) is the VBR mode. Using the -q mode gives you a somewhat unpredictable bitrate, however you can guess at the average bitrate. The AAC encoder has a max bitrate of 448kbps, and the -q scale is 0 to 1. So obviously setting it at 0.5 is half of the scale, and in relation is half of the max bitrate (448 x 0.5 = 224). Now here are two main reasons why the VBR (or quality mode) is awesome.

The first is that no two tracks are the same. Just like video they all compress differently. Even in the same album, if for example you encoded a whole CD at 128kbps CBR, some tracks would be lower quality than others because they are more complex, and more detail has to be dropped to get it to 128kbps. Using the quality mode ensures all tracks are encoded at the same quality, however the bitrate will vary some (though it's not usually a drastic amount).

The other (and this is where VBR AAC really shines in filesize vs quality), is silence, zero samples or just non complex parts. In parts with silence, VBR AAC will drop off to around 3kbps (possibly lower), however if you was using CBR MP3, it would always use the same bitrate even in silent parts, so if you ripped a CD at 320kbps, you would have chunks of silence encoded at 320kbps, what a waste! In fact, one track I have, has a large chunk of silence in it, then it leads on to a sort of hidden track. The music is encoded at around 240kbps, but what with the silence only using 3kbps, the average bitrate for the whole file was only 185kbps. The same file as a CBR MP3 would have been around 15MB, but this was only 12MB. Sure it's *only* 3MB, but that's 3MB saved and higher quality (the AAC peaks at 261kbps, but a CBR MP3 would have been a flat 224kbps all the way through) for free.
Image

You could even use HE-AAC (by doing something like -q 0.25 -he) to save even more bitrate. These will be in the region of 64 to 72kbps (a guess). This uses a different coding method where it halves the samplerate and reconstructs it on playback. It's a clever trick but not one I would use for high quality CD encodes. It's basically the audio equivalent of chroma subsampling. However for soundeffects, I don't think you'd notice much loss. Anyway, just for fun I edited my batch encoder for these settings. You can check out this track at 72kbps average (2.08MB) 3m57s. It will work in any media player if you use CCCP, or iTunes. Since it's just a lower quality version of my batch, it will also work on iPod, complete with album art :\
http://aflux.deltaanime.net/Zero1/Godsmack-Speak(LQ).mp4

Also, using MP4 helps a bit, since it has less overhead than AVI. These might only be little savings on their own, but when you put them all together, it starts to add up to something worthwhile.
User avatar
Zero1
 
Joined: 02 Jan 2004
Location: Sheffield, United Kingdom

Postby Gepetto » Thu Dec 28, 2006 6:52 am

Well now I feel like my little post was useless next to yours, Zero.

But 8,29 MB for 10 seconds can't be just the codec's fault, can it? I don't understand much about how XviD and x.264 actually work, but even though the textures are quite detailed and changing quickly, the main character's back only has around five different positions that could be recycled. It's taking up 1/8th of the screen, so that can make a difference.

Anyways, if there actually is something terribly uncompressible about the video like Zero said (and from my own experience, he's probably right) you could also consider lowering the resolution a little bit. 600x400, for example, would be a good choice, since it maintains the 16x resolution ideal for compression and MPEG-4 codecs tend to do rather well in stretching the images. The result is a much smaller file (since you now have 105600 less pixels to store per frame) without any noticeable loss in quality (and if there is any, you can try a less drastic reduction in resolution).
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile
User avatar
Gepetto
Mr. Poopy Pants
 
Joined: 10 Jun 2004
Location: The Tokyo Settlement
Status: Bored to tears


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest