Journal of Computer Applications ›› 2018, Vol. 38 ›› Issue (12): 3500-3508.DOI: 10.11772/j.issn.1001-9081.2018040942

Previous Articles     Next Articles

Fast video transcoding method based on Spark Streaming

FU Mou1, YANG Hekun1, WU Tangmei1, HE Run1, FENG Chaosheng1,2, KANG Sheng3   

  1. 1. School of Computer Science, Sichuan Normal University, Chengdu Sichuan 610101, China;
    2. Visual Computing & Virtual Reality Key Laboratory of Sichuan Province(Sichuan Normal University), Chengdu Sichuan 610101, China;
    3. Sichuan Normal University Technology Park Development Company Limited, Chengdu Sichuan 610066, China
  • Received:2018-05-07 Revised:2018-07-04 Online:2018-12-10 Published:2018-12-15
  • Contact: 付眸
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61373163), the National Key Technology Support Program of China (2014BAH11F02, 2014BAH11F01), and the Key Project of Science & Technology Department of Sichuan Province (2015GZ079).

基于Spark Streaming的快速视频转码方法

付眸1, 杨贺昆1, 吴唐美1, 何润1, 冯朝胜1,2, 康胜3   

  1. 1. 四川师范大学 计算机科学学院, 成都 610101;
    2. 可视化计算与虚拟现实四川省重点实验室(四川师范大学), 成都 610101;
    3. 四川师大科技园发展有限公司, 成都 610066
  • 通讯作者: 付眸
  • 作者简介:付眸(1991-),男,四川绵阳人,硕士研究生,主要研究方向:云计算、大数据分析、分布式流处理;杨贺昆(1993-),男,河南驻马店人,硕士研究生,主要研究方向:云计算、信息安全;吴唐美(1997-),女,四川成都人,主要研究方向:云计算、大数据分析;何润(1998-),男,四川宜宾人,主要研究方向:云计算、大数据分析;冯朝胜(1971-),男,四川广元人,教授,博士,主要研究方向:云计算、网络与数据安全;康胜(1973-),男,四川绵阳人,副教授,硕士,主要研究方向:信息管理。
  • 基金资助:
    国家自然科学基金资助项目(61373163);国家科技支撑计划项目(2014BAH11F02,2014BAH11F01);四川省科技支撑计划项目(2015GZ079)。

Abstract: Aiming at the problems of slow transcoding speed of single-machine video transcoding method and limited efficiency improvement of parallel transcoding method for batch processing, a fast video transcoding method for stream processing based on Spark Streaming distributed stream processing framework was proposed. Firstly, an automated video slicing model was built by using the open source multimedia processing tool of FFmpeg and a programming algorithm was proposed. Then, in view of the characteristics of parallel video transcoding, the stream processing model of video transcoding was constructed by studying Resilient Distributed Datasets (RDD). Finally, the video merging scheme was designed to store the combined video files effectively. Based on the proposed fast video transcoding method, a fast video transcoding system based on Spark Streaming was designed and implemented. The experimental results show that, compared with the Hadoop video transcoding method for batch processing, the proposed method has improved the transcoding efficiency by 26.7%, and compared with the video parallel transcoding based on Hadoop platform, the proposed method has improved the transcoding efficiency by 20.1%.

Key words: video transcoding, Spark Streaming, distributed stream processing, FFmpeg, Resilient Distributed Datasets (RDD)

摘要: 针对单机视频转码方法转码速度较慢和面向批处理的并行转码方法效率提升有限的问题,基于Spark Streaming分布式流处理框架,提出了一种面向流处理的快速视频转码方法。首先,使用开源多媒体处理工具FFmpeg,构建了自动化的视频切片模型,提出编程算法;然后,针对并行视频转码的特点,对弹性分布式数据集(RDD)进行研究,构建了视频转码的流处理模型;最后,设计视频合并方案,将合并后的视频文件进行有效储存。根据所提出的快速视频转码方法设计与实现了基于Spark Streaming的快速视频转码系统。实验结果表明,与面向批处理Hadoop视频转码方法相比,所提方法转码效率提升了26.7%;与基于Hadoop平台的视频并行转码方法相比,该方法转码效率提升了20.1%。

关键词: 视频转码, Spark Streaming, 分布式流处理, FFmpeg, 弹性分布式数据集

CLC Number: