Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 P2P Digital TV Recorder Supervisor: Professor Michael R. Lyu Prepared by:Ho Tsz Wing, Andy Lau Wai Shun, Jack.

Similar presentations


Presentation on theme: "1 P2P Digital TV Recorder Supervisor: Professor Michael R. Lyu Prepared by:Ho Tsz Wing, Andy Lau Wai Shun, Jack."— Presentation transcript:

1 1 P2P Digital TV Recorder Supervisor: Professor Michael R. Lyu Prepared by:Ho Tsz Wing, Andy Lau Wai Shun, Jack

2 LYU Content 1.Project background and objectives 2.Summary of Work in Semester 1 3.Improvements in Semester 2 a)Decentralized searching algorithm and buddy list b)Decentralized recording algorithm and bonus system c)Streaming and video format conversion 4.Difficulties and Solution 5.Further Improvements 6.Conclusion

3 LYU Project background Watching TV is a major entertainment People often miss their favorite programs People need to schedule the recording of the programs

4 LYU Project objectives Allow people to view back a previous TV program without doing scheduling themselves Let the users view the program on demand Increase the availability of the TV programs Achieve load balancing among the participating peers

5 LYU Summary of Work in Sem1 Program Core 1.Download the video file from other peers 2.No Buddy List 3.All peers information is stored in a centralized server 4.A centralized scheduling algorithm 5.Peers unable to reject the recording task 6.Using a complex algorithm to achieve high availability P2P Digital TV Recorder Performance enhancement 1.Whole file replication 2.Erasure code replication Research Results 1.In most cases, erasure code replication performs better than whole file replication 2.When the peer availability attains a certain level, the performance of the whole file replication close to erasure code replication

6 LYU Improvement Work in Sem2 Problem Performance of the server become the bottleneck of the system Cause Queries needed to handle increase dramatically with the increase of the number of peers Solution Use buddy list system Try to keep as less as information in the sever

7 LYU Improvement Work in Sem2 Problem Peers cannot reject the recording tasks => Inflexible Cause A centralized server will assign the recording task to the online peer without considering their contribution to the system Solution A distributed scheduling algorithm Implement a bonus system The user is able to accept or reject the task

8 LYU Improvement Work in Sem2 Problem Replication methods take too much time and CPU resource Cause As the original video in dvr-ms format is too large, no matter which replication we use, much time is consumed. Solution Implement a streaming server Real time encoding is fast enough

9 9 Improvement Work Decentralized searching algorithm and buddy list 2.Decentralized recording algorithm and bonus system

10 LYU User Search Application Login/Logout Application Xml.asp Database Component of Server

11 LYU Login / Logout / User Search DirectoryServer B E C D A Online Offline Online Login message Buddy Information

12 LYU Task of Client Side Client Application Download StreamingRecording Download (Implemented) Basic function Send the video file to the requested peer Streaming Encoding to wmv Preview function Recording Scheduling among peers Bonus system

13 LYU Download Topology – Napster (Sem1) Client Lookup(TVB News) N6N6 N9N9 N7N7 Server N8N8 N3N3 N2N2 N1N1 Simple, but O( N ) states and a single point of failure Key=TVB News N4N4

14 LYU Download Topology – Gnutella (Sem 2) N4N4 Client N6N6 N9N9 N7N7 N8N8 N3N3 N2N2 N1N1 Robust, but in the worst case O( N ) messages per lookup Key=TVB News Lookup(TVB News)

15 LYU P2P Digital TV Recorder Protocol Download & Streaming / Recording Message IP ID Type Program Title TTL / Hop Port / Channel

16 LYU Performance Enhancement Forward the message to other peers All pass CheckIPField Check Message ID CheckTTL Check File Exist

17 LYU Scheduling of Recording Task 1.Peers initialize the recording task when the program starts 2.Peers are able to determine recording or not if the bonus points of the peers attain a particular level 3.Peers forward the recording message to one of its buddies 1.Server will schedule the recording of all program in the morning 2.Send out the recording request to 2 peers randomly before the program starts 3.Peers who received the recording request cannot reject it. CentralizedDecentralized

18 LYU Scheduling Policies

19 LYU Scheduling Policies

20 LYU Bonus System Free Rider unable to decide record or not Normal User able to decide record or not 1010+

21 21 Improvement Work - 2 Video-On-Demand (VoD) streaming

22 LYU Why use VoD streaming? Download the user needs to wait for a long time errors may occur in the downloading process VoD streaming save the user a lot of time and storage space can be used as a preview function

23 LYU Windows Media Encoder SDK DirectShow Library GraphEdit Tools used in developing the streaming application

24 LYU DirectShow Library a media-streaming architecture for the Microsoft Windows® platform provides for high-quality capture and playback of multimedia streams Example uses: file players video editing applications file format converters etc.

25 LYU DirectShow Filters and Filter Graphs DirectShow Filters receive multimedia streams as input and produce output A source filter introduces data into the graph. A transform filter takes an input stream, processes the data, and creates an output stream. Renderer filters receive data and present it to the user Filter Graphs A set of connected filters controlled by a high-level component called the Filter Graph Manager

26 LYU DirectShow Architecture

27 LYU Writing a DirectShow Application The application 1.creates an instance of the Filter Graph Manager. 2.uses the Filter Graph Manager to build a filter graph. 3.uses the Filter Graph Manager to control the filter graph and stream data through the filters.

28 LYU Approaches in Graph Building ApproachMethod Used The Filter Graph Manager builds the entire graph RenderFile The Filter Graph Manager builds part of the graph Render The application builds the entire graphAddFilter, Connect or ConnectDirect

29 LYU Reasons for using DirectShow Library 1.Windows MCE records TV programs in dvr- ms format 2.Dvr-ms files are not efficient for storage (1hr TV program recorded in good quality requires about 1668MB) 3.Dvr-ms files cannot be streamed over the internet 4.DirectShow is used to convert dvr-ms file to wmv file that can be used for streaming 5.The file size of 1 hr wmv file is only 101MB if the bit rate is 225kbps

30 LYU Number of days of TV programmes that can be recorded with a given hard disk size

31 LYU GraphEdit The filter graph built by our application

32 LYU Uses of DirectShow Library Steps to convert dvr-ms file to wmv file using DirectShow Library: 1.start once Windows MCE has finished recording a particular TV program 2.create the filter graph and render the dvr-ms file 3.original dvr-ms file will be deleted in the case that the storage space is not sufficient for new recording

33 LYU Experiment Result Bit Rate (Kbps) Video SizeFile Size (KB) Conversio n Time (s) x 2401, x 2403, x 2404, x 3601, x 3603, x 3605, The dvr-ms file used in this experiment has a length of 60s, a file size of 27,399KB and is recorded in good quality

34 LYU Experiment Result Bit Rate (Kbps) Video SizeFile Size (KB) Conversio n Time (s) x 2404, x 3605, x 4805, x 6005, The dvr-ms file used in this experiment has a length of 60s, a file size of 27,399KB and is recorded in good quality

35 LYU Windows Media Encoder SDK used to compress live or stored audio and video content into Windows Media files or streams create multimedia productions from devices attached to their computers

36 LYU Steps to create an encoding application

37 LYU Encoding with CBR and VBR Constant Bit Rate (CBR) Encoding bit rate and size of the content are known before encoding for content that varies in complexity, the encoding quality is not constant Variable Bit Rate (VBR) Encoding it compensates for changes in the complexity of the content bit rate and size of the content are not known before the encoding

38 LYU Uses of Windows Media Encoder SDK 1.When the client receives a streaming request, it will create an encoder object, encode the appropriate file using CBR encoding and broadcast it at the address 2.It then connects to the requesting peer and the peer will view the file at the specified address

39 LYU Streaming Architecture DirectoryServer B E C D A Streaming Host Streaming request Connection established

40 LYU Difficulties and Solutions Difficulty Dvr-ms file (the default file format for the recorded TV in Windows MCE) cannot be streamed over the Internet Cause Windows Media Encoder 9 Series SDK does not support the encoding and broadcasting of dvr-ms file Solution We have to use DirectShow Library to convert the dvr-ms file to a format that is compatible with Windows Media Encoder 9 Series SDK (i.e. wmv file).

41 LYU Difficulties and Solutions Difficulty The wmv file resulted from the conversion of dvr-ms file by DirectShow Library has sound only but no video. Cause The default transform filter chosen by the RenderFile method (InterVideo Video Decoder) cannot decode MPEG-2 stream to MPEG-1 stream Solution So we have chosen to use the GPL MPEG-1/2 Decoder in our filter graph to solve this problem

42 LYU Further improvement It is possible to have real time streaming in the following ways: First, we can start the file conversion as soon as Windows MCE starts to record the TV program Next, we can use Windows Media Encoder SDK to encode the wmv file and broadcast it at Finally, the client can connect to the above address to get the video content instantly However, there is one drawback as doing recording and converting at the same time takes up a lot of CPU time

43 LYU Further improvement It is also possible to use p2p technique to stream the file It can reduce the network bottleneck at the video server It can provide a fault tolerant Video-on-Demand streaming it raises technical, performance, quality, business, and legal issues

44 LYU Conclusion We have implemented our application in a decentralized ways using a buddy list system to enhance the performance. We have introduced a distributed scheduling algorithm and a bonus system to enhance the availability of the TV programmes. We have also developed a streaming server to reduce the storage requirement and enabled the user to preview the TV programmes.

45 45


Download ppt "1 P2P Digital TV Recorder Supervisor: Professor Michael R. Lyu Prepared by:Ho Tsz Wing, Andy Lau Wai Shun, Jack."

Similar presentations


Ads by Google