A method for controlling bandwidth of Set Top Boxes in an IPTV system, characterized by multiple Set Top Boxes sharing a user bandwidth, the method comprising: A) an Electronic Program Guide Server, EPG, of the IPTV system saving a content bandwidth of every media content; B) when receiving a start-up and log-in request or a request for switching a program of a Set Top Box in the multiple Set Top Boxes transmitted by the EPG, a Management Platform of the IPTV system sending a remaining of the user bandwidth available for the Set Top Box to the EPG; and C) the EPG comparing the remaining of the user bandwidth with content bandwidth of every media content, and generating a program list of media contents whose content bandwidths are less than or equal to the remaining of the user bandwidth for the Set Top Box to select and use; D) the Set Top Box initiating an on-demand request to a Streaming media server by selecting in the content program list of the EPG; the Streaming media server responding to the on-demand request and playing a corresponding program stream to the Set Top Box; after receiving the program stream, the Set Top Box periodically reporting a user code, a Set Top Box ID, a media content ID and a bandwidth utilized by the Set Top Box for receiving the program stream to the Management Platform of the IPTV system via the EPG; wherein the remaining of the user bandwidth available for the Set Top Box is determined by the Management Platform of the IPTV system according to a bandwidth utilization situation of other Set Top Boxes in the multiple Set Top Boxes sharing the user bandwidth when the EPG transmits the log-in request or the request for switching a program of the Set Top Box to the Management Platform; wherein after the step D), the method further comprises: at same time of or after initiating a request for completing playing to the Streaming media server, the Set Top Box initiating a request for releasing the bandwidth utilized by the Set Top Box to the Management Platform of the IPTV via the EPG (S59, S510), accordingly, the Management Platform of the IPTV returning the result of releasing the bandwidth to the EPG. A) an Electronic Program Guide Server, EPG, of the IPTV system saving a content bandwidth of every media content; B) when receiving a start-up and log-in request or a request for switching a program of a Set Top Box in the multiple Set Top Boxes transmitted by the EPG, a Management Platform of the IPTV system sending a remaining of the user bandwidth available for the Set Top Box to the EPG; and C) the EPG comparing the remaining of the user bandwidth with content bandwidth of every media content, and generating a program list of media contents whose content bandwidths are less than or equal to the remaining of the user bandwidth for the Set Top Box to select and use; D) the Set Top Box initiating an on-demand request to a Streaming media server by selecting in the content program list of the EPG; at same time of or after initiating a request for completing playing to the Streaming media server, the Set Top Box initiating a request for releasing the bandwidth utilized by the Set Top Box to the Management Platform of the IPTV via the EPG (S59, S510), accordingly, the Management Platform of the IPTV returning the result of releasing the bandwidth to the EPG.