cs 6385 Assignment 4 --------------------- Out May 18 Due May 27. Goal: ----- To implement fast and slow motion on video. Preparation: 0) Get a CoC account if you havent done so already. All code must be compiled for and executed on a Solaris box. No other OS will be supported. All coding must be done from a CoC account only. 1) Read about RTP from http://www.cs.columbia.edu/~hgs/rtp/. You need to have an idea of what RTP is so read the overview and the initial portion of the RFC at http://andrew2.andrew.cmu.edu/rfc/rfc1889.html. In particular read about the tool "rtpplay". 2) You are provided source code as well as binaries (for Solaris) for rtpplay which is a tool that allows you to play back video on file to a multicast channel. The source code is available on the class webpage at http://www.cc.gatech.edu/fac/Mostafa.Ammar/6385/HW4/cs6385Assign4.tar.gz You are to use this version of rtp ONLY - do not use any other source code for rtp downloaded from any where else. Steps to download: 1. Download this file to you CoC home directory via a web browser. 2. Unzip this file using the command - "gunzip cs6385Assign4.tar.gz" 3. This will create a file called cs6385Assign4.tar in the same directory. 4. Untarring this file will create a directory called "cs6385Assign4" so if for some strange reason a directory by that name already exists in the directory you are working in then do the needful. Untar the file using the command - "tar xvf cs6385Assign4.tar" 5. A directory called cs6385Assign4 will be created. This directory has the source code you need as well as a makefile which you will use for compilation. All executables created by compiling the code reside in cs6385Assign4/sun5/bin. The sample video file is also in cs6385Assign4/sun5/bin - it is a one minute video of a tour of georgia tech called gatech.video *Note the Makefile works ONLY if cs6385Assign4 is in your HOME directory. 3) Compilation To compile simply type "make" at the prompt. If the source code is more recent than the binary then the makefile compiles the changed sources and puts the new binaries in the sun5/bin directory. Test the makefile by typing "make". The makefile provided will work for all solaris boxes if you are running this from a CoC machine. If you have trouble getting it to work then email me at aparna@cc.gatech.edu or ask anyone with Unix knowledge to see whats wrong. Assignment: 1. Use rtpplay (see the README or type "rtpplay -?" for usage) to play out the video on file to a multicast address. The multicast address and port number you will use is 224.2.X.YY/62000. Where X is the third last digit of your student id number, YY are the last two digits of your student id number. For e.g. if your student id is 123 456 789 then your multicast address is 224.2.7.89. Change directory to cs6385Assign4/sun5/bin Type rtpplay -f "filename" 224.2.X.YY/62000 Use vic to see whether or not you are playing anything out to this channel. We played with vic as a part of the first assignment - if infact you dont remember then vic's usage is "vic multicastaddress/portnumber" Thus in the example above to see what you are playing back use "vic 224.2.7.89/62000" Click on the image (thumbnail image) to make it larger. On the new screen that comes up note the play out rate - both frames per second as well as kilobits per second. Click on the "info" button and check the rtp statistics too. On the RTP stats screen clicking on the buttons on the left will give you graphical information about that parameter. For e.g. click on the frames button to see the frames per second. 2a) Each type of encoding has some sample period. We studied that non CD quality audio encodings typically have a sample rate of 1/8000. RTP uses this sample rate information for determining when to play out an RTP packet. In the source code you will find a data structure called "period" this is an array of sample periods for various types of encodings. Note the value of the encoding for H.261 - this is the encoding we have used for the gatech.video. b) Modify rtpplay source code (rtpplay.c) to accept as input via a command line parameter a speed factor "s". When s = 1 then the video is played out at the original rate. When s > 1 the video is slowed down and plays out in slow motion When s < 1 the video is sped up and plays out in "fast motion" HINT: the data structure mentioned in part 2a) is used in the code to determine the rate of play out. Find where in the code it is used and multiply the factor "s" by the sample rate. See what this does to the play out rate by using vic to see the video. After you modify the code compile (using make) and run rtpplay with different values of s. Try factors 0.25, 0.5. 0.75, 1, 1.25, 1.5, 2, 2.5 Note down the play out rates observed by vic. Note down the loss rate by using vic's RTP stats info. 3) Write a one page report describing a) how you did the experiment b) observed rates from vic for all the values of "s" that were tried. c) Put a pointer to where the source code lies in your home directories so I can check the code. Note: DO NOT email the code to me. You may either send me the report electronically or hand it in to Dr Ammar on Thursday 27th May.