As the demand for IPTV services increases, one of the main challenges for offering these services is fair bandwidth allocation among users requesting different IPTV video services. Most existing approaches treat all video streams equally, without taking into consideration that some video channels require higher bit rates than the others to reach the same quality. In this paper we present several algorithms for rate allocation that optimize a weighted sum of perceptual quality of all video streams subject to bandwidth constraints both at the access link between an access node and each home, and at the backbone link connecting the video server and multiple access nodes. The proposed algorithms consider the impact of spatial, temporal and amplitude resolution (STAR) of a coded video on both the bit rate and quality, and determine the optimal rate and corresponding STAR for each video subject to the bandwidth constraint. We explicitly consider the fact that achievable rates with possible STARs are discrete and perform optimization in the discrete search space. Results show that our algorithms provide significant improvement over benchmark algorithms that assign the same rate to all videos in terms of bandwidth utilization and overall subjective quality.