Solution to HW #5: Multimedia Synchronization
Video on Demand
Learn to create Web-based synchronized
multimedia presentation using SMIL.
Learn Multimedia Synchronization
Learn Basic Video on Demand
Assignment Date: 4/19/2010
Due Date: 4/26/2010
- The two related papers.
Part 1: SMIL
Using SMIL to create a multimedia
presentation, hw4.smi, where
- It starts with a background
music which consists of the first 5 seconds of a midi file, such as canyon.mid, followed
by another music file passport.mid. Both are in ~cs525/public_html/smil/.
- After 1 second, plays the a short video of your choice.
- After 2 second, plays
a short recorded voice of your.
- After the short video, play recorded
voice with concluding remarks.
- Recording the two voice files
with application of your choice.
The new version of real player can play a midi file directly but was not able to play midi file specified in a smil file. It complains the realplayer does not have support for content type: audio/midi.
I used wireshark to the check if the request with just canyon.midi file and the request of canyon.mid from smil. The result are the same HTTP/1.1 200 OK with the same Content-Type: audio/midi
I substituted Mural.mp3 with canyon.mid and PssingShips.mp3 with passport.mid
<meta name="title" content="mix vincent with vod lecture" />
<meta name="author" content="email@example.com" />
<meta name="copyright" content="¬©1998" />
<meta name="base" content="http://cs.uccs.edu/~cs525/smil/" />
<par title="Compose multimedia using smil">
id="Soundtrack 1" title="Soundtrack 1"
id="Soundtrack 2" title="Soundtrack 2"
begin="id(Soundtrack 1)(end)" />
<video src="video/uccs.rm" fill="freeze"
id="videoclip 1" title="video clip 1" begin="1s" >
<anchor href="http://cs.uccs.edu/~cs525" coords="0%,0%,50%,50%"/>
<anchor href="http://cs.uccs.edu/~cs301" coords="50%,50%,100%,100%"/>
<audio src="audio/vodpaper.ra" id="vincent" begin="2s"
clip-begin="1s" clip-end="7s" />
id="Soundtrack 3" title="kissingcamel"
begin="id(videoclip 1)(end)" />
Part 2: Multimedia Synchronization
Specify the hw5part1multimedia presentation
using the primitives provided by the enhanced interval-based synchronization
The multimedia presentation, hw5.smi,
starts with a background music which
consists of the first 5 seconds of Mural.mp3 followed by PassingShips.mp3.
after 1 second of the start time, plays the
uccs.rm (also in ~cs525/public_html/smil/)
after 2 second of the start time, plays
a short recorded voice.
after uccs.avi, plays recorded voice with
Let A be the first
5 seconds of Mural.mp3. B be the PassingShips.mp3. C be uccs.rm.
D be short recorded voice that comment on the vodpaper.ra. E be the
concluding remarks played right after uccs.rm. Using the enhanced
interval-based primitives, the multimedia presentation can be specifed
A before(0) B;
A cobegin(1) C;
A cobegin(2) D;
C before(0) E.
Note that there are other possible answers.
Part 3: Video on Demand.
Assume 3 Mbps instead of 1.5Mbps is used
to provide the transport of a 100 minute NTSC movie stored in the copier
memory. Here we assume a fixed rate encoding. We plan to use a Ultra Wide
SCSI-2 disk with 4 heads (each head with
40 Mbps data transfer rate) and 40 MBps
SCSI channel transfer rate to deliver the movie.
How many bytes of disk space are needed to
store the movie?
Assume a fixed rate encoding, i.e., each frame
is encoded into the same amount of bits, how many bits are used to encode
Ans: 3 Mbps / 30
frames/sec = 100 Kbits
How many phases can each head produce?
Ans: Note that here
with 4 head, the disk can trasfer 4*40Mbps < 40MByte/sec of SCSI channel
rate. Therefore SCSI channel rate is not a restricting factor.
The number of phases per head = ⌊ 40 Mbps/3Mbps ⌋ = 13 phases
With 4 heads per movie, how long is a phase?
Ans: 4 heads can
provide 13*4=52 phases.
Phase difference = 100 min/ 52 = 1.923 min/phase=115.38 sec/phase.
How many frames will be read by each head?
Ans: 30 fps * 100
min * 60 sec/min = 180000 frames
to make it dividable by 4 and 13. We pad it to 180024 frames.
Let the answer in 3) be n. The frames read
by each head will be grouped into blocks and each block contains n frames.
How many blocks will be read by a head?
Ans: Each block
contains 13 frames.
45006 frames/head / 13 frames/block = 3462 blocks / head. Starting with frame 0, show all the frame
ID numbers in the first block. Similar to that in Figure 4 of Sincoskieís
Without additional buffer, what is the longest
time that a customer has to wait before seeing the movie?
Ans: A disk
head is responsible for retrieving 2.25/4=0.5625 GBytes of the movie
and Its transfer rate is 40Mbps. Therefore it will take 0.5625GBytes
* 8bits/Byte / 40 Mbps = 112.5 seconds
or 1.875 min before it will transfer the same bit again. That is
the longest time a customer just missed the beginning of the transmission
of the movie has to wait. You can also answer the phase difference