![Page 1: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/1.jpg)
Animation& Video
1
![Page 2: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/2.jpg)
High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive process to complete.
You can buy many generic animation clips on CD/DVDs that will enhance multimedia presentations and productions. However, it can be difficult finding ones that meet specific needs.
More and more animations are appearing on the Internet. These can be simple animated gifs, or more sophisticated VRML sites. Just as with sound on the Internet, animation files must first be downloaded to the client computer, and then they are played. We will also examine the streaming of animation/video when we examine multimedia on the Internet.
2
Animation
![Page 3: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/3.jpg)
mouse
from a CD-ROM3
Animation
![Page 4: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/4.jpg)
Animated Gifs
from the Internet4
Animation
![Page 5: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/5.jpg)
from the Internet
made with Digital Morph2.7 MB
5
Animation
![Page 6: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/6.jpg)
6
Animation
43.8 MB
![Page 7: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/7.jpg)
7
Video
Who hasn’t wanted to do this !!!
![Page 8: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/8.jpg)
8
Video
![Page 9: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/9.jpg)
.AVI (PC)
.MOV (Mac)
.MPeG
.3g2
.GIF (Office2000 - 2010 & Browsers)
.SWF (Shockwave)
.RA (streaming)
9
Animation/Video File Formats
![Page 10: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/10.jpg)
10
File Size Considerations
Like graphics, the size of the image (length x width) in pixels times the color depth determines how many bytes a single image (frame) requires.
Since an animation/video is just a series of images, once the size of a single frame is known, we multiply the result by the number of frames per second (fps) to determine the size of an animation/video file.
Finally we multiply by the length (time).
Unfortunately, the results in files in the gigabyte range.
![Page 11: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/11.jpg)
111920 x 1080 x 30 fps x 16 sec = .993 GB
So one minute requires 3.7 GB and an hour requires 223 GB!
So one minute requires 3.7 GB and an hour requires 223 GB!
File Size Considerations
![Page 12: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/12.jpg)
Need a digital camera to capture image
Need a 1394 (Firewire) card for the computer or a USB 2.0 port or wireless
Need a 1394 or USB cable to connect the digital camera to the computer
AND Software to transfer/capture the video information
AND Software to transfer/capture the video information
6-pin4-pin
Transferring Digital Video to a Computer
12
![Page 13: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/13.jpg)
Need an analog camera to capture image
Need a video capture device for the computer
Need a specific cables to connect the analog camera to the computer
RCA
S-video
AND Software to transfer/capture the video information
AND Software to transfer/capture the video information
13
Transferring Analog Video to a Computer
![Page 14: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/14.jpg)
AND Software to play/capture the video information
AND Software to play/capture the video information
Need a coaxial cable to connect your cable serviceto the computerCoaxial
Cable
Need a video capture device for the computer
TV
Tuner
14
Transferring Analog Video to a Computer
![Page 15: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/15.jpg)
15
Transferring Analog Video to a Computer
![Page 16: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/16.jpg)
16
![Page 17: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/17.jpg)
External - QuickCam (Circa 2002)
USB port
640 x 480 window (max)
5 KHz sampling rate
15 fps (max)
Webcams
17
Other Video Input Devices
![Page 18: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/18.jpg)
USB port
16:9 – 1280x720p
3 MP photos
There is an HD version that takes 10 MP photos
Webcams
18
Other Video Input Devices
External – Logitech C260 (Circa 2012)
1280x720 8.42MB .wmv
![Page 19: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/19.jpg)
Also 16:9 – 1280x720p
Webcams
19
Other Video Input Devices
Internal – (Usually on a laptop)
Camera Mic
1280x720 6.8 MB .mp4
![Page 20: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/20.jpg)
Multimedia Cell Phones
20
Other Video Input Devices
1920x1080p
![Page 21: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/21.jpg)
Basically there are three types of software to:
Create/Capture
Edit
Play
21
Animation/Video Software
![Page 22: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/22.jpg)
• Purpose of this software is to capture, and compress video, and to interleave it with incoming audio.
• May include editing software shown below.
• Range in price and functionality:– Free – Movie Maker– Mid Range – Pinnacle Studio – $60– High End – Adobe Premiere – $699– Higher End – Final Cut Pro – $1,000
22
Video Capture/Edit Software
![Page 23: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/23.jpg)
Media Player (PC) - player for AVI and MPG files
http://windows.microsoft.com/en- US/windows/products/windows-media-player
Real Player (PC & Mac) - player for AVI, MPG, and MOV files
http://www.real.com/realplayer/search/media-player
Quick Time (PC & Mac) - player for AVI, MPG, and MOV files
http://www.apple.com/quicktime/download
23
Free Video Playback Software
![Page 24: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/24.jpg)
Video Screen Capture
24
Video Screen Capture Software
![Page 25: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/25.jpg)
GIF Construction Set - www.mindworkshop.com/alchemy/gifcon.html
Digital Morph ($19)
25
Animation Software
![Page 26: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/26.jpg)
VIDEO
COMPRESSION
26
![Page 27: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/27.jpg)
• Uncompressed video takes huge amounts of storage space.
• Video compression eliminates redundant video artifacts/data via prediction between frames.
• When using the Web, sometimes “streaming” video such as RealVideo or Shockwave is used.
27
Video Compression
Remember slide 12, where a hour of uncompressed video requires 223 GB.
Remember slide 12, where a hour of uncompressed video requires 223 GB.
![Page 28: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/28.jpg)
For this course, wewill learn how to integrate existing animation/video filesinto VB programs.
28
![Page 29: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/29.jpg)
The Media Control Interface (MCI) provides standard commands for playing multimedia devices and recording multimedia resource files. These commands are a generic interface to nearly every kind of multimedia device. We will use the mciSendString function:
29
Some Preliminaries
General command format: mciSendString(CommandString,0,0,0)
mciSendString("open skiing.wmv alias movie“,0,0,0)
commandcommand file namefile name aliasalias
mciSendString("close movie“,0,0,0)
mciSendString("play movie“,0,0,0)
Notice that the alias is similar to what we did when opening record structured files, where we equated a file number with a file name and then referred to the number.
Notice that the alias is similar to what we did when opening record structured files, where we equated a file number with a file name and then referred to the number.
![Page 30: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/30.jpg)
However, before using it, we have to declare the mciSendString function:
Private Declare Function mciSendString Lib _ "winmm.dll" Alias "mciSendStringA" (ByVal _ lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal _ uReturnLength As Integer, ByVal _ hwndCallback As Integer) As Integer
30
Some Preliminaries
Notice that the function returns a value, but we will not use it.
Notice that the function returns a value, but we will not use it.
Do not worry about this declaration. You will just copy and paste it into your next assignment.
Do not worry about this declaration. You will just copy and paste it into your next assignment.
![Page 31: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/31.jpg)
31
Some Preliminaries
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal _ lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength As _ Integer, ByVal hwndCallback As Integer) As Integer . . .
Private Sub cmdPlay_Click(...)Handles cmdPlay.Click mciSendString("open skiing.wmv alias movie",0,0,0)
mciSendString("play movie",0,0,0)End Sub
Private Sub cmdClose_Click(...)Handles cmdClose.Click mciSendString("close movie",0,0,0)End Sub
Let’s create this form in which to play a video.
Let’s create this form in which to play a video.
Note, this is framedin a PictureBox.
Note, this is framedin a PictureBox.
![Page 32: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/32.jpg)
32
Some Changes
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal _ lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength As _ Integer, ByVal hwndCallback As Integer) As Integer . . .
Private Sub cmdPlay_Click(...)Handles cmdPlay.Click mciSendString("play movie",0,0,0)End Sub
Private Sub cmdClose_Click(...)Handles cmdClose.Click mciSendString("close movie",0,0,0)End Sub
Note: You cannot break a string like I did. I just
needed the room!
Note: You cannot break a string like I did. I just
needed the room!
mciSendString("open skiing.wmv type mpegvideo alias movie parent "& picVideo.Handle.ToInt32 & " style child",0,0,0)
mciSendString("open skiing.wmv alias movie",0,0,0)
PictureBox namePictureBox name
![Page 33: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/33.jpg)
33
Some Changes
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal _ lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength As _ Integer, ByVal hwndCallback As Integer) As Integer . . .
Private Sub cmdPlay_Click(...)Handles cmdPlay.Click
mciSendString("play movie",0,0,0)End Sub
Private Sub cmdClose_Click(...)Handles cmdClose.Click mciSendString("close movie",0,0,0)End Sub
Dim filename As Stringfilename = "skiing.wmv"mciSendString("open " & filename & " type mpegvideo alias movie parent "& picVideo.Handle.ToInt32 & " style child",0,0,0)
![Page 34: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/34.jpg)
Playing movies/videos in VB.NET http://www.vbforfree.com/?p=402
MCI command string tutorial: http://www.vbforfree.com/?p=155
mciSendString function: http://msdn.microsoft.com/en-us/library/ms709492.aspx
MCI commands: http://msdn.microsoft.com/en-us/library/ms712587.aspx
34
Video Resource Links
![Page 35: Animation & Video 1. High labor requirements tend to make animations a costly type of resource. Nontrivial animations usually require a labor-intensive](https://reader035.vdocuments.net/reader035/viewer/2022062718/56649e755503460f94b75d94/html5/thumbnails/35.jpg)
Read the Description
of Assigment-10
35