Characterizing and optimizing internet video streaming