510 likes | 696 Views
Media Types. N4 & 5 Computing Science. Contents. National 4 Sound, graphics, video, text. National 5 Standard file formats: text: txt, rtf audio: wav, mp3 graphics: jpeg, bmp, gif, png video: mp4, avi pdf
E N D
Media Types N4 & 5 Computing Science
Contents National 4 • Sound, graphics, video, text National 5 • Standard file formats: • text: txt, rtf • audio: wav, mp3 • graphics: jpeg, bmp, gif, png • video: mp4, avi • pdf • Factors affecting file size and quality, including resolution, colour depth, sampling rate. • Calculation of file size for colour bitmap • Need for compression
4/5 Media Types • Information Systems can contain the following types of media: • Sound, graphics, video & text
4/5 Sound • Sound files can be very useful when developing an information system. • Sound files can hold e.g. : • recordings of • Facts / information e.g. Explanations of complex ideas • Music • Sound effects
4/5 Graphics • Graphics are very useful for • Illustrating facts / information / explanations • Making the information system more attractive
4/5 Video • Video clips are very useful • They combine moving images and sound and can illustrate very complex ideas • They can make the information in a system readily accessible to everyone e.g. • Here is a video clip of Asimo the robot • Asimo videos can be found here:-http://asimo.honda.com/asimotv/
5 Text • Information systems can - • Display text on a screen • Hold text files which you can choose to open
5 Text files • Text files can be saved in many formats • You need to know about txt and rtf • A .txt file has no information about the format of the document e.g. • text style, alignment, fonts, sizes • Because it lacks formatting information - • a .txt file will be smaller than a Rich Text file • will need less storage space • be quicker to transmit across a network • You can open a .txt file using any text editor or word processor
5 Rich Text Format (RTF) • Rich Text Format (RTF) • A file saved in .rtf has formatting information and the actual text • It includes information about styles, fonts, sizes, paragraphing and indentation • It will be larger than an equivalent .txt file
4/5 Questions • Describe an advantage of saving a document as an RTF file • A document is saved as a txt file and as an RTF file:- • Which is larger? • Why is it larger? • Which is quicker to transfer across a network?
5 The need for compression • Graphic, Sound and Video files can be very large • Video files can be Gigabytes in size • They take up lots of storage space • They can take a long time to transmit across a network • So they need to be compressed
Factors affecting the file size and quality of graphics files 5 • Resolution • Colour depth
5 Resolution • The resolution is the number of pixels that make up an image e.g • 1280 x 1024 • 1600 x 1200 • 1920 x 1200 The higher the resolution the better the quality of the graphic & the greater the file size
5 Resolution example
5 Resolution
5 Colour Depth • The colour depth is the number of bits used to represent each pixel • The greater the colour depth:- • the more colours • the greater the file size
4/5 How graphics are stored
5 Colour Depth
4/5 Questions • How does the resolution affect the:- • the quality of a graphic? • the file size of a graphic? • How does the bit depth affect the:- • the quality of a graphic? • the file size of a graphic?
5 Calculating the size of a graphic - 1 • Use this formula to calculate the size of a graphic: File size = number of pixels x bit depth • File size = 6 x 150 x 4 x 150 x 24 • = 1.54 Megabytes
5 Calculating the size of a graphic - 2 • Use this formula to calculate the size of a graphic: File size = number of pixels x bit depth • File size = 3664 x 2748 x 16 • = 19.2 Megabytes • Without compression graphic files can be very large
5 Questions • Calculate the file size of these graphics:-
5 5.a) File size = 1920 x 1200 x 24 bits = 55296000 bits = 6912000 bytes = 6750 Kilobytes = 6.592 Megabytes
5 5.b) File size = 4 x 72 x 3 x 72 x 8 bits = 497664 bits = 62208 bytes = 60.75 Kilobytes
5 5.c) File size = 3264 x 2448 x 16 bits = 127844352 bits = 15980544 bytes = 15606 Kilobytes = 15.3 Megabytes
5 Graphic Files • You need to know about the following graphic files: .BMP, .GIF, .JPEG, .PNG
5 BitMap (BMP) • The .bmp format stores color data for each pixel in the image without any compression • .bmp files can be very large
5 Graphics Interchange Format (GIF) • Each pixel is represented by an 8-bit colour code • Number of possible colours is 28= 256 • Unsuitable for storing photographic images • Used to represent charts, cartoons, or drawings • Uses lossless compressionto reduce the file size without losing any of the data about the image
JPEG 5 • A bit map graphics file format which uses lossycompression • Makes the graphic file smaller by changing the colour of some pixels (to match neighbouring pixels) that won’t be noticed by the human eye • Often used in digital cameras when storing digital photographs • Not used for storing cartoons or drawings because some of the data is lost and this reduces the quality of the image
5 Portable Network Graphics {PNG} • PNG compresses files • Like GIF format it uses lossless compression • Compresses graphics more than the GIF format { a PNG file can be up to 25% smaller than the equivalent GIF file} • Used for graphics that will be sent across a network because they are lossless and small • Bit depth of up to 48 bits = variety of 248colours • Graphic can have a degree of transparency
5 Questions • Name 2 graphic file formats that use lossless compression • Name a graphic file format that uses lossy compression • Name a graphic file format that does not use compression • State 3 facts about the GIF format • State the graphic file format that is most suitable for a photo that will be sent across a network
5 Practical Task • Find a graphic that you like and save it in a folder called Graphic files. • Open the graphic with Paint then save it a number of times using different file types to complete this table:-
Factors affecting the file size and quality of sound files 5 • Sampling rate (frequency): • E.g. 44.1 kHz • Bit depth • E.g. 8 bits, 16 bits • Time ( seconds) affects the size – but not the quality
Sampling Rate 5 • The sampling rate is the number of samples of a sound wave measured each second • This is measured in kHz ( thousands per second) e.g. 44.1 kHz = 44,100 samples per second
Sampling rate 5 The higher the sampling rate the better the quality of the sound + the bigger the file size
Audio sample Bit depth (Sample depth) 5 • The bit depth is the number of bits used to represent each sample of the sound wave • The more bits used = the higher the quality = the larger the file size
Audio Files 5 • You need to know about these audio file formats: WAV , MP3
WAV 5 • WAV is the standard for storing sound files on windows systems • Bit depth: 8 bits or 16 bits • Sampling rates: 11.025KHz, 22.05 KHz, or 44.1KHz • Wav files can be very large • 1 minute of sound can take up as much as 27Mbytes of storage
MP3 5 • MP3 is a file format for compressing sound files • It cuts out parts of the sound that human ears cannot hear • It cuts out quiet sounds when a loud sounds happens at the same time • It reduces the file size without a noticeable loss of quality
WAV and MP3 Comparison 5 Note the difference in file size between the .mp3 version and the WAV version
Factors affecting the file size and quality of video files 5 • Resolution of each image(frame) • Bit depth of each image • Frame rate: the number of frames per second • Time: in seconds
Video File Formats 5 • You need to know about the following Video File Formats: AVI , MP4
Audio Video Interleave format (.AVI) 5 • The Audio Video Interleave format was developed by Microsoft and is commonly used in Windows applications like Media Player • This format does not have built-in compression. • Maximum resolution is 320 x 240 • Maximum frame rate is 30 frames per second • File size limited to 2Gb
Avi 5 • AVI files contain the audio and video data in one file • This allows synchronous audio/video playback of a file • AVI is a container format, meaning it can contain video and audio compressed using many different combinations of codecs • (A codec is a program that compresses and decompresses files)
MPEG4 5 • MPEG-4 is an(audio and video) compression method designed specially for low-bandwidth(less than 1.5MBit/sec bitrate) video/audio encoding purposes • MPEG-4 can deliver high-quality audio and video over the Internetto desktops, laptops, tablets &smartphones
Comparison of AVI & Mpeg4 5 • Both AVI and MPEG are lossy formats which sacrifices quality for file size • Both AVI and MPEG can contain both audio and video data in a file container • The quality of a video file is not dependent on the type of container file format - it is dependent on the type of codec contained within the container file • H.264 video codec frequently used with the MP4 container is thought to be one of the highest-quality video standards available.
PDF – Portable Document Format 5 • PDF was developed in the early 1990s as a way to share documents • Adobe Acrobat or Foxit Reader are used to display the files • Used for documents with text and images • Allows documents to be viewed on different platforms that don’t have the same application software
Questions 5 • Describe the purpose of a of a codec? • Describe a container file • Describe the AVI file format • Describe the MPeg4 file format • Do AVI and MPeg4 use lossy or lossless compression? • Describe the PDF format and explain why it is useful
Revision 4/5 • Create a mind map about Media Types