There are a few commercial products which will do that but none of the ones I know of support Macs.

If you're willing to DIY then you can do it with MythTV...