Fraps - Commercial
Open Broadcaster Software - Opensource Freeware
Open Broadcaster is generally used for live streaming, but it can also be used for offline game capturing, and can be less resource-intensive than Fraps.
This guide assume you have open broadcaster installed.
Execute Open Broadcaster and make sure you have a 'scene' filled in on the bottom left box called 'Scenes'. If not, right click the box and select 'Add Scene', name it whatever you wish.
To add your game to be captured, you must right click in 'Sources' (next to Scenes), select 'Game Capture' and name whatever you wish. You can then start up Team Fortress 2, or any other game, select 'refresh' in the Open Broadcaster window and find the title of the game. Select 'OK' when finished.
We can now go over quality settings for offline recording: