# Dxtory and x264 Codec



## 1Kurgan1 (Aug 2, 2012)

Just got Dxtory and I'm trying to find a codec that will give me the file size I want. I seen a few people recommending the x264 Codec, the quality impressed me and the file size is amazingly small. But when I try to record it just makes my games lag. Doesn't even matter what game it is or what settings in the game, it's just choppy. Any ideas? Or suggestions on other Codecs to use?

**EDIT**
Settings explained on Post #3 for those that are looking to make this Codec work for recording games


----------



## Peter1986C (Aug 7, 2012)

Do not use H264 (x264 basically is H264, but then an alternative codec) when recording games. H264 is also used for "HD" video material and it does indeed provide amazing quality at a reasonable filesize. The problem is though, as you may have quessed, that the compression rate is way to high to record games lag free (the compression/encoding algorithms eat too much CPU time).
I sugggest using either the built-in DXtory codec or MJPEG. File size will be huge with the latter (and most likely with the former one as well), but at least there will be no lag. If DXtory has a fps limiter, I suggest using that one to limit the game frame rate to 30 fps to avoid lag and A/V syncing issues.
Once you are going to edit your video, you can encode the result as H264 (/x264/MPEG-4 AVC) in an .avi or .mkv container (using VBR MP3 @ 192kpbs).

BTW, I am currently experimenting once in a while with recording games with Afterburner in MJPEG. Once I think I have found the ideal settings for the transcode into x264 (when it comes to quality, file size and encoding time) I will let you know if I don't forget about this thread.


----------



## 1Kurgan1 (Aug 7, 2012)

Well after more tinkering, I found it was mostly a settings issue. The codec was set to record on H264 rather than x264. Switching that helped, but there was numerous other settings that come checked by default that I had to change. After doing that, it's smooth as butter recording and looks great, with insanely small file sizes. (Here's a screenshot)







I basically went through the settings one at a time and tried recording to figure out what was hitting the hardest. The 2 killers are Trellis and Subpixel ME refinement. Turning those off and recording I maybe see a 5 FPS loss and the file size is about 10mb/sec compared to 12mb/sec for Fraps. I had been using MSI Afterburner to record and loved it, especially since it was free, ran it at 80% and the video looked great and file size was great (8.8mb/sec). But since I didn't want to hear my own voice just to record it I had to switch.

Either way, after tinkering I highly suggest using x264 over Dxtorys own codec or others, the image looks the same and the file size is a lot smaller. Here's what my settings look like.














I am running some compression settings since I got the CPU to do it. Those who don't can get the same kind of video quality, just with a bit larger file by running these settings in the 2nd tab. (If the file size is too large for you to be happy after doing that, go to the first tab and drop the Ratefactor, I honestly noticed little to no difference between 15.0 and 23.0, so try 23.0 for a lower quality and see if that makes you happy, going from 15.0 to 23.0 cut the files alone by about 60% size)






I am still tinkering with this program, I have just done testing in empty BF3 servers. As I start recording gameplay I might end up tweaking my settings/this guide if I notice any frame drops while recording.


----------



## Peter1986C (Aug 7, 2012)

Because I will stick with Afterburner I will not throw (FFMPEG) codecs onto my PC to check whether AB picks them up. For my E8400 it would be too much work encoding videos while handling taxing games like Metro 2033 or CPU intensive stuff like the Total War series.
I will simply throw the original footage with MJPEG and PCM streams in an AVI file away once I have edited the material and encoded it into a Matroska file with x264/MPEG-4 AVC and MP3 audio.

Thanks for the settings screenshots though.


----------



## 1Kurgan1 (Aug 7, 2012)

Yeah, with an e8400 I'm not sure how good even the low settings would work for you since you don't have the extra cores to do the work. Though it might work, I can't really say.

But no problem on the screens. If you end up trying out those settings, let me know how it works, if it works on an older proc like that, then probably will be usable for just about anyone.


----------

