| The advent of the information age and the development of Internet make the streaming media services widely used in our daily life. The traditional live video systems based on C/S architecture suffer poor scalability and high server loads, hence, most of the existing live video systems use P2P architecture. Although many commercial P2P live video systems have been successfully applied, heterogeneous networks and clients pose a major burden to their further development. Specifically, various networks coexist and different networks have different bandwidths, and even the same network still experiences the bandwidth fluctuation. Video clients become more and more multiplex, where they have various processing capabilities, storage abilities and video resolutions, which result in different demands of the video quality. The existing video codec mechanisms can only provide fixed single video streaming flow which cannot meet the dynamic changes in networks and satisfy different demands of clients.This paper designs and implements a P2P live video system named NccLive based on the Scalable Video Coding (SVC) technology, which can provide multi-layer video streaming with different bit rate and video qualities. It can relieve the problems brought by heterogeneous clients and networks. The existing open source software of scalable video coding JSVM does not meet the demand of coding in real-time. This paper studies the principles and mechanisms of H.264/SVC, and modifies the motion estimation search algorithm in JSVM and then proposes an optimization algorithm LNTSS (Limit New Three-Step Search) which can accelerate the codec processes of JSVM while keeping the video compression efficiency without reducing the quality of a video. Moreover, this paper implements the functions of capturing video data from a camera in real-time, and accomplish the functions of converting and storing YUV data with Directshow, and studies the key P2P technologies. Finally, a SVC based P2P live video system NccLive is implemented. Tests show this system can stably provide multi-level live video service, which can be used in the scenarios, e.g. video broadcasting, real-time monitoring,etc. |