Distributed video transcoding has been used to huge video data storage overhead and reduce transcoding delay caused by the rapid development of mobile video services. Distributed transcoding can leverage the computing power of clusters for various user requests and diverse video processing demands. However, it imposes a remaining challenge on how to efficiently utilize the computing power of the cluster as well as achieve optimized performance through reasonable system parameters and video processing configurations. In this paper, we design a Cluster-based Distributed Video Transcoding System called CDVT using Hadoop, FFmpeg, and Mkvmerge to achieve on-demand video splitting, on-demand transcoding, and distributed processing, which can be applied to large scale video sharing over mobile devices. In order to further optimize system performance, we conducted extensive experiments on various data sets to find relevant factors that affect transcoding efficiency. We dynamically reconfigure the cluster and evaluate the impacts of different intermediate tasks, splitting strategies, and memory configuration strategies on system performance. Experimental results obtained under various workloads demonstrate that the proposed system can ensure the quality of transcoding tasks while reducing the time cost by up to 50%.