Optimal stud width for in-wall equipment rack
I am in the middle of a major house remodel and was planning to install an in-wall equipment rack in my media room. The rack will be accessible from the rear via an air-conditioned closet. My question is about the width between the studs. I have two that are spaced 19" in the exact location I need. That seems a little tight, but my stuff is 17" wide if I recall. However, since I have the wall mostly open, it would be easy enough to move one stud over a little bit, but don't know how far to move it. Suggestions on optimal/reasonable width? Also, is there a relatively inexpensive rack I could buy to avoid building my own? I was thinking 4-6 feet would be more than enough height for the stuff that I have.
Thanks in advance for your input!