Due to continual spamming, forum registrations are now by Invitation Only. Hopefully this will be only a temporary measure to combat spammers.

If you want an invitation contact forumapplication @ camstudio . org

Sorry for the inconvenience.

Best x264 settings for performance

edited June 2013 in General Discussion
Hi, i've been getting on fine with Camstudio Lossless 1.5 with the settings:

Keyframes: 25
Capture Frames: 40ms
Playback Rate: 25 FPS

I learnt after doing an hour long recording i'm going to have to use a different codec because of the 2GB limit.I would rescue it in VirtualDub but it's more than 4GB. So I decided to use x264, I use it a lot for encoding but i've never captured with it. Based on recommendations on this forum I changed the video options to:

Quality: 100
Keyframes: 200
Capture Frames: 40ms
Playback Rate: 25 FPS

I changed the x264 settings to:

Preset: Ultrafast
Rate Control: CRF 23.0
Log Level: None

It all looks good and creates a very small file (estimated 270 MB for an hour) but i'm capturing DJ software so my priority is low processing power and i'm not concerned how big the file is as long as it doesn't go over 2GB.

Does anybody have any recommendations to lower CPU usage if i'm not concerned how big the file will be?

Even more quality would be a bonus. I'm thinking CRF settings and keyframe settings is what I would have to change. I think If I lower the CRF value it would lower CPU because it's not having to work as hard to compress. If I can get perfect quality with Camstudio Lossless with low CPU power but a huge file size i'm thinking I should be able to get close to perfect quality with x264 with low CPU power and a big but not over 2GB.

Thanks.

Comments

  • If you’re saving the file as an AVI and doing no further processing, you might try flipping that 40/25 to 25/40 since you’ll get better motion capture, and media players seem to have no trouble handling 40 FPS h264 files. Leave the key frames at 200 - Cam cannot override the x264 I frame presets.

    In my experience, capturing an area of 1024 x 768, you’ll hit the wall at just over one hour. A larger capture area will use way more resource and result in larger files. If the source material is 720 (for example) it makes no sense to enlarge it beyond that for the purpose of capture, and you’ll slow your computer down to a crawl. You can upscale the product afterwards, if you think there’s a reason for doing that.

    Ken
  • edited June 2013
    Thanks for the reply. I will be doing further editing and need to sync it up to a PAL camera and those capture and playback settings are the only ones i've managed to get them both to sync. I read if you use less keyframes it will use less CPU in trade off for size so I experimented with 25 keyframes instead of 200 and it appeared to use less processing power in the load bar in my DJing software and Task Manager. If x264 doesn't use Camstudio's Keyframe setting then it won't matter. I also tried CRF 16.0 and couldn't tell a difference so tried x264 lossless and it appeared to use less CPU power again.I read that QP is better for processing speed than CRF because it doesn't require lookahead. For the region I need a x264 lossless file adds up to an estimated 613 MB over an hour. I don't need audio. Well that all worked fine and looks great so i'll try it out for real for an hour and see how I get on.Let me know your thoughts if you think I should definitely be doing something different.

    Thanks
  • In the cases where key frames can actually be set, 25 would be more than 200, not fewer, but that’s really a non factor and x264 doesn’t use that key frame logic in any case. Setting Cam’s key frames at 200 seems to cause less interference within the 264 process. Leaving CRF and additionally capturing at 40/25 may be an undesirable tradeoff in terms of motion capture, but the only way to know for sure is to do a test. I seriously doubt that any of these changes will make a huge difference in resource usage when compared to factors such as capture area and the adverse affects of other software currently running, which may sap some of the resource you need to keep things going smoothly.

    Ken
  • edited June 2013
    Ok thanks. I just done a test and i'm actualy doing a mix I want to record for real and it was going really well and it started to really go slow in places,screen and audio stuttering :( s. It happenned about 6 times ove 30 mins and Camstudio Lossless never gave me a so gle problem. So I'm now going to try keyframes set to 200.If no improvement then CRF 23.My DJ controller can cause wierd issues though,when I first installed x264vfw my load was fully i the red constantly,uninstalled it and Camstudio Lossless was then at full load in the red.Uninstalled it then installed it with my DJ controller on then tge problem went away.But I just hope I can capture with x264 without my controller effecting it.I also have high System Idle CPU usage which i'm sure is related to my controller!

    Update: I tried with Keyframes 200 and it didn't make a difference but i'll stick with it if it's safer. I tried CRF 23 instead of lossless and it lasted a lot longer until it started slowing down but with Camstudio Lossless it never slowed down. I'm going to try Camstudio Lossless again just to see if it happens with that,if it does then x264vfw being installed is the problem because it may be conflicting with something. Installing x264vfw made Camstudio Lossless record with a really high load before so could cause load spikes with Camstudio Lossless now aswell

    Thanks
  • I tried camstudio lossless and it lasted 52mins before it started to rapidly slow down. Before I installed x264vfw it didn't freeze but it could of just been luck last time because it was close. I uninstalled all the programs I don't need and disabled unecassary startup programs and tested with x264, keyframe 200 and CRF 23 and it lasted 30mins so I don't know if it's possible to screen capture past the hour mark but it seems a bit odd it captured with no problems with Camstudio Lossless,it just couldn't save.

    Thanks
  • edited June 2013
    I'm not certain the codec is the culprit here, as I'm pretty sure it doesn't figure in until the end after you hit stop - Nick once referred to CamStudio Lossless as being "like Zip for video." The capture is raw until processing, if that's the case. BUT that may be handled differently with x264vfw, particularly if that is running as a background process.

    Just to give it its turn, have you tried Xvid? It has its own problems, but I've never experienced a slowdown and I've recorded long Photoshop sessions as well as videos of CamStudio recording (a video of CamStudio done by CamStudio!) Most of my recordings are 1280X720. Here's my favorite version: http://www.digital-digest.com/software/download.php?sid=1052&ssid=0&did=14 I've not tried x264vfw yet, so I cannot provide a comparison.

    For motion video, digiday here got better lossless results from Lagarith Lossless, but it is quite limited as to the length of the recording with audio. (About 9 minutes with 16-bit PCM audio at 1280X720.)

    Terry
  • Hi Terry, I was thinking of using Xvid but I managed to get x264vfw to work!

    At first I tried without my DJ controller plugged in and it recorded no problems so my controller definitely increases CPU usage. I then thought once it slows down it keeps doing it so it might just be getting too hot, the laptop felt hot so I placed a standard home fan behind the laptop and I also changed the directory to where the DJ software records the audio to a different hard drive to the one Camstudio captures to and it solved the problem. The laptop didn't feel as hot so I think that was the key. I've even managed to record with x264 lossless no problems and that would normally slow eveything down sooner than CRF 23. Thanks a lot Ken & Terry for your advice.
  • edited June 2013
    Ah, a hot laptop, eh? (!) I wonder why the DJ controller would be driving the CPU so hard? Or do you think it was the fact it was writing to different partitions or drives? Quite mysterious! I'm glad it is working now, at least, but as I'm considering getting a new controller myself for Ableton Live I'd love to hear what was messing things up, since I'll probably be making videos on Ableton. (I'm considering getting a <a href="http://www.sonicscoop.com/2013/06/11/review-ableton-push-instrument-controller-by-erin-barra/" target="_blank">"Push"</a>) Terry
  • edited June 2013
    I'm not sure if the audio and video writing to different drives helped, I might test it out but the controller definitely increased CPU usage because I tried it without and it was fine. Everytime you touch something on the controller the CTRL light flashes in the software which is a lot, it's very sensitive with the jogwheels and tempo fader for example. Also the controller has two sound cards, one for the output and one for queing in the headphones so maybe that has something to do with it sapping some power. I'd love to get Ableton and the Push controller, that's actually what I've been wanting to get but I can't afford it yet. I think you'll be ok with the push controller, I wouldn't under estimate the power of a household fan to help with your screen captures, it was the difference of a 20 min recording comfortably to an hour plus for me. It could probably record longer :)
  • edited June 2013
    I've had those household fans save the day on many an occasion! #:-s

    Terry
Sign In or Register to comment.