350 likes | 354 Views
Nontrivial animations require a labor-intensive process, making them costly. Buy generic clips or find specific ones online. Learn about animation/video formats, file size considerations, transferring video to a computer, and animation/video software.
E N D
Animation & Video
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. Animation
mouse Animation from a CD-ROM
Animation Animated Gifs from the Internet
Animation made with Digital Morph 2.7 MB from the Internet
Animation 43.8 MB
Video Who hasn’t wanted to do this !!!
Animation/VideoFile Formats • .AVI (PC) • .MOV (Mac) • .MPeG • .3g2 • .GIF (Office2000 - 2010 & Browsers) • .SWF (Shockwave) • .RA (streaming)
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.
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
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 6-pin 4-pin Transferring Digital Video to a Computer AND Software to transfer/capture the video information
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 Transferring Analog Video to a Computer AND Software to transfer/capture the video information
Need a video capture device for the computer TV Tuner Need a coaxial cable to connect your cable service to the computer Coaxial Cable Transferring Analog Video to a Computer AND Software to play/capture the video information
Other Video Input Devices Webcams External - QuickCam(Circa 2002) USB port 640 x 480 window (max) 5 KHz sampling rate 15 fps (max)
Other Video Input Devices Webcams External – Logitech C260(Circa 2012) USB port 16:9 – 1280x720p 3 MP photos There is an HD version that takes 10 MP photos 1280x720 8.42MB .wmv
Other Video Input Devices Webcams Camera Mic Internal – (Usually on a laptop) Also 16:9 – 1280x720p 1280x720 6.8 MB .mp4
Other Video Input Devices Multimedia Cell Phones 1920x1080p
Animation/Video Software • Basically there are three types of software to: • Create/Capture • Edit • Play
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 Video Capture/Edit Software
Free Video Playback Software Media Player(PC) - player for AVI and MPG fileshttp://windows.microsoft.com/en-US/windows/products/windows-media-player Real Player (PC & Mac) -player for AVI, MPG, and MOV fileshttp://www.real.com/realplayer/search/media-player Quick Time(PC & Mac) - player for AVI, MPG, and MOV fileshttp://www.apple.com/quicktime/download
Video Screen Capture Software Video Screen Capture
Animation Software GIF Construction Set - www.mindworkshop.com/alchemy/gifcon.html Digital Morph($19)
VIDEO COMPRESSION
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. Video Compression Remember slide 12, where a hour of uncompressed video requires 223 GB.
For this course, wewill learn how to integrate existing animation/video filesinto VB programs.
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 mciSendString function: Generalcommandformat:mciSendString(CommandString,0,0,0) mciSendString("open skiing.wmv alias 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. mciSendString("close movie“,0,0,0) file name mciSendString("play movie“,0,0,0) alias command
Some Preliminaries However, before using it, we have to declare the mciSendString function: Private Declare Function mciSendStringLib _ "winmm.dll" Alias "mciSendStringA" (ByVal_lpstrCommandAs String, ByVal_ lpstrReturnStringAs String, ByVal _ uReturnLength As Integer, ByVal _hwndCallbackAs 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.
Some Preliminaries Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal_lpstrCommandAs String, ByVal _lpstrReturnStringAsString,ByValuReturnLengthAs_ 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 PrivateSubcmdClose_Click(...)Handles cmdClose.Click mciSendString("close movie",0,0,0) End Sub Let’s create this form in which to play a video. Note, this is framed in a PictureBox.
Some Changes Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal_lpstrCommandAs String, ByVal _lpstrReturnStringAsString,ByValuReturnLengthAs_ Integer, ByVal hwndCallback As Integer) As Integer . . . Private Sub cmdPlay_Click(...)Handles cmdPlay.Click mciSendString("play movie",0,0,0) End Sub PrivateSubcmdClose_Click(...)Handles cmdClose.Click mciSendString("close movie",0,0,0) End Sub mciSendString("open skiing.wmv alias movie",0,0,0) mciSendString("open skiing.wmv type mpegvideoalias movie parent "& picVideo.Handle.ToInt32 & " style child",0,0,0) Note: You cannot break a string like I did. I just needed the room! PictureBox name
Some Changes Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal_lpstrCommandAs String, ByVal _lpstrReturnStringAsString,ByValuReturnLengthAs_ Integer, ByVal hwndCallback As Integer) As Integer . . . Private Sub cmdPlay_Click(...)Handles cmdPlay.Click mciSendString("play movie",0,0,0) End Sub PrivateSubcmdClose_Click(...)Handles cmdClose.Click mciSendString("close movie",0,0,0) End Sub Dim filename As String filename="skiing.wmv" mciSendString("open"&filename&"typempegvideoaliasmovie parent"&picVideo.Handle.ToInt32&"style child",0,0,0)
Video Resource Links Playing movies/videos in VB.NEThttp://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
Read the Description of Assigment-10