Animation Video 1 Animation High labor requirements tend
Animation & Video 1
Animation 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 mouse from a CD-ROM 3
Animation Animated Gifs from the Internet 4
Animation from the Internet made with Digital Morph 2. 7 MB 5
Animation 43. 8 MB 6
Video Who hasn’t wanted to do this !!! 7
Video 8
Animation/Video File Formats ·. AVI (PC) ·. MOV (Mac) ·. MPe. G ·. 3 g 2 ·. GIF (Office 2000 - 2010 & Browsers) ·. SWF (Shockwave) ·. RA (streaming) 9
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. 10
File Size Considerations So one minute requires 3. 7 GB and an hour requires 223 GB! 1920 x 1080 x 30 fps x 16 sec =. 993 GB 11
Transferring Digital Video to a Computer Need a digital camera to capture image AND Software to Need a 1394 (Firewire) transfer/capture thecomputer or a card for the video USB information 2. 0 port or wireless 6 -pin 4 -pin Need a 1394 or USB cable to connect the digital camera to the computer 12
Transferring Analog Video to a Computer Need an analog camera to capture image AND Software to transfer/capture the Need a video capture video information device for the computer RCA Need a specific cables to connect the analog camera to the computer S-video 13
Transferring Analog Video to a Computer Need a video capture device for the computer TV ner Tu AND Software to play/capture the video information Coaxial Cable Need a coaxial cable to connect your cable service to the computer 14
Transferring Analog Video to a Computer 15
16
Other Video Input Devices Webcams External - Quick. Cam (Circa 2002) USB port 640 x 480 window (max) 5 KHz sampling rate 15 fps (max) 17
Other Video Input Devices Webcams External – Logitech C 260 (Circa 2012) USB port 16: 9 – 1280 x 720 p 3 MP photos There is an HD version that takes 10 MP photos 1280 x 720 8. 42 MB. wmv 18
Other Video Input Devices Webcams Camera Mic Internal – (Usually on a laptop) Also 16: 9 – 1280 x 720 p 1280 x 720 6. 8 MB. mp 4 19
Other Video Input Devices Multimedia Cell Phones 1920 x 1080 p 20
Animation/Video Software Basically there are three types of software to: ü Create/Capture ü Edit ü Play 21
Video Capture/Edit Software • 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
Free Video Playback Software 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
Video Screen Capture Software Video Screen Capture 24
Animation Software GIF Construction Set www. mindworkshop. com/alchemy/gifcon. html Digital Morph ($19) 25
VIDEO COMPRESSION 26
Video Compression • Uncompressed video takes huge amounts of storage space. Remember slide 12, • Video compression eliminates where a hour of redundant video artifacts/data via uncompressed video prediction between frames. requires 223 GB. • When using the Web, sometimes “streaming” video such as Real. Video or Shockwave is used. 27
For this course, we will learn how to integrate existing animation/video files into VB programs. 28
Some Preliminaries 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 mci. Send. String function: General command format: mci. Send. String(Command. String, 0, 0, 0) mci. Send. String("open skiing. wmv alias movie“, 0, 0, 0) Notice that the alias is mci. Send. String("close movie“, 0, 0, 0) similar to what we did when opening record structured files, where we equated a file number alias file name command mci. Send. String("play movie“, 0, 0, 0) with a file name and then referred to the number. 29
Some Preliminaries However, before using it, we have to declare the mci. Send. String function: Private Declare Function mci. Send. String Lib _ "winmm. dll" Alias "mci. Send. String. A" (By. Val _ lpstr. Command As String, By. Val _ lpstr. Return. String As String, By. Val _ u. Return. Length As Integer, By. Val _ hwnd. Callback As Integer) As Integer Do not worry about this declaration. You will just copy and paste it into your next assignment. Notice that the function returns a value, but we will not use it. 30
Some Preliminaries Private Declare Function mci. Send. String Lib "winmm. dll" Alias "mci. Send. String. A" (By. Val _ lpstr. Command As String, By. Val _ lpstr. Return. String As String, By. Val u. Return. Length As _ Integer, By. Val hwnd. Callback As Integer) As Integer. . . Private Sub cmd. Play_Click(. . . )Handles cmd. Play. Click mci. Send. String("open skiing. wmv alias movie", 0, 0, 0) Let’s create this form in which to play a video. mci. Send. String("play movie", 0, 0, 0) Note, this is framed End Sub in a Picture. Box. Private Sub cmd. Close_Click(. . . )Handles cmd. Close. Click mci. Send. String("close movie", 0, 0, 0) End Sub 31
Some Changes Private Declare Function mci. Send. String Lib "winmm. dll" Alias "mci. Send. String. A" (By. Val _ lpstr. Command As String, By. Val _ lpstr. Return. String As String, By. Val u. Return. Length As _ Integer, By. Val hwnd. Callback As Integer) As Integer. . . Private Sub cmd. Play_Click(. . . )Handles cmd. Play. Click mci. Send. String("open skiing. wmv type aliasmpegvideo movie", 0, 0, 0) alias movie parent "& pic. Video. Handle. To. Int 32 & " style child", 0, 0, 0) mci. Send. String("play movie", 0, 0, 0) Note: You cannot break End Sub a string like I did. I just Picture. Box name Private Sub cmd. Close_Click(. . . )Handles needed the room!cmd. Close. Click mci. Send. String("close movie", 0, 0, 0) End Sub 32
Some Changes Private Declare Function mci. Send. String Lib "winmm. dll" Alias "mci. Send. String. A" (By. Val _ lpstr. Command As String, By. Val _ lpstr. Return. String As String, By. Val u. Return. Length As _ Integer, By. Val hwnd. Callback As Integer) As Integer. . . Private Sub cmd. Play_Click(. . . )Handles cmd. Play. Click Dim filename As String filename = "skiing. wmv" mci. Send. String("open " & filename & " type mpegvideo alias movie parent "& pic. Video. Handle. To. Int 32 & " style child", 0, 0, 0) mci. Send. String("play movie", 0, 0, 0) End Sub Private Sub cmd. Close_Click(. . . )Handles cmd. Close. Click mci. Send. String("close movie", 0, 0, 0) End Sub 33
Video Resource Links Playing movies/videos in VB. NET http: //www. vbforfree. com/? p=402 MCI command string tutorial: http: //www. vbforfree. com/? p=155 mci. Send. String function: http: //msdn. microsoft. com/en-us/library/ms 709492. aspx MCI commands: http: //msdn. microsoft. com/en-us/library/ms 712587. aspx 34
n o i t ip r c es t-10 D e h en t m d g Rea f Assi o 35
- Slides: 35