With the increasing trend for hand-held devices, such as the intelligent mobile phone and tablet PC, users have an increasing demand for network media streaming service. However, in the course of streaming media, the unstable network bandwidth often causes frozen play or delay to degrade user experience. A cloudassisted real-time transcoding mechanism is proposed in this paper, which contains HTTP live streaming protocol, a coding mode transition state machine, and three bandwidth evaluations of error patterns. In the proposed mechanism, the variance in current network is able to be observed according to the bandwidth evaluation results; if different transcoding strategies are used in different modes, the appropriate media segment bit rate is able to be calculated, which is transcoded into the segment to meet the current bandwidth conditions, it makes the users can obtain appropriate media quality automatically through the HTTP redirection technique. Using cloud computing the user will take different transrating media clips into different transrators according to the users?? needs, using this technology to increase the transrating efficiency to achieve real-time transrating. Finally, the peak signal-to-noise ratio (PSNR) and bandwidth utilization rate are analyzed as the reference index of improvement in media quality. According to the experimental results, the PSNR can be increased by about 2.8 dB in general network behavior, and the bandwidth utilization rate can be maintained above 80 percent during streaming.