Prepaid services require the billing system to offer real-time billing and service control in streaming media applications. However, current billing approaches suffer from high risk of bad debts to operators or lack of the function of service termination during service consumption. On the basis of streaming media services?? features, a streaming media online charging system (SMOCS) is developed in this paper. The online charging process for typical streaming media service-VoD service is proposed, and a performance optimization scheme by adopting main memory database technology is provided to improve the efficiency of online charging. When comparing with shared memory schema, SMOCS obtains an obvious average processing time reduction (by almost 95%), and it could effectively satisfy real-time billing requirements of streaming media services.