SlideShare a Scribd company logo
1 of 21
What Is a Codec?
Or, Everything You Wanted to Know About Digital Streaming
Video But Were Afraid to Ask
What we’re NOT going to talk
about:
 The history of the moving image and recorded sound
FlipbooksZoetropeMoviesPhonoTalkiesTV
http://en.wikipedia.org/wiki/Film
http://en.wikipedia.org/wiki/Audio_recording
http://en.wikipedia.org/wiki/Television
What we’re NOT going to talk
about:
 The Nyquist-Shannon Sampling Theorem
“…shows that a bandlimited analog signal that has been
sampled can be perfectly reconstructed from an infinite
sequence of samples if the sampling rate exceeds 2B
samples per second, where B is the highest frequency in
the original signal. If a signal contains a component at
exactly B hertz, then samples spaced at exactly 1/(2B)
seconds do not completely determine the signal,
Shannon's statement notwithstanding.”
http://en.wikipedia.org/wiki/Sampling_theorem
What we’re NOT going to talk
about:
 Pulse Code Modulation and uncompressed, digitized
sound
http://en.wikipedia.org/wiki/PCM
What we’re NOT going to talk
about:
 How uncompressed, digitized video has to represent
three color values (called red chroma, green chroma,
and blue chroma) and three brightness values (called
red luma, green luma, and blue luma) in zeroes and
ones for each and every pixel, for each and every
frame*
*Other representational schemes (like CCIR-601) condense these values to use fewer
bits-per-pixel, as the human eye sees no real difference when it’s done that way
http://xiph.org/video/vid1.shtml
What we’re NOT going to talk
about:
 How “uncompressed digital video” and “uncompressed
digital audio” don’t really exist in today’s world
http://digitalcontentproducer.com/mag/video_uncomp
ressed_digital_video/
What we ARE going to talk
about:
 Why your #&*$%*@# video file won’t play in
QuickTime/Windows Media Player/IE/Firefox
 Codecs and Containers
 Web Streaming
The Facts:
The word “codec” works like the word “modem”
Code-Decode Modulate-Demodulate
is to as is to
Codec Modem
A codec is a playback algorithm that is specific
to the process used when creating the media
file.
The Facts:
 In order to play a video file, your computer must have a
program capable of playing back videos having that
specific file extension, like .MP4, .MOV, .AVI, .FLV,
.VOB, or .ASF – these are known as “container
formats”
 And that program must have access to the codec
specific to videos encoded with that codec in mind
The Facts:
 A codec can be part of the computer’s core operating
system, as a codec within its multimedia playback
framework, like in QuickTime or Windows Media Player
 A codec can be part of a self-contained application, like
in VLC Media Player or WinDVD
 A codec can be part of an application’s plug-in
architecture, like the Shockwave Flash plug-in used to
play back Flash videos in Firefox
The Facts:
 In the early days of video playback software, only a few
codecs were in use and a codec tended to be exclusive
to a specific media player. This made it easy to
generalize "if the filename has X extension, I'll need
program Y to play it."
The Facts:
 Today, you can’t look at the dot-extension on a filename
and know for certain that the program that “goes with”
that container will be able to play back the video
 For instance– ‘Export to QuickTime’ in Avid Media
Composer produces a .MOV file that won’t play back in
QuickTime on a computer that doesn’t have the Avid
codecs installed
Answers:
 How can I determine which codecs are installed on my
computer?
Since there are three ways codecs can live on your
computer, it's not so simple to do a “codec check.” If the
video doesn't play at all or plays without sound or with
sound and no picture (and the original tape plays back
fine), you've probably got a codec issue with your media
player.
Answers:
 How can I determine which codec was used to encode
a file?
Use VLC Media Player!
Using VLC:
Using VLC:
Adding Codecs to QuickTime:
 Third-party, free codec pack for the Mac– Perian
 Codec pack for Windows Media codecs in QuickTime
as well as the browser– Flip4Mac
Adding Codecs to
Windows Media Player:
 Safe, comprehensive, free codec pack for Windows
K-Lite Codec Pack (careful where you get it from)
http://www.majorgeeks.com/K-
Lite_Mega_Codec_Pack_d5230.html
http://codecguide.com/download_k-
lite_codec_pack_mega.htm
Codecs in Video Editing
Software:
 In today’s world you’ll commonly convert a video file having one codec
into a different video file having a different codec. Doing this is called
‘transcoding.’
 Depending on which codecs are involved (which determines the
complexity of the job) and the speed of your computer hardware, it may
be possible to transcode media streams in real time, or even faster-than-
realtime.
 When you 'capture’ footage to a modern video editing suite, it’ll usually
automatically transcode into the software's preferred native, internal
codec, or, in Apple terms, an 'intermediate codec.' This is done to optimize
video response of the software's playback window.
Web Streaming:
 Guess what? It’s ALL streaming!
 Within the container, audio and video streams can be
‘muxed’ or ‘de-muxed,’ that is, seen as separate
streams by the media player or as a single, integrated
stream (VLC can show you which streams in your
container are muxed and which ones aren’t)
 Each stream is pulled through the player at a different
rate– think of this as the bitrate for playback
Web Streaming Protocols:
 When you’re streaming media over a network
connection, the protocol serves as your container
 RTSP– Real Time Streaming Protocol– used by
RealMedia/RealVideo/RealAudio and QuickTime
Streaming
 RTMP– Real Time Messaging Protocol– used for Flash
video/audio only
 MMS– Microsoft Media Services
 HTTP streaming media/HTML5

More Related Content

What's hot

Streaming Media over the Internet
Streaming Media over the InternetStreaming Media over the Internet
Streaming Media over the Internet
Videoguy
 
4 multimedia elements - video
4   multimedia elements - video4   multimedia elements - video
4 multimedia elements - video
Kelly Bauer
 
3 multimedia elements - audio
3   multimedia elements - audio3   multimedia elements - audio
3 multimedia elements - audio
Kelly Bauer
 
Digital Video
Digital VideoDigital Video
Digital Video
Videoguy
 
Adam Crittenden Sound Glossary Original
Adam Crittenden Sound Glossary OriginalAdam Crittenden Sound Glossary Original
Adam Crittenden Sound Glossary Original
Adam Crittenden
 
Sound recording glossary
Sound recording glossarySound recording glossary
Sound recording glossary
amybrockbank
 

What's hot (20)

video
videovideo
video
 
Multimedia:Multimedia compression
Multimedia:Multimedia compression Multimedia:Multimedia compression
Multimedia:Multimedia compression
 
Audio Compression
Audio CompressionAudio Compression
Audio Compression
 
Streaming Media over the Internet
Streaming Media over the InternetStreaming Media over the Internet
Streaming Media over the Internet
 
4 multimedia elements - video
4   multimedia elements - video4   multimedia elements - video
4 multimedia elements - video
 
Video formats
Video formatsVideo formats
Video formats
 
Video Compression
Video CompressionVideo Compression
Video Compression
 
Chap62
Chap62Chap62
Chap62
 
Video Transcoding Terms Explained
Video Transcoding Terms Explained Video Transcoding Terms Explained
Video Transcoding Terms Explained
 
3 multimedia elements - audio
3   multimedia elements - audio3   multimedia elements - audio
3 multimedia elements - audio
 
Ppt on audio file formats
Ppt on audio file formatsPpt on audio file formats
Ppt on audio file formats
 
Lesson 4 - Audio File Formats
Lesson 4 - Audio File FormatsLesson 4 - Audio File Formats
Lesson 4 - Audio File Formats
 
introduction to audio formats - Multimedia Students
introduction to audio formats - Multimedia Studentsintroduction to audio formats - Multimedia Students
introduction to audio formats - Multimedia Students
 
Digital Video
Digital VideoDigital Video
Digital Video
 
Adam Crittenden Sound Glossary Original
Adam Crittenden Sound Glossary OriginalAdam Crittenden Sound Glossary Original
Adam Crittenden Sound Glossary Original
 
Multimedia file formats
Multimedia file formatsMultimedia file formats
Multimedia file formats
 
Audio formats
Audio formatsAudio formats
Audio formats
 
Sound Formats
Sound FormatsSound Formats
Sound Formats
 
Sound recording glossary
Sound recording glossarySound recording glossary
Sound recording glossary
 
Preserving Audiovisual Materials (LIS 198-Digital Preservation)
Preserving Audiovisual Materials (LIS 198-Digital Preservation)Preserving Audiovisual Materials (LIS 198-Digital Preservation)
Preserving Audiovisual Materials (LIS 198-Digital Preservation)
 

Similar to what_is_a_codec_2010

Beginning html5 media, 2nd edition
Beginning html5 media, 2nd editionBeginning html5 media, 2nd edition
Beginning html5 media, 2nd edition
ser
 
Project Paper
Project PaperProject Paper
Project Paper
Videoguy
 
Video Streaming
Video StreamingVideo Streaming
Video Streaming
Videoguy
 
Audio and Video streaming.ppt
Audio and Video streaming.pptAudio and Video streaming.ppt
Audio and Video streaming.ppt
Videoguy
 
Windows7: Video Improvements
Windows7: Video ImprovementsWindows7: Video Improvements
Windows7: Video Improvements
wonderu
 
How to Play iTunes Movies With Plex Media Ser
How to Play iTunes Movies With Plex Media SerHow to Play iTunes Movies With Plex Media Ser
How to Play iTunes Movies With Plex Media Ser
Lee Carol
 
20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt
Videoguy
 

Similar to what_is_a_codec_2010 (20)

Beginning html5 media, 2nd edition
Beginning html5 media, 2nd editionBeginning html5 media, 2nd edition
Beginning html5 media, 2nd edition
 
Performance Analysis of Various Video Compression Techniques
Performance Analysis of Various Video Compression TechniquesPerformance Analysis of Various Video Compression Techniques
Performance Analysis of Various Video Compression Techniques
 
Project Paper
Project PaperProject Paper
Project Paper
 
DM110 - Week 6 - Video Podcasting
DM110 - Week 6 - Video PodcastingDM110 - Week 6 - Video Podcasting
DM110 - Week 6 - Video Podcasting
 
Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streaming
 
WEEK 1
WEEK 1WEEK 1
WEEK 1
 
Videostream compression in iOS
Videostream compression in iOSVideostream compression in iOS
Videostream compression in iOS
 
Video Streaming
Video StreamingVideo Streaming
Video Streaming
 
Web 2.0 Media
Web 2.0 MediaWeb 2.0 Media
Web 2.0 Media
 
Flash and HTML5 Video
Flash and HTML5 VideoFlash and HTML5 Video
Flash and HTML5 Video
 
BDPA Open Source 2012
BDPA  Open Source  2012BDPA  Open Source  2012
BDPA Open Source 2012
 
Audio and Video streaming.ppt
Audio and Video streaming.pptAudio and Video streaming.ppt
Audio and Video streaming.ppt
 
Video Pool Idea By Renat Zarbailov
Video Pool Idea By Renat ZarbailovVideo Pool Idea By Renat Zarbailov
Video Pool Idea By Renat Zarbailov
 
Windows7: Video Improvements
Windows7: Video ImprovementsWindows7: Video Improvements
Windows7: Video Improvements
 
video tools
video toolsvideo tools
video tools
 
Multi media networking
Multi media networking Multi media networking
Multi media networking
 
Digital video
Digital videoDigital video
Digital video
 
How to Play iTunes Movies With Plex Media Ser
How to Play iTunes Movies With Plex Media SerHow to Play iTunes Movies With Plex Media Ser
How to Play iTunes Movies With Plex Media Ser
 
20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt
 
Slide
SlideSlide
Slide
 

what_is_a_codec_2010

  • 1. What Is a Codec? Or, Everything You Wanted to Know About Digital Streaming Video But Were Afraid to Ask
  • 2. What we’re NOT going to talk about:  The history of the moving image and recorded sound FlipbooksZoetropeMoviesPhonoTalkiesTV http://en.wikipedia.org/wiki/Film http://en.wikipedia.org/wiki/Audio_recording http://en.wikipedia.org/wiki/Television
  • 3. What we’re NOT going to talk about:  The Nyquist-Shannon Sampling Theorem “…shows that a bandlimited analog signal that has been sampled can be perfectly reconstructed from an infinite sequence of samples if the sampling rate exceeds 2B samples per second, where B is the highest frequency in the original signal. If a signal contains a component at exactly B hertz, then samples spaced at exactly 1/(2B) seconds do not completely determine the signal, Shannon's statement notwithstanding.” http://en.wikipedia.org/wiki/Sampling_theorem
  • 4. What we’re NOT going to talk about:  Pulse Code Modulation and uncompressed, digitized sound http://en.wikipedia.org/wiki/PCM
  • 5. What we’re NOT going to talk about:  How uncompressed, digitized video has to represent three color values (called red chroma, green chroma, and blue chroma) and three brightness values (called red luma, green luma, and blue luma) in zeroes and ones for each and every pixel, for each and every frame* *Other representational schemes (like CCIR-601) condense these values to use fewer bits-per-pixel, as the human eye sees no real difference when it’s done that way http://xiph.org/video/vid1.shtml
  • 6. What we’re NOT going to talk about:  How “uncompressed digital video” and “uncompressed digital audio” don’t really exist in today’s world http://digitalcontentproducer.com/mag/video_uncomp ressed_digital_video/
  • 7. What we ARE going to talk about:  Why your #&*$%*@# video file won’t play in QuickTime/Windows Media Player/IE/Firefox  Codecs and Containers  Web Streaming
  • 8. The Facts: The word “codec” works like the word “modem” Code-Decode Modulate-Demodulate is to as is to Codec Modem A codec is a playback algorithm that is specific to the process used when creating the media file.
  • 9. The Facts:  In order to play a video file, your computer must have a program capable of playing back videos having that specific file extension, like .MP4, .MOV, .AVI, .FLV, .VOB, or .ASF – these are known as “container formats”  And that program must have access to the codec specific to videos encoded with that codec in mind
  • 10. The Facts:  A codec can be part of the computer’s core operating system, as a codec within its multimedia playback framework, like in QuickTime or Windows Media Player  A codec can be part of a self-contained application, like in VLC Media Player or WinDVD  A codec can be part of an application’s plug-in architecture, like the Shockwave Flash plug-in used to play back Flash videos in Firefox
  • 11. The Facts:  In the early days of video playback software, only a few codecs were in use and a codec tended to be exclusive to a specific media player. This made it easy to generalize "if the filename has X extension, I'll need program Y to play it."
  • 12. The Facts:  Today, you can’t look at the dot-extension on a filename and know for certain that the program that “goes with” that container will be able to play back the video  For instance– ‘Export to QuickTime’ in Avid Media Composer produces a .MOV file that won’t play back in QuickTime on a computer that doesn’t have the Avid codecs installed
  • 13. Answers:  How can I determine which codecs are installed on my computer? Since there are three ways codecs can live on your computer, it's not so simple to do a “codec check.” If the video doesn't play at all or plays without sound or with sound and no picture (and the original tape plays back fine), you've probably got a codec issue with your media player.
  • 14. Answers:  How can I determine which codec was used to encode a file? Use VLC Media Player!
  • 17. Adding Codecs to QuickTime:  Third-party, free codec pack for the Mac– Perian  Codec pack for Windows Media codecs in QuickTime as well as the browser– Flip4Mac
  • 18. Adding Codecs to Windows Media Player:  Safe, comprehensive, free codec pack for Windows K-Lite Codec Pack (careful where you get it from) http://www.majorgeeks.com/K- Lite_Mega_Codec_Pack_d5230.html http://codecguide.com/download_k- lite_codec_pack_mega.htm
  • 19. Codecs in Video Editing Software:  In today’s world you’ll commonly convert a video file having one codec into a different video file having a different codec. Doing this is called ‘transcoding.’  Depending on which codecs are involved (which determines the complexity of the job) and the speed of your computer hardware, it may be possible to transcode media streams in real time, or even faster-than- realtime.  When you 'capture’ footage to a modern video editing suite, it’ll usually automatically transcode into the software's preferred native, internal codec, or, in Apple terms, an 'intermediate codec.' This is done to optimize video response of the software's playback window.
  • 20. Web Streaming:  Guess what? It’s ALL streaming!  Within the container, audio and video streams can be ‘muxed’ or ‘de-muxed,’ that is, seen as separate streams by the media player or as a single, integrated stream (VLC can show you which streams in your container are muxed and which ones aren’t)  Each stream is pulled through the player at a different rate– think of this as the bitrate for playback
  • 21. Web Streaming Protocols:  When you’re streaming media over a network connection, the protocol serves as your container  RTSP– Real Time Streaming Protocol– used by RealMedia/RealVideo/RealAudio and QuickTime Streaming  RTMP– Real Time Messaging Protocol– used for Flash video/audio only  MMS– Microsoft Media Services  HTTP streaming media/HTML5

Editor's Notes

  1. CUE: after first point (don’t read asterisked text) And that’s not counting sound!
  2. CUE: after first point More about containers later on…
  3. CUE: before slide text So where do codecs live on your computer? CUE: after first point QuickTime codecs are available to other all programs that leverage QuickTime for media playback, by the way. A lot of free software does this… CUE: after second point We’ll be talking more about VLC and free vs. paid codecs later…
  4. CUE: after first point In fact, only the very first MPEG video codec (today known as MPEG1) was common to early versions of both QuickTime and Windows Media Player, and RealPlayer was the only player that handled its media type(s).
  5. CUE: after first point If the program that “goes with” that container doesn’t contain the necessary codec, you’re out of luck. It’s the price of freedom– people sided with their favorite media player and demanded it start to overlap its supported container types.
  6. CUE: after slide text …or you might have a corrupt media file.
  7. CUE: after slide text It doesn’t cost anything, it’s open source software, it’s available for Mac, Windows, and Linux. And as a bonus, it’ll play back almost anything ‘cause it has about every codec you’d ever need built-in.
  8. CUE: before slide text You might already have VLC in your Applications folder! It’s definitely installed on the multimedia workstations at the Missourian and in the Futures Lab…
  9. CUE: before slide text All my VLC examples are from the Mac version… Find any random piece of media and open it in VLC. Control-click the file, and tell it to Open With VLC. It’ll start to play automatically– just hit the space bar to pause. Then hit Command-I and click the Codec Details tab. The picture on this slide shows what you’ll see after you expand the triangles next to the two streams, and in this picture I’ve opened a tutorial video I edited and exported using iMovie. Stream Zero is the video track, and we can see this sample file’s video uses the H.264 codec, with a 29.97 fps frame rate and video window dimensions of 960x540 pixels. Stream One is the audio track, and we can see this sample file’s audio uses MPEG AAC codec, it’s in stereo, and uses 44.1khz sample rate
  10. CUE: before slide text While VLC is a decent video player and it comes with loads of codecs pre-installed, there are times when you’d rather use another program to show your media. Personally, I’d rather show a .MOV-container-type video file using QuickTime Player than use VLC for the job. So how do you get new codecs into QuickTime? Luckily, you have some options for easily adding a bunch of third-party codecs at once. On the Mac, there’s Perian and Flip4Mac. There’s some amount of overlap in the codecs provided by Perian and Flip4Mac, but I haven’t seen anything negative from having both installed on the same machine. One thing Flip4Mac gives that Perian does not– Mac browser support for Windows Streaming Media
  11. CUE: after slide text *be VERY WARY of anything popping up on your screen informing you that you need 'Codec X' in order to play back a media file you found online or were sent in an email* If you've already got a common codec pack installed on your computer, you should already be able to play the file back, if it's a legit file. Chances are they're just trying to get you to pay for something you don't need or are trying to trick you into installing malware onto your computer.
  12. CUE: after first point Doesn’t matter if we’re talking local playback or playback over a network connection. When you're playing any audio or video file on your local computer-- leaving out the Internet entirely, for now-- the program playing the file looks at the binary data composing the media file sequentially like pulling a string of beads through your fingers-- the speed at which it's being pulled through is like the "bitrate" in kbps. The media player tries to play back the file at the bitrate it was recorded at. the string of beads is a "stream" of zeroes and ones, and every stream of data needs to have some structure to let us know what's sound and what's picture data (and what data belongs to which frame if we're talking video)– it’s technically the encoding scheme that applies this structure. The container lets us bundle one or more streams as a single media file. CUE: after second point Muxing is most evident with audio tracks. If a track shows up as ‘stereo’ in a single stream, you know it’s muxed (left and right). It would be possible to extract just the left or just the right channel by first separating the audio track and then ‘de-muxing’ it into left and right.