Multimedia
ContentsMultimediaGraphics / PicturesAudio / SoundVideo
Multimedia
Multimedia is: SoundGraphicsVideos
Multimedia applicationsOffice documentsWebpage contentMoviesMusicPictures
Multimedia
Multimedia files are quite large Use compression to reduce file sizes
Lossless Compression – algorithms reduce size of files○ No information is lost
Lossy Compression – algorithm reduces size of files○ Some information is lost
Multimedia
Trade offs between lossless and lossy compressionLossy can reduce file sizes much more
Example: File compression like 7-zipUses lossless compressionIf some data is lost, then file becomes
corruptedLossy compression is used in multimedia
Multimedia
Example: 38.56666666
Lossless compression38.56(7)
Lossy compression38.6
Pictures / Graphics
GraphicsBitmap (BMP) - windowsGraphics Interchange Format (GIF)Joint Photographic Experts Group (JPEG)Tagged Image File Format (TIFF)Portable Network Graphics (PNG)
Note – the abbreviations are the file extensions
Pictures / Graphics
Digitizing Images Bit Map – each image is laid out in a grid pattern Pixel - each cell in the image
Pixel could be black or whiteGrey scale valueColor
The more pixels, the better the image quality Digital cameras – megapixels
My camera is 14.1 megapixelsEach picture has 14.1 million cells that compose the
pictures
Pictures / Graphics
Bitmap of a snowman
Grey Scale Bit Map Image The snowman face is a 7x7
bitmap Composed of 15, 15, 0, 0, 0,
15, 15, 15, 15, 0, 0, 0, 15, 15, 15, 0, 0, 0, 0, 0, 15, 7, 15, 3, 15, 3, 15, 7, 7, 15, 15, 7, 15, 15, 7, 7, 15, 3, 3, 3, 15, 7, 15, 7, 7, 7, 7, 7, 15
The file also contains a header containing the size of the bitmap which is 7 x 7
Pictures / Graphics Color Bit Map Image The top photograph is a
picture with birds flying in the sky
The bottom picture is one bird blown up to show pixels
Pictures / GraphicsRGB (Red-Green-Blue) All digital images are composed of red, green and
blue Usually represented by hexadecimal numbers
24 = 16; Numbers – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F
Example: HTML commandbgcolor =“#0F69F3”bgcolor is background colorRed = 0F, Green = 69, and Blue = F3
Pictures / Graphics
RBG can make the other colors
Each color has two hexademical digits or 00 – FF, which ranges from 0 to 255
Each color is 28 and three colors 28 28 28 =224
24-bit true color We also have 32-bit color
Pictures / Graphics
Windows BitMap Bitmaps do not use compression Bitmaps have very large file sizes
Easy to calculate the file size
Image is 800 x 600 with 8 bit (1 byte) color256 color values
Pictures / Graphics Calculating Image File Size (BitMap) Number of pixels = 800 x 600 = 480,000
pixels Image size = number of pixels x number
of bitsImage size = 480,000 pixels x 1 byte =
480,000 bytesImage size = 480,000 / 1024 = 468.75
KBytes
Pictures / Graphics
Graphics Interchange Format (GIF) Moderately compresses images
Lossless compression (simple pictures) Good for simple pictures and graphics
Displays 256 colours or 8 bit Palette – it chooses the best 256 colors out of 24-
bit color
Common for websites Animated GIFs – images can display simple
animation, especially for websites
Pictures / Graphics
The animated GIF shows a four cycle gasoline engine
Requires special software to create animated GIFs
File size 369 kb
Pictures / Graphics
Joint Picture Experts Group (JPEG) JPEG uses complex mathematical compression
Reduces file size up to ten times that of GIF Causes lossy compression Supports True Color - 24 bit color
JPEG is great for photographs Used on websites
Pictures / Graphics Note
If the same JPEG image is re-edited, then the image can degrade
If you have photos that are never edited, then leave them in JPEG
If you re-edit the same photographs, then keep photo in another format ○ PNG is good; file compression○ BMP is okay if you have the space; no compression
Pictures / Graphics
Tuzla, Bosnia
Picture is 858x643 True color, 32 bit or 4
bytes Bitmap = 2.2 MB
I converted this to BMP and it was 2.1 MB
Pictures / Graphics
JPEG (20%) – very small file size; 34 k
JPEG (95%) – medium size; 212 k
Pictures / Graphics Portable Network Graphics (PNG)
Uses loseless data compressionUses 24-bit or 32-bit colorCan be used for webpages
Note: 32-bit color is RBGA○ A is for alpha○ Alpha allows translucent pictures○ 50% alpha – can see images behind the picture
Windows Aero effects
Pictures / Graphics
Creating digital picturesScanning – digitizing an image using a
scannerDigital camerasPaint programsScreen capture – use prtsc to capture a
screen
Pictures / Graphics
Software Create pictures by hand
Microsoft Paint – comes with WindowsPaint,net - free
Enhance photographsMicrosoft Picture EditorGoogle PicassoPaint.net
Professional SoftwareAdobe PhotoshopAdobe IllustratorAdobe Pagemaker
Pictures / Graphics Conclusion
For websites○ JPEG○ GIF○ PNG○ Cannot use BMP or TIFF; too large
Pictures / Graphics Conclusion
No compression○ BMP○ TIFF
Lossless compression○ GIF○ PNG
Lossy compression○ JPEG
Audio / Sound Data is processed in two ways: analog or
digital
People generally process analog data that is continuous wave patterns.
Everything we see and hear is transmitted to our eyes and ears as light and sound waves. We are equipped with analog receptors
A computer is digitalTwo discrete states: on (or 1) and off (or 0).
Audio / Sound
Analog and digital signals
Computers: Analog to digital
converters Convert analog to digital
○ Microphone
Digital to analog converters Convert digital to analog
○ CD, MP3, etc.
Audio / Sound
Sound cards and Modems are digital- to-analog and analog-to-digital signal converters
The Wave file (.wav) – used in PCs. Windows systems sounds
○ Start up sound○ Many game sounds
Wave files do not use compressionFiles are quite large
Audio / Sound Wave file is created by
Sampling sound – convertor samples the sound so many times per second
CD quality is 44,100 samples per second Less sampling is lower quality
Sound information is stored as bits Commonly 8, 16, or 32 bit sound file
Sampling – how often a sound file is read
Bitrate – how much information is stored per second Includes magnitude Includes how often sound is sampled
Audio / Sound
Audio / Sound MP3 (MPEG-1 Audio Layer 3) MP3 compresses sound information
Uses lossy compressionSome information is lost
Example: 128 kbits per secondReduces the file size of CD sound quality by 11 timesGood for webpages, because file sizes are
small Note – many audio sound formats exist;
usually for movie files
Audio / Sound
Audio Software Audio Editing Software lets users modify
audio clips and produce studio quality sound tracks.Contains equalizers, controls, etc to modify clips
Rippers – converts audio to different formats
Windows 7 contains a music CD to MP3 ripper
Videos
More complex Has RGB color and sound RGB is Red-Green-Blue
Video has three colors and a sound
Stream – picture and sound change over time
Requires much more information
Videos
Frame – the dimensions of a video in pixelsWidth x heightExample: 320x120
Each picture has color24-bit color
Picture changes each secondCalled bit rateBit rate 25 frames per second
Videos
Our video is one hour (or 3600 seconds) File size = (frame)(color)(bit rate)(time)
= 320*120*24*25*3600 = 82 Giga bits= 10.4 GB
Video files are always compressedMost use lossy compression
○ Use compression to reduce size of the image of a frame
○ Use compression to reduce the bit rate
Videos
Frame – dimensions of the videoSmall videos can be blown up
Bit rate Important for video qualityThe higher the bit rate, the higher the qualityVideos – fast motion requires a higher bit
rate Example – vastly simplified
Videos
An example of a video compression Uses three frames
I-frame: The true pictureP-frame: predict which pixels changeB-frame: uses difference between the next
frame and previous frame
Videos
Compressor-decompressor (CODEC) – a program that encodes or decodes a streaming fileStreaming file is video and/or audio
Companies hold patents or copyrights for their codecsRestrictions apply
Videos
Video filesmp4 Matroska (mkv) Windows (avi)Windows (wmv)Flash video (flv)
Files are containers (not codec)A variety of codecs are used which are in
the fileMPEG2 is a codec
○ Used for DVDs
Videos Some codecs are open source Windows pays for the rights
Some codecs play in MediaPlayer
Users either useK-lite – a windows program that contains most
codecsVLC Player – media player that contains most
codecs
Software may be illegal in the United States
Videos
Linux is freeThey do not pay for rights to use codecsInstallers have to manually install codecs
Most distributions want to be legal, especially for businessesDistribution is a particular Linux operating
systemMost do not come with codecsForums teach people how to install codecs
Videos Ubuntu – install codes as software update
Manually install DVD codec via terminalBusinesses and companies can get into trouble
installing codecs without paying for themEngland
Linux Mint – comes with all codecs including DVDFrance
Videos
Video editing software - users can modify a segment of a video, called a clip.
Users canReorder sequence of clipsReduce length of clipAdd special effects to clipsAdd extra tracks to clip (eg. Sound, text captions)
Video Editing Software usually includes audio editing capabilities.
Videos
Video editing – requires a very fast computerExpensive programVirtualDub.org – free video editing
○ Powerful filters to clean video○ Had trouble encoding videos○ Files were much bigger
Videos
DVD ripping – the process of converting a DVD into a regular video fileConverting may or may not be illegal in the
U.S.Software may or not be illegal in the U.S.Windows – most programs were terribleLinux – AcidRip
○ Free simple program○ Majority of the time produced good quality
videos with good file sizes○ Linux tends to be faster than Windows
Top Related