project presentation : real time distributed video transcoding using twitter storm and ffmpeg

35
Distributed Video Transcoding Rischan, Sunni December, 18, 13

Upload: rischan-mafrur

Post on 29-Dec-2015

281 views

Category:

Documents


1 download

DESCRIPTION

Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

TRANSCRIPT

Page 1: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Distributed Video Transcoding

Rischan, Sunni

December, 18, 13

Page 2: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

What we’re doing?

Comparing output time when we transcode the video files in different mode:

● standalone mode● distributed but using program that we’re

made● distributed using twitter storm

Page 3: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Apologize

We didn’t use OpenStack because …..

1. Server just has 2 GB RAM 2. Real Machine more faster than Virtual Machine.

Page 4: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Standalone mode

1. Transcode video files using ffmpeg library in one PC.

2. No Split and concat.3. Calculate the time processes.

Page 5: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Distributed using program that we made

1. The program developed by python.2. Video Splitter.3. Send the video to the worker.4. Call the Ffmpeg to transcode. (problem?)5. Send back video from worker to server.6. Video Concatter.7. Show time processes.

Page 6: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

distributed using twitter storm

Something that must we know for understanding storm:1. Setting storm environment for cluster.2. Components of a storm cluster.

Page 7: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Setting Storm env1. We need more than one PC (we can use VM).

PC Server(x.x.x.160) :Ubuntu, Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz, RAM 2 GBPC Worker 1(x.x.x.160):Ubuntu, Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, RAM 8 GiBPC Worker 2(X.X.40.44) : Macbook, Intel Core 2 Duo 2.4 GHz, RAM 2 GiB

Page 8: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Setting Storm env (2)2. Every PC must have Ffmpeg & storm3. Storm Server, we need :

● ZeroMQ● JZMQ● Java● Python● Zookeeper

Page 9: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Storm Arch

Nimbus = JobTracker

Page 10: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Installing Storm for ClusterDont forget to add id_rsa.pub workers in the server .ssh directory

wget https://raw.github.com/maltoe/storm-install/master/storm_install.sh

chmod +x storm_install.sh

storm_install.sh all <nimbus> <installdir>

Page 11: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Running Storm

We must create topology and then submit the topology for running storm video transcoding & kill the topology for stop it.

Page 12: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Result & Code Explanation

Page 13: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

File Informations

file : storm-video.mp4duration : 00:07:57.84resolution : 576x360size : 9.728 MB

Page 14: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Standalone modeffmpeg -i storm-video.mp4 storm-video.mkv

Transcode from mp4 to mkv in PC Server :

0m36.936s

Page 15: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

distributed using program that we made

Code Explanation:

Page 16: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode Code

Page 17: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode Code (1)

Page 18: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode Code (2)

Page 19: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode Code (3)

Page 20: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode Code (4)

Page 21: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Code for Distribution

Page 22: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Code forDistribution1)

Page 23: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Result:file size before split in server send to worker

transcode in worker send to server concat in server file size after note

9.728 MB 0m12.473s 0m0.456s 4.152 MB PC Server

0:00:43 0m6.484s 0:00:00 PC worker 1 (Lab)

0:00:44 1m4.308s 0:00:04PC Worker 2 (Dorm) Macbook

Total : 124 s / 2m4s

Page 24: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Using Storm

Page 25: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

SplitVideo

Page 26: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode and Concat Video

Page 27: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Main Topology

Page 28: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

VideoSpout

Page 29: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Transcode Video Bolt [python]

Page 30: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Split Video Bolt [python]

Page 31: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Result:● Error, because we use subprocess in python for calling ffmpeg.● If we use python libraries for ffmpeg, it’s deprecated, for concat function.

The libraries is too old compared to latest version of ffmpeg● We have tried to use java library (xuggler) for calling ffmpeg, but this library

is discontinued. Most java libraries for ffmpeg is discontinued or too old.

Page 32: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Conclusion

● Storm is not suitable for video transcoding○ Storm is for stream data, so we can’t use static video○ If we use stream video, it can’t be distributed○ It’s better to use Hadoop, although based on a

paper, it doesn’t give a good performance● Until now, we haven’t found reference for the

same research

Page 33: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Twitter Topology

Page 34: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Twitter Spout

Page 35: Project Presentation : Real time distributed video transcoding using twitter storm and ffmpeg

Twitter Result