The invention provides a
transcoding method from H.264 / SVC(scalable video coding) to H.264 / AVC(advanced video coding) based on a
video on demand system of P2PVoD, belonging to the field of video
transcoding. With the adoption of SVC self-adapting
transcoding, an SVC document is divided into independent multi-layer documents according to
layers by a separator, before transcoding, a space layer and a quality layer are subjected to a self-adaption process according to the terminal ability,
layers not needed are abandoned to enable the transcoding process to effectively reduce unnecessary time consumption, and the
video quality matching with the ability of a
client end is provided for the
client end; with the adoption of a method combining a pixel region and an alternation region,
time complexity is lowered, and error shift is effectively controlled; with the adoption of an encoding control optimized
algorithm based on Lagrangian, when an
average distortion function is being solved, a sum of
absolute difference (SAD) is used for substituting a sum of squared difference (SSD), and the calculation complexity is simplified; and with the adoption of a
processing mechanism by parallel threads based on GOP (
group of pictures), the single-encoded GOP is processed by parallel threads, and thus the transcoding time is greatly reduced.