Code stream processing method and code stream processing device in OTT system

The invention provides a code stream processing method and a code stream processing device in an OTT system. The method comprises the following steps: acquiring statistical information of the OTT system, wherein the statistical information includes the popularity of a film source; and determining the size of an initial cached code stream according to the statistical information. Through the method and the device, the OTT system can adopt different speed limiting modes for different film sources, so waste of bandwidth is reduced to a certain extent, and the stress on the operator backbone network and the server is reduced.