Log in

View Full Version : XviD vs x264 for encoding Family Guy: how much space can I save without qual. loss?


sabre
19th May 2006, 23:09
Currently I'm using the xvid settings attached to compress my recorded family guy files.

What I'd mainly like to know is with the proper settings, how much lower bitrate could I use with x264 and still expect equivalent quality? Right now I'm just using default x264 settings with 800 cbr and deblocking enabled with the default sliders.

The source is NTSC recording but it's being IVTC'ed and cleaned up through avisynth, so the picture is pretty clean. with the above settings I'm currently getting abotu 175 MB per ~20 min episode with xvid and about 133 MB with x264 and the quality looks pretty much the same to me. I'd really like to squeeze the episodes down to 100 MB apiece using x264 but with 128kbps cbr mp3 audio track taking up ~19 MB I'm worried that there won't be enough bitrate for x264 to produce comparable quality @ ~550kbps.

Any suggestions on improvements for my settings on either encoder are welcome. Is GMC worth bothering for Xvid? I find it odd that I currently get 30+ fps with x264 vs ~20-24 with xvid. I thought encoding .264 was supposed to be slower?:confused:

EDIT - btw encoding @ 512x384, 23.xxx fps, YV12

imcold
20th May 2006, 00:20
No need to use GMC, it has only negligible impact on quality (if any) and isn't worth the increased computational complexicity. You should use 2pass mode instead, when you don't mind the extra time for first pass - it gathers statistics for the 2nd pass, so it could distribute bits better = improved quality.
X264's encoding speed is very dependant on the settings, it could be faster than XviD indeed. I don't know, what the defaults in your GUI are, but for the beginning you can try subpixel refinement: 7, motion search algo: UMH, enable all partitions and set the direct mode: auto for B-frames.

Caroliano
20th May 2006, 01:01
See this post (http://forum.doom9.org/showthread.php?t=111313) for general advices on x264 setings, etc.

You can also use another codec of audio, as Vorbis -q2 (96kbps) to get an quality close to 128kbps cbr Mp3, or if you want to go even lower you can try 64kbps HE-AAC with an aceptable quality. All these codecs you can mux in matroska.

GMC in Xvid don't worth all the headaches and slowdown IMO. Use 2-pass or quantizer/quality based 1-pass in any codec that you have. 1-pass CBR is the worst mode ever created if you seek quality. H.263 quantization seems to be better for mid/high bitrate animated content. It produces less ringing. I personaly don't like AQ in animation, but others say that it helps, so make your own tests. Q-pel is also polemical. Why you lowered max B-frame number? You may limit the max quantizers to ensure an more uniform quality, but caution to not cause oversize.

Blue_MiSfit
20th May 2006, 03:56
In all cases when shooting for a target filesize, ONLY use 2 pass. 1 pass CBR is a waste of time, and 1 pass CQ is only when you want constant quality with no regard towards filesize. This applies to both XviD and x264

Now, for x264 I would reccommend turning up the deblocker, it tends to help squeeze the bitrate requirement down for animated content (blurs real footage too much IMHO). Try a couple of settings.

You should be able to get it down to 100mb. I would also reccommend saving some audio bitrate with HE-AAC - though doing this will essentially require you to use the MP4 or MKV container. CBR is also somewhat ineffecient with audio. ~64k stereo HE-AAC should be apropriate. This frees up more bitrate for the video.

Good luck
~MiSfit

Sirber
20th May 2006, 12:33
Use RealAnime defaults on that, you'll get 60MB file in fantastic quality.

modsoul
20th May 2006, 16:58
Use RealAnime defaults on that, you'll get 60MB file in fantastic quality.


i'll vouch for this. if you do use realanime do what i do. set wquality to low. then mode to 1 pass CQ and quant to 25( or around this value). i just encoded a 30 min vidoe at 640x480 to 67 mb using that.

morph166955
20th May 2006, 17:28
While i havent done my family guy eps yet i just did a full season of stargate. Heres the before and after for you:


Originial (xvid):
774320 Stargate SG1 - 08x01 & 08x02 - New Order.avi*
383920 Stargate SG1 - 08x03 - Lockdown.avi*
388048 Stargate SG1 - 08x04 - Zero Hour.avi*
383312 Stargate SG1 - 08x05 - Icon.avi*
386576 Stargate SG1 - 08x06 - Avatar.avi*
384704 Stargate SG1 - 08x07 - Affinity.avi*
394448 Stargate SG1 - 08x08 - Covenant.avi*
385360 Stargate SG1 - 08x09 - Sacrifices.avi*
387792 Stargate SG1 - 08x10 - Endgame.avi*
415072 Stargate SG1 - 08x11 - Gemini.avi*
384272 Stargate SG1 - 08x12 - Prometheus Unbound.avi*
383120 Stargate SG1 - 08x13 - It's Good To Be King.avi*
387104 Stargate SG1 - 08x14 - Full Alert.avi*
384368 Stargate SG1 - 08x15 - Citizen Joe.avi*
369696 Stargate SG1 - 08x16 - Reckoning (Part 1).avi*
385984 Stargate SG1 - 08x17 - Reckoning (Part 2).avi*
731648 Stargate SG1 - 08x18 - Threads.avi*
386512 Stargate SG1 - 08x19 - Moebius (Part 1).avi*
385744 Stargate SG1 - 08x20 - Moebius (Part 2).avi*



Recoded (x264):
241968 Stargate SG1 - 08x01 - New Order (Part 1).avi*
267088 Stargate SG1 - 08x02 - New Order (Part 2).avi*
225040 Stargate SG1 - 08x03 - Lockdown.avi*
268064 Stargate SG1 - 08x04 - Zero Hour.avi*
267312 Stargate SG1 - 08x05 - Icon.avi*
286048 Stargate SG1 - 08x06 - Avatar.avi*
257760 Stargate SG1 - 08x07 - Affinity.avi*
255712 Stargate SG1 - 08x08 - Covenant.avi*
335904 Stargate SG1 - 08x09 - Sacrifices.avi*
261760 Stargate SG1 - 08x10 - Endgame.avi*
264752 Stargate SG1 - 08x11 - Gemini.avi*
243408 Stargate SG1 - 08x12 - Prometheus Unbound.avi*
362560 Stargate SG1 - 08x13 - Its Good To Be King.avi*
257408 Stargate SG1 - 08x14 - Full Alert.avi*
274336 Stargate SG1 - 08x15 - Citizen Joe.avi*
234384 Stargate SG1 - 08x16 - Reckoning (Part 1).avi*
258368 Stargate SG1 - 08x17 - Reckoning (Part 2).avi*
230336 Stargate SG1 - 08x18 - Threads.avi*
269328 Stargate SG1 - 08x19 - Moebius (Part 1).avi*
304176 Stargate SG1 - 08x20 - Moebius (Part 2).avi*


sizes are in KB

also note, both came from the original DVD sources so the recodes are not recodes of the xvids they are recodes of the dvd's. x264 was done using onepass w/ crf=20