This paper proposes an efficient MPEG-2 to HEVC video transcoder. The objective of the transcoder is to migrate the abundant MPEG-2 video content to the emerging HEVC video coding standard. The transcoder introduces a content-based machine learning solution to predict the depth of the final HEVC coding units. The proposed transcoder utilizes full re-encoding to find a mapping between the incoming MPEG-2 parameters and the outgoing HEVC depths of the coding units. Once the model is built, a switch to transcoding mode takes place. Hence the model is content-based and varies from one video sequence to another. The transcoder is compared against the full re-encoding using the default HEVC fast motion estimation. Using 5 HEVC test sequences, it is shown that a speed-up factor of up to 3 is achieved whilst reducing the bitrate of the incoming video by around 50%. In comparison to full re-encoding, an average of 3.9% excessive bitrate is encountered with an average PSNR drop of 0.1 dB. Since this is the first work to report on MPEG-2 to HEVC video transcoding then the reported results can be used as a benchmark for future transcoding research.