A method performed at a computing device, the method comprising: obtaining information relating to encoding bitrates and content quality scores for content segments of a content stream, wherein the content segments of the content stream are provided by a content server and downloaded by the computing device; for each content segment, determining an encoding bitrate for the content segment to be downloaded from the content server, wherein determining the encoding bitrate for a current content segment is based upon an estimated current network bandwidth, constraints of a buffer at the computing device into which downloaded content segments are stored, and also upon quality scores associated with content segments within a selected horizon extending from the current content segment to a future content segment in the content stream at an endpoint of the horizon; and downloading each content segment with the determined bitrate for the content segment from the content server, characterized in that the determining the encoding bitrate for the current content segment further comprises: applying a dynamic programming algorithm that utilizes buffer constraint information indicating the constraints of the buffer and the quality scores associated with the content segments within the selected horizon to determine an optimized quality score value for the current content segment; and applying an online algorithm that iteratively calculates the encoding bitrates of segments within the selected horizon and determines the encoding bitrate associated with the optimized quality score value for the current content segment. obtaining information relating to encoding bitrates and content quality scores for content segments of a content stream, wherein the content segments of the content stream are provided by a content server and downloaded by the computing device; for each content segment, determining an encoding bitrate for the content segment to be downloaded from the content server, wherein determining the encoding bitrate for a current content segment is based upon an estimated current network bandwidth, constraints of a buffer at the computing device into which downloaded content segments are stored, and also upon quality scores associated with content segments within a selected horizon extending from the current content segment to a future content segment in the content stream at an endpoint of the horizon; and downloading each content segment with the determined bitrate for the content segment from the content server, characterized in that the determining the encoding bitrate for the current content segment further comprises: applying a dynamic programming algorithm that utilizes buffer constraint information indicating the constraints of the buffer and the quality scores associated with the content segments within the selected horizon to determine an optimized quality score value for the current content segment; and applying an online algorithm that iteratively calculates the encoding bitrates of segments within the selected horizon and determines the encoding bitrate associated with the optimized quality score value for the current content segment. applying a dynamic programming algorithm that utilizes buffer constraint information indicating the constraints of the buffer and the quality scores associated with the content segments within the selected horizon to determine an optimized quality score value for the current content segment; and applying an online algorithm that iteratively calculates the encoding bitrates of segments within the selected horizon and determines the encoding bitrate associated with the optimized quality score value for the current content segment.