SlideShare ist ein Scribd-Unternehmen logo
1 von 33
A gentle(*) introduction to video encoding (*)for some definition of “gentle” Mark Pilgrim January 8, 2009
Video is everywhere Handhelds iPod, cell phone, PSP, Archos Internet YouTube, Daily Motion, Metacafe Television Broadcast, cable, DVD, Blu-Ray “ It’s a bird…It’s a plane…It’s…Beauregard!” PCs QuickTime, Windows Media Player, VLC
Video is everywhere But how does it get there?
Encoding process Source material (video + audio) Raw video Compressed video Demuxing  separates streams Encoding  compresses streams Single video file Muxing  combines streams again Raw audio Compressed audio
Encoding process Source material (video + audio) Raw video Compressed video Single video file Raw audio Compressed audio Time-coded captions Hey, don’t forget about accessibility! Transcription
The Zen of video encoding
Elements of a video The  video container  holds it all together 4 The  caption format   defines when captions are displayed 3 The  audio codec   defines how waveforms are compressed 2 The  video codec  defines how the pixels are compressed 1
How to choose the right formats Pick a  video container  that works on your target platform 4 Pick a  caption format   that works on your target platform 3 Pick a  audio codec   that works on your target platform 2 Pick a  video codec  that works on your target platform 1
Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Zen of video encoding “ There is no right or wrong; there is only what works and what doesn’t.”
Video codecs The wool pulled over your eyes to blind you from the truth
What is a video codec? “ A video codec defines the compression algorithm used to store the array of pixels that are eventually displayed on the screen.” … and they cheat. A lot. And hope you won’t notice.
Acronym overload: video codecs Dirac Theora VC-1 WMV H.264 MPEG-4 ASP MPEG-2 MPEG-1 WTF? “ I could tell by the pixels…”
Common video codecs (*) As far as we know Source: Wikipedia No YouTube, Google Video MPEG WG H.263 HDTV broadcast Free Software hippies Blu-Ray Microsoft world domination YouTube HD, iTunes, Blu-Ray Movie pirates DVD VCD Popular usage Yes* On2, Xiph.org Theora No Microsoft VC-1 Yes* BBC Dirac No Microsoft WMV No MPEG WG MPEG-2 No MPEG WG MPEG-1 No MPEG WG H.264 No MPEG WG MPEG-4 ASP Patent-free? Inventor Codec name
Video encoders Source: DigitalContentProducer.com, doom9.org, Wikipedia Adobe Premiere ffmpeg H.263 none none Windows Media Encoder, Compressor, Squeeze Windows Media Encoder, Expression Encoder Adobe Media Encoder, Apple Compressor, On2 Flix Pro, Sorenson Squeeze, Telestream DivX, 3ivX Compressor, Sonic, TMPGEnc QuickTime Non-OSS tools oggenc, Thusnelda Theora none VC-1 dirac-research, Schroedinger Dirac none WMV ffmpeg, mpeg2enc MPEG-2 ffmpeg, MP1E MPEG-1 x264 H.264 ffmpeg, Xvid MPEG-4 ASP OSS tools Codec name
Audio codecs The hand is quicker than the ear
What is an audio codec? “ An audio codec defines the compression algorithm used to store the waveforms that are eventually played through your speakers.” … and they cheat, too.
Acronym overload: audio codecs DTS AC3 Vorbis WMA AAC MP3 MP2 AMR Seriously, WTF? “ Can you hear me now?”
Common audio codecs (*) As far as we know Source: Wikipedia No iPod, iTunes Store videos MPEG WG AAC Blu-Ray DVD Free Software hippies Microsoft world domination Music VCD, DVD, digital TV Ringtones, VoIP Popular usage No DTS Inc. DTS No Dolby AC3 Yes* Xiph.org Vorbis No MPEG WG MP2 No 3GPP AMR No Microsoft WMA No MPEG WG MP3 Patent-free? Owner Codec name
Audio encoders Sources: HydrogenAudio.org, Wikipedia iTunes, Nero FAAC AAC DTS, Inc. Dolby none Windows Media Encoder iTunes Audio Transcoder, Easy CD-DA Extractor 3GPP reference encoder Non-OSS tools none DTS ffmpeg, Aften AC3 ffmpeg, aoTuV Vorbis TwoLAME MP2 ffmpeg, RetroCode AMR ffmpeg WMA LAME MP3 OSS tools Codec name
Captioning formats Just shoot me
What is a captioning format? “ A captioning format defines when, where, and how captions for the hearing impaired are displayed on screen while a video is playing.” … Some formats are reused for subtitles, translations, & commentary.
Acronym overload: caption formats DVD MP4TT SMIL SAMI ASS (really) SRT Teletext Line 21 Baby Jesus cries “ No, I can’t hear you now. What else ya got?”
Overview of caption formats Source: Wikipedia DVD Stored as images DVD-Forum DVD Analog TV (Europe) custom BBC et. al. Teletext Analog TV (US + Canada) pseudo-ASCII Electronic Industries Alliance Line 21 UTF-8 (multiple) (multiple) UTF-8 windows-1252 Encoding Windows Media Player MSDN page SAMI MP4 files, iTunes Store QuickTime (SMIL 1.0 only) AVI files, “fansubbing” AVI files, “fansubbing” Popular usage ISO 14966-17 MPEG-4 Timed Text A doom9.org forum post from 2004 SubRip W3C Recommendation SMIL Some Word document floating around the net Advanced SubStation Alpha Spec Caption format
Container formats … those should be simple, right?
What is a video container? “ A container format defines how video tracks, audio tracks, captions, and metadata are stored together in a single file.” … like a ZIP archive
Video metadata ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Metadata matters Without human-readable metadata, the iTunes Store would look like this: Source: list of top movies from RottenTomatoes.com $9.99 The.Chronicles.Of.Narnia.Prince.Caspian.2008.SciFi.Fantasy.720x480.02h29m.m4v $9.99 Smart.People.2008.Comedy.720x480.01h35m.m4v $9.99 Iron.Man.2008.Action.Adventure.720x480.02h42m.m4v $9.99 Kung.Fu.Panda.2008.Animation.Comedy.720x480.01h50m.m4v $9.99 WALL-E.2008.Animation.Action.Adventure.720x480.01h38m.m4v $9.99 Step.Brothers.2008.Comedy.720x480.01h45m.m4v $9.99 Wanted.2008.Action.Adventure.720x480.01h50m.m4v $9.99 Hancock.2008.Action.Adventure.720x480.01h42m.m4v
Acronym overload: container formats EVO VOB ASF OGG FLV MP4 MKV AVI LOL One ring to rule them all, and in the darkness bind them.
Overview of container formats (*) Seriously, some guys in Russia. They contributed it to the public domain, so technically you own it. Source: Wikipedia ffmpeg, MP4Box, mp4creator MPEG-LA .MP4, .M4V MPEG-4 ffmpeg Apple .MOV QuickTime ffmpeg, oggmux Xiph.org .OGG Ogg ffmpeg (in progress) Microsoft .ASF, .WMV Advanced Systems Format ffmpeg,  AVIMux-GUI Microsoft .AVI Audio/Video Interchange ffmpeg, mkvtoolnix Some guys in Russia* .MKV Matroska ffmpeg Adobe .FLV Flash Video OSS tools Owner Extension Container Name
Putting it all together Where’s the kaboom? There was supposed to be an Earth-shattering kaboom!
Common combinations Source: Wikipedia SAMI WMA WMV, VC-1 ASF Windows Kate Vorbis Theora OGG Linux QTTextTrack AAC H.264 MOV Mac/QuickTime SRT, ASS MP3 MPEG-4 ASP AVI DVD pirates Blu-Ray subtitles (SUP) AC3, DTS H.264, VC-1 EVOB Blu-Ray SRT, ASS AC3, DTS H.264 MKV Blu-Ray pirates MP4 MP4 MP4 FLV VOB Container Custom, if any MP3 H.263 Flash 8 Line 21, DVD subtitles AC3 MPEG-2 DVD AAC+AC3 AAC AAC Audio MPEG-4 Timed Text H.264 iPod/iPhone MPEG-4 Timed Text Flash Timed Text Captions H.264 Flash 9+ H.264 AppleTV Video Platform/Audience
Thank You! Q&A

Weitere ähnliche Inhalte

Andere mochten auch

Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streamingRohan Bhatkar
 
7th Gen AMD A-Series Announcement
7th Gen AMD A-Series Announcement7th Gen AMD A-Series Announcement
7th Gen AMD A-Series AnnouncementKok Kee
 
NFV for beginners
NFV for beginnersNFV for beginners
NFV for beginnersDave Neary
 
NFV : Virtual Network Function Architecture
NFV : Virtual Network Function ArchitectureNFV : Virtual Network Function Architecture
NFV : Virtual Network Function Architecturesidneel
 

Andere mochten auch (6)

Bgp (1)
Bgp (1)Bgp (1)
Bgp (1)
 
AMD FreeSync 2
AMD FreeSync 2 AMD FreeSync 2
AMD FreeSync 2
 
Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streaming
 
7th Gen AMD A-Series Announcement
7th Gen AMD A-Series Announcement7th Gen AMD A-Series Announcement
7th Gen AMD A-Series Announcement
 
NFV for beginners
NFV for beginnersNFV for beginners
NFV for beginners
 
NFV : Virtual Network Function Architecture
NFV : Virtual Network Function ArchitectureNFV : Virtual Network Function Architecture
NFV : Virtual Network Function Architecture
 

Ähnlich wie A gentle introduction to video encoding [diveintomark]

Intro to Compression: Audio and Video Optimization for Learning
Intro to Compression: Audio and Video Optimization for LearningIntro to Compression: Audio and Video Optimization for Learning
Intro to Compression: Audio and Video Optimization for LearningNick Floro
 
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)Roy Santos Necesario
 
New Media Video Overview
New Media Video OverviewNew Media Video Overview
New Media Video Overviewtoddatmtsu
 
BD/BRrip, DVDrip, R5, PPVrip, TS, etc..
BD/BRrip, DVDrip, R5, PPVrip, TS, etc..BD/BRrip, DVDrip, R5, PPVrip, TS, etc..
BD/BRrip, DVDrip, R5, PPVrip, TS, etc..Steve Brown
 
what_is_a_codec_2010
what_is_a_codec_2010what_is_a_codec_2010
what_is_a_codec_2010Justin Giles
 
HTML5 Multimedia Accessibility
HTML5 Multimedia AccessibilityHTML5 Multimedia Accessibility
HTML5 Multimedia Accessibilitybrucelawson
 
02.m3 cms sys-req4mediastreaming
02.m3 cms sys-req4mediastreaming02.m3 cms sys-req4mediastreaming
02.m3 cms sys-req4mediastreamingtarensi
 
Streaming Media over the Internet
Streaming Media over the InternetStreaming Media over the Internet
Streaming Media over the InternetVideoguy
 
Introduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and ProcessesIntroduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and ProcessesPrestoCentre
 
12.m3 cms content-updating-pt3
12.m3 cms content-updating-pt312.m3 cms content-updating-pt3
12.m3 cms content-updating-pt3tarensi
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyVideoguy
 

Ähnlich wie A gentle introduction to video encoding [diveintomark] (20)

video tools
video toolsvideo tools
video tools
 
Intro to Compression: Audio and Video Optimization for Learning
Intro to Compression: Audio and Video Optimization for LearningIntro to Compression: Audio and Video Optimization for Learning
Intro to Compression: Audio and Video Optimization for Learning
 
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)
 
Encoding
EncodingEncoding
Encoding
 
Slide
SlideSlide
Slide
 
New Media Video Overview
New Media Video OverviewNew Media Video Overview
New Media Video Overview
 
BD/BRrip, DVDrip, R5, PPVrip, TS, etc..
BD/BRrip, DVDrip, R5, PPVrip, TS, etc..BD/BRrip, DVDrip, R5, PPVrip, TS, etc..
BD/BRrip, DVDrip, R5, PPVrip, TS, etc..
 
what_is_a_codec_2010
what_is_a_codec_2010what_is_a_codec_2010
what_is_a_codec_2010
 
Video Meets Documentation
Video Meets DocumentationVideo Meets Documentation
Video Meets Documentation
 
HTML5 Multimedia Accessibility
HTML5 Multimedia AccessibilityHTML5 Multimedia Accessibility
HTML5 Multimedia Accessibility
 
Codecs
CodecsCodecs
Codecs
 
02.m3 cms sys-req4mediastreaming
02.m3 cms sys-req4mediastreaming02.m3 cms sys-req4mediastreaming
02.m3 cms sys-req4mediastreaming
 
Codecs
CodecsCodecs
Codecs
 
Streaming Media over the Internet
Streaming Media over the InternetStreaming Media over the Internet
Streaming Media over the Internet
 
Introduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and ProcessesIntroduction to Transcoding: Tools and Processes
Introduction to Transcoding: Tools and Processes
 
12.m3 cms content-updating-pt3
12.m3 cms content-updating-pt312.m3 cms content-updating-pt3
12.m3 cms content-updating-pt3
 
Video1 history concepts
Video1 history conceptsVideo1 history concepts
Video1 history concepts
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information Technology
 
Dcp
DcpDcp
Dcp
 
Bigger Hard Drive Jamie Lean
Bigger Hard Drive Jamie LeanBigger Hard Drive Jamie Lean
Bigger Hard Drive Jamie Lean
 

Kürzlich hochgeladen

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

A gentle introduction to video encoding [diveintomark]

  • 1. A gentle(*) introduction to video encoding (*)for some definition of “gentle” Mark Pilgrim January 8, 2009
  • 2. Video is everywhere Handhelds iPod, cell phone, PSP, Archos Internet YouTube, Daily Motion, Metacafe Television Broadcast, cable, DVD, Blu-Ray “ It’s a bird…It’s a plane…It’s…Beauregard!” PCs QuickTime, Windows Media Player, VLC
  • 3. Video is everywhere But how does it get there?
  • 4. Encoding process Source material (video + audio) Raw video Compressed video Demuxing separates streams Encoding compresses streams Single video file Muxing combines streams again Raw audio Compressed audio
  • 5. Encoding process Source material (video + audio) Raw video Compressed video Single video file Raw audio Compressed audio Time-coded captions Hey, don’t forget about accessibility! Transcription
  • 6. The Zen of video encoding
  • 7. Elements of a video The video container holds it all together 4 The caption format defines when captions are displayed 3 The audio codec defines how waveforms are compressed 2 The video codec defines how the pixels are compressed 1
  • 8. How to choose the right formats Pick a video container that works on your target platform 4 Pick a caption format that works on your target platform 3 Pick a audio codec that works on your target platform 2 Pick a video codec that works on your target platform 1
  • 9.
  • 10. The Zen of video encoding “ There is no right or wrong; there is only what works and what doesn’t.”
  • 11. Video codecs The wool pulled over your eyes to blind you from the truth
  • 12. What is a video codec? “ A video codec defines the compression algorithm used to store the array of pixels that are eventually displayed on the screen.” … and they cheat. A lot. And hope you won’t notice.
  • 13. Acronym overload: video codecs Dirac Theora VC-1 WMV H.264 MPEG-4 ASP MPEG-2 MPEG-1 WTF? “ I could tell by the pixels…”
  • 14. Common video codecs (*) As far as we know Source: Wikipedia No YouTube, Google Video MPEG WG H.263 HDTV broadcast Free Software hippies Blu-Ray Microsoft world domination YouTube HD, iTunes, Blu-Ray Movie pirates DVD VCD Popular usage Yes* On2, Xiph.org Theora No Microsoft VC-1 Yes* BBC Dirac No Microsoft WMV No MPEG WG MPEG-2 No MPEG WG MPEG-1 No MPEG WG H.264 No MPEG WG MPEG-4 ASP Patent-free? Inventor Codec name
  • 15. Video encoders Source: DigitalContentProducer.com, doom9.org, Wikipedia Adobe Premiere ffmpeg H.263 none none Windows Media Encoder, Compressor, Squeeze Windows Media Encoder, Expression Encoder Adobe Media Encoder, Apple Compressor, On2 Flix Pro, Sorenson Squeeze, Telestream DivX, 3ivX Compressor, Sonic, TMPGEnc QuickTime Non-OSS tools oggenc, Thusnelda Theora none VC-1 dirac-research, Schroedinger Dirac none WMV ffmpeg, mpeg2enc MPEG-2 ffmpeg, MP1E MPEG-1 x264 H.264 ffmpeg, Xvid MPEG-4 ASP OSS tools Codec name
  • 16. Audio codecs The hand is quicker than the ear
  • 17. What is an audio codec? “ An audio codec defines the compression algorithm used to store the waveforms that are eventually played through your speakers.” … and they cheat, too.
  • 18. Acronym overload: audio codecs DTS AC3 Vorbis WMA AAC MP3 MP2 AMR Seriously, WTF? “ Can you hear me now?”
  • 19. Common audio codecs (*) As far as we know Source: Wikipedia No iPod, iTunes Store videos MPEG WG AAC Blu-Ray DVD Free Software hippies Microsoft world domination Music VCD, DVD, digital TV Ringtones, VoIP Popular usage No DTS Inc. DTS No Dolby AC3 Yes* Xiph.org Vorbis No MPEG WG MP2 No 3GPP AMR No Microsoft WMA No MPEG WG MP3 Patent-free? Owner Codec name
  • 20. Audio encoders Sources: HydrogenAudio.org, Wikipedia iTunes, Nero FAAC AAC DTS, Inc. Dolby none Windows Media Encoder iTunes Audio Transcoder, Easy CD-DA Extractor 3GPP reference encoder Non-OSS tools none DTS ffmpeg, Aften AC3 ffmpeg, aoTuV Vorbis TwoLAME MP2 ffmpeg, RetroCode AMR ffmpeg WMA LAME MP3 OSS tools Codec name
  • 22. What is a captioning format? “ A captioning format defines when, where, and how captions for the hearing impaired are displayed on screen while a video is playing.” … Some formats are reused for subtitles, translations, & commentary.
  • 23. Acronym overload: caption formats DVD MP4TT SMIL SAMI ASS (really) SRT Teletext Line 21 Baby Jesus cries “ No, I can’t hear you now. What else ya got?”
  • 24. Overview of caption formats Source: Wikipedia DVD Stored as images DVD-Forum DVD Analog TV (Europe) custom BBC et. al. Teletext Analog TV (US + Canada) pseudo-ASCII Electronic Industries Alliance Line 21 UTF-8 (multiple) (multiple) UTF-8 windows-1252 Encoding Windows Media Player MSDN page SAMI MP4 files, iTunes Store QuickTime (SMIL 1.0 only) AVI files, “fansubbing” AVI files, “fansubbing” Popular usage ISO 14966-17 MPEG-4 Timed Text A doom9.org forum post from 2004 SubRip W3C Recommendation SMIL Some Word document floating around the net Advanced SubStation Alpha Spec Caption format
  • 25. Container formats … those should be simple, right?
  • 26. What is a video container? “ A container format defines how video tracks, audio tracks, captions, and metadata are stored together in a single file.” … like a ZIP archive
  • 27.
  • 28. Metadata matters Without human-readable metadata, the iTunes Store would look like this: Source: list of top movies from RottenTomatoes.com $9.99 The.Chronicles.Of.Narnia.Prince.Caspian.2008.SciFi.Fantasy.720x480.02h29m.m4v $9.99 Smart.People.2008.Comedy.720x480.01h35m.m4v $9.99 Iron.Man.2008.Action.Adventure.720x480.02h42m.m4v $9.99 Kung.Fu.Panda.2008.Animation.Comedy.720x480.01h50m.m4v $9.99 WALL-E.2008.Animation.Action.Adventure.720x480.01h38m.m4v $9.99 Step.Brothers.2008.Comedy.720x480.01h45m.m4v $9.99 Wanted.2008.Action.Adventure.720x480.01h50m.m4v $9.99 Hancock.2008.Action.Adventure.720x480.01h42m.m4v
  • 29. Acronym overload: container formats EVO VOB ASF OGG FLV MP4 MKV AVI LOL One ring to rule them all, and in the darkness bind them.
  • 30. Overview of container formats (*) Seriously, some guys in Russia. They contributed it to the public domain, so technically you own it. Source: Wikipedia ffmpeg, MP4Box, mp4creator MPEG-LA .MP4, .M4V MPEG-4 ffmpeg Apple .MOV QuickTime ffmpeg, oggmux Xiph.org .OGG Ogg ffmpeg (in progress) Microsoft .ASF, .WMV Advanced Systems Format ffmpeg, AVIMux-GUI Microsoft .AVI Audio/Video Interchange ffmpeg, mkvtoolnix Some guys in Russia* .MKV Matroska ffmpeg Adobe .FLV Flash Video OSS tools Owner Extension Container Name
  • 31. Putting it all together Where’s the kaboom? There was supposed to be an Earth-shattering kaboom!
  • 32. Common combinations Source: Wikipedia SAMI WMA WMV, VC-1 ASF Windows Kate Vorbis Theora OGG Linux QTTextTrack AAC H.264 MOV Mac/QuickTime SRT, ASS MP3 MPEG-4 ASP AVI DVD pirates Blu-Ray subtitles (SUP) AC3, DTS H.264, VC-1 EVOB Blu-Ray SRT, ASS AC3, DTS H.264 MKV Blu-Ray pirates MP4 MP4 MP4 FLV VOB Container Custom, if any MP3 H.263 Flash 8 Line 21, DVD subtitles AC3 MPEG-2 DVD AAC+AC3 AAC AAC Audio MPEG-4 Timed Text H.264 iPod/iPhone MPEG-4 Timed Text Flash Timed Text Captions H.264 Flash 9+ H.264 AppleTV Video Platform/Audience