SlideShare una empresa de Scribd logo
1 de 14
MEDIA ENCODING
Why and how audio and video are encoded
Media encoding overview
Encoding media
 Encoding refers to the conversion of media files
from one form to another (compression)
 Encoding is performed for the following purposes
 Compressing a file to a smaller size (data / frame
size)
 Making it usable on a particular device / software
player
 Practically all audio and video is encoded and
compressed for distribution
 Uncompressed audio and video are retained for
archiving and re-use / re-encoding
Encoding > Decoding flow
Data
File
Stream Stream
Webcam
Microphone
OB Unit / Studio
Control room
Uncompressed Video
Uncompressed audio
Compresse
d data file
Compressed
stream
Local
Storage
Transport
Network (www)
Data
File
Encoding
Engine
Encoding
Engine
Decoding
Engine
Transcoding
 The techniques used for transcoding are the same as for
encoding
 The goal of transcoding is not to get a file down to a
small size (compression)
 Transcoding can be seen as ‘translating’ from one form
to another maintaining maximum quality
 Example: some editing systems may not be capable of
processing a particular type of video – footage is
transcoded to a form that can be used
Digital Media Files
 Containers (Wrappers)
 Encoded media is stored within container formats
 Containers ‘store’ encoded audio and / or audio ‘streams’
 Containers also contain metadata needed for the player to
make ‘sense’ of the enclosed media formats
 Container formats include Quicktime (MOV), RealMedia
(RM), MPEG and OGG (open source format)
 IMPORTANT: Container formats do not describe the manner
in which a file has been encoded
 A QT file might not play in QuickTime on a particular machine
 The software requires the appropriate Codec to be installed >>>
Digital Media Files - CoDecs

Whether or not a file will play depends on its codec
 Codec refers to the particular encoding method (algorithm) used
to compress and decompress a piece of media
(COmpress – DECompress)
 Codecs specifically describe the type of video or audio
compression used
 Certain codecs play almost universally (MPEG4)
 Some codecs may require plugins to be installed for playback
(Vorbis (OGG), VP3 (Theora))
Encoding applications
Encoding is done at the following points
 AV production applications (from the timeline)
 Final Cut Pro (native & via compressor)
 Protools
 Within bespoke compression applications
 Adobe medi Encoder (PC / MAC)
 Compressor (Apple)
 MediaCoder (open source)
 As import / export options on media players
 iTunes (import)
 QuickTime Pro (export options)
 On websites such as YouTube (FFMPEG server side
encoder)
Some encoding applications offer more control than
others
Lossless and lossy
compression
Lossless
 Refers to any file type that is a true (verbatim) copy of
the original
 No quality has been lost in saving a file in the following
formats
 Lossless Audio – Flac, WavPac, Monkey’s Audio, ALAC
 Lossless Video – Animation Codec, Huffyuv, Uncompressed
 Lossless Graphics – Gif, PNG, Tiff
 A basic example of lossless compression methods
include RLE (Run Length Encoding)
 Using the following as an abstraction of the data used to
store a segment of audio –
[AAAAABBCCCCCDEEEEEEE]= 20bytes
 RLE would look at the ‘run lengths’ or repeated adjacent
runs of data and summarise them as A5B2C5D1E7 =
10bytes
Lossless and lossy
compression
Lossy
 File formats and codecs where a file may look or sound acceptable
or as good as the original but is in fact a degraded copy
 Lossy file formats include
 Lossy Audio – AAC, Mp3, Vorbis
 Lossy video – M2V, H.264,
 Lossy Graphics – Jpeg,
 Lossy compression approximates data in order to make easily
represented sequences of data
 A (very) basic example is to use a similar scenario as before
 AAAAABAAAAA represents a signal or series of pixels (11
bytes)
 The compression could represent it as A5B1A5 (6 bytes lossless)
 Lossy compression decides that the discrepancy is not significant
enough to record so instead approximates it back to A (A11 = 2 bytes)
Redundancy
 File compression uses systems based around redundancy
 Redundant elements are parts of the sound or image that are
not required to be recorded (written) as data in the
compressed file
 Audio uses psychoacoustic principles to determine which
sounds can be omitted without adversely affecting the overall
quality (low / high frequencies, hiss, overlapping sounds)
 Video uses pixel colour data to determine redundancies
(see next slides)
 Different codecs and encoders view and process these
redundancies in different ways (algorithms) with different
results
 Redundancy can be broken into two categories
 Objective redundancy
Objective redundancy in
imagery
• An area of pure black is detected (area spans 15,300 pixels all black)
• The area is mapped between 4 points (corners of green rectangle)
• 15,300 pieces of information can be reduced to 5 pieces of information
• That information can then be decoded in the player and rendered exactly as it was
Subjective redundancy in
imagery
• An area is detected where the pixels are similar in colour (all black / dark grey)
• The encoder decides that the difference is negligible (won’t be noticed)
• The area is mapped similarly to before using 1 colour value
• Information has been discarded and the quality of the compresses file is less
than the original
Compressing
 The goal of compression is to get the smallest file size
while retaining maximum ‘meaningful’ information
(fidelity / clarity)
 Compression is always a trade-off between quality
and file size
 The same principle applies to audio / video as to
graphics
 Always work from a high quality source
 Never compress already compressed media (generation
loss)
 Always retain (archive) a high quality original for future
work

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Analog Digital Video
Analog Digital Video Analog Digital Video
Analog Digital Video
 
Chapter 6 : VIDEO
Chapter 6 : VIDEOChapter 6 : VIDEO
Chapter 6 : VIDEO
 
Audio compression 1
Audio compression 1Audio compression 1
Audio compression 1
 
Mpeg 2 transport streams
Mpeg 2 transport streamsMpeg 2 transport streams
Mpeg 2 transport streams
 
Graphics
GraphicsGraphics
Graphics
 
Basics of audio coding
Basics of audio codingBasics of audio coding
Basics of audio coding
 
DIGITAL DATA - Lucía & Luis
DIGITAL DATA - Lucía & LuisDIGITAL DATA - Lucía & Luis
DIGITAL DATA - Lucía & Luis
 
Digital data - Luis Bazaga & Lucía Rubio
Digital data - Luis Bazaga & Lucía RubioDigital data - Luis Bazaga & Lucía Rubio
Digital data - Luis Bazaga & Lucía Rubio
 
H263.ppt
H263.pptH263.ppt
H263.ppt
 
Video
VideoVideo
Video
 
H261
H261H261
H261
 
digital_set_top_box
digital_set_top_boxdigital_set_top_box
digital_set_top_box
 
Digital video
Digital videoDigital video
Digital video
 
Digital video
Digital videoDigital video
Digital video
 
Video
VideoVideo
Video
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information Technology
 
Multimedia seminar ppt
Multimedia seminar pptMultimedia seminar ppt
Multimedia seminar ppt
 
Mm video
Mm videoMm video
Mm video
 
Stb
StbStb
Stb
 
Introduction to BeagleBoard-xM
Introduction to BeagleBoard-xMIntroduction to BeagleBoard-xM
Introduction to BeagleBoard-xM
 

Destacado

Encoding/Decoding Stuart Hall
Encoding/Decoding Stuart HallEncoding/Decoding Stuart Hall
Encoding/Decoding Stuart HallNic JM
 
Externally set assignment 2012.13 anchorage
Externally set assignment 2012.13 anchorageExternally set assignment 2012.13 anchorage
Externally set assignment 2012.13 anchorageSimon Gummer
 
Popular Music - AS COMMS
Popular Music - AS COMMSPopular Music - AS COMMS
Popular Music - AS COMMSSimon Gummer
 
Encoding decoding model
Encoding decoding modelEncoding decoding model
Encoding decoding modelHannahCostello
 
Margiela Presentation
Margiela PresentationMargiela Presentation
Margiela Presentationnatasyalund
 
Music video – some theory to apply gcse
Music video – some theory to apply gcseMusic video – some theory to apply gcse
Music video – some theory to apply gcseDB3igs
 

Destacado (9)

Encoding/Decoding Stuart Hall
Encoding/Decoding Stuart HallEncoding/Decoding Stuart Hall
Encoding/Decoding Stuart Hall
 
Externally set assignment 2012.13 anchorage
Externally set assignment 2012.13 anchorageExternally set assignment 2012.13 anchorage
Externally set assignment 2012.13 anchorage
 
Popular Music - AS COMMS
Popular Music - AS COMMSPopular Music - AS COMMS
Popular Music - AS COMMS
 
Graphic ideology: An intro to semiotics
Graphic ideology: An intro to semioticsGraphic ideology: An intro to semiotics
Graphic ideology: An intro to semiotics
 
Encoding decoding model
Encoding decoding modelEncoding decoding model
Encoding decoding model
 
Margiela Presentation
Margiela PresentationMargiela Presentation
Margiela Presentation
 
Homonym & polysemy
Homonym & polysemyHomonym & polysemy
Homonym & polysemy
 
Audience theory
Audience theoryAudience theory
Audience theory
 
Music video – some theory to apply gcse
Music video – some theory to apply gcseMusic video – some theory to apply gcse
Music video – some theory to apply gcse
 

Similar a Media Encoding

4 multimedia elements - video
4   multimedia elements - video4   multimedia elements - video
4 multimedia elements - videoKelly Bauer
 
Data Communication & Computer network: Data compression
Data Communication & Computer network: Data compressionData Communication & Computer network: Data compression
Data Communication & Computer network: Data compressionDr Rajiv Srivastava
 
Video compression
Video compressionVideo compression
Video compressionDarkNight14
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layerSerious_SamSoul
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdfPUSHKAR ARYA
 
Ott Streaming Protocols and DRM
Ott Streaming Protocols and DRMOtt Streaming Protocols and DRM
Ott Streaming Protocols and DRMASIMYILDIZ
 
Multimedia applications
Multimedia applicationsMultimedia applications
Multimedia applicationssmoky_stu
 
Ch07_-_Multimedia_Element-Video_1_.ppt
Ch07_-_Multimedia_Element-Video_1_.pptCh07_-_Multimedia_Element-Video_1_.ppt
Ch07_-_Multimedia_Element-Video_1_.pptdjempol
 

Similar a Media Encoding (20)

Codecs
CodecsCodecs
Codecs
 
4 multimedia elements - video
4   multimedia elements - video4   multimedia elements - video
4 multimedia elements - video
 
Chap62
Chap62Chap62
Chap62
 
Data Communication & Computer network: Data compression
Data Communication & Computer network: Data compressionData Communication & Computer network: Data compression
Data Communication & Computer network: Data compression
 
Video compression
Video compressionVideo compression
Video compression
 
CHAPTER – 6 Video
CHAPTER – 6    VideoCHAPTER – 6    Video
CHAPTER – 6 Video
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
 
lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
 
Ott Streaming Protocols and DRM
Ott Streaming Protocols and DRMOtt Streaming Protocols and DRM
Ott Streaming Protocols and DRM
 
Codecs
CodecsCodecs
Codecs
 
Multimedia applications
Multimedia applicationsMultimedia applications
Multimedia applications
 
Video-Editing Techniques.pptx
Video-Editing Techniques.pptxVideo-Editing Techniques.pptx
Video-Editing Techniques.pptx
 
Ch07_-_Multimedia_Element-Video_1_.ppt
Ch07_-_Multimedia_Element-Video_1_.pptCh07_-_Multimedia_Element-Video_1_.ppt
Ch07_-_Multimedia_Element-Video_1_.ppt
 
Chap55
Chap55Chap55
Chap55
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Mm Unit 4
Mm Unit 4Mm Unit 4
Mm Unit 4
 
WEEK 1
WEEK 1WEEK 1
WEEK 1
 
Compression
CompressionCompression
Compression
 
1.1.3 DATA STORAGE
1.1.3 DATA STORAGE1.1.3 DATA STORAGE
1.1.3 DATA STORAGE
 

Último

PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 

Último (20)

PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 

Media Encoding

  • 2. Why and how audio and video are encoded Media encoding overview
  • 3. Encoding media  Encoding refers to the conversion of media files from one form to another (compression)  Encoding is performed for the following purposes  Compressing a file to a smaller size (data / frame size)  Making it usable on a particular device / software player  Practically all audio and video is encoded and compressed for distribution  Uncompressed audio and video are retained for archiving and re-use / re-encoding
  • 4. Encoding > Decoding flow Data File Stream Stream Webcam Microphone OB Unit / Studio Control room Uncompressed Video Uncompressed audio Compresse d data file Compressed stream Local Storage Transport Network (www) Data File Encoding Engine Encoding Engine Decoding Engine
  • 5. Transcoding  The techniques used for transcoding are the same as for encoding  The goal of transcoding is not to get a file down to a small size (compression)  Transcoding can be seen as ‘translating’ from one form to another maintaining maximum quality  Example: some editing systems may not be capable of processing a particular type of video – footage is transcoded to a form that can be used
  • 6. Digital Media Files  Containers (Wrappers)  Encoded media is stored within container formats  Containers ‘store’ encoded audio and / or audio ‘streams’  Containers also contain metadata needed for the player to make ‘sense’ of the enclosed media formats  Container formats include Quicktime (MOV), RealMedia (RM), MPEG and OGG (open source format)  IMPORTANT: Container formats do not describe the manner in which a file has been encoded  A QT file might not play in QuickTime on a particular machine  The software requires the appropriate Codec to be installed >>>
  • 7. Digital Media Files - CoDecs  Whether or not a file will play depends on its codec  Codec refers to the particular encoding method (algorithm) used to compress and decompress a piece of media (COmpress – DECompress)  Codecs specifically describe the type of video or audio compression used  Certain codecs play almost universally (MPEG4)  Some codecs may require plugins to be installed for playback (Vorbis (OGG), VP3 (Theora))
  • 8. Encoding applications Encoding is done at the following points  AV production applications (from the timeline)  Final Cut Pro (native & via compressor)  Protools  Within bespoke compression applications  Adobe medi Encoder (PC / MAC)  Compressor (Apple)  MediaCoder (open source)  As import / export options on media players  iTunes (import)  QuickTime Pro (export options)  On websites such as YouTube (FFMPEG server side encoder) Some encoding applications offer more control than others
  • 9. Lossless and lossy compression Lossless  Refers to any file type that is a true (verbatim) copy of the original  No quality has been lost in saving a file in the following formats  Lossless Audio – Flac, WavPac, Monkey’s Audio, ALAC  Lossless Video – Animation Codec, Huffyuv, Uncompressed  Lossless Graphics – Gif, PNG, Tiff  A basic example of lossless compression methods include RLE (Run Length Encoding)  Using the following as an abstraction of the data used to store a segment of audio – [AAAAABBCCCCCDEEEEEEE]= 20bytes  RLE would look at the ‘run lengths’ or repeated adjacent runs of data and summarise them as A5B2C5D1E7 = 10bytes
  • 10. Lossless and lossy compression Lossy  File formats and codecs where a file may look or sound acceptable or as good as the original but is in fact a degraded copy  Lossy file formats include  Lossy Audio – AAC, Mp3, Vorbis  Lossy video – M2V, H.264,  Lossy Graphics – Jpeg,  Lossy compression approximates data in order to make easily represented sequences of data  A (very) basic example is to use a similar scenario as before  AAAAABAAAAA represents a signal or series of pixels (11 bytes)  The compression could represent it as A5B1A5 (6 bytes lossless)  Lossy compression decides that the discrepancy is not significant enough to record so instead approximates it back to A (A11 = 2 bytes)
  • 11. Redundancy  File compression uses systems based around redundancy  Redundant elements are parts of the sound or image that are not required to be recorded (written) as data in the compressed file  Audio uses psychoacoustic principles to determine which sounds can be omitted without adversely affecting the overall quality (low / high frequencies, hiss, overlapping sounds)  Video uses pixel colour data to determine redundancies (see next slides)  Different codecs and encoders view and process these redundancies in different ways (algorithms) with different results  Redundancy can be broken into two categories  Objective redundancy
  • 12. Objective redundancy in imagery • An area of pure black is detected (area spans 15,300 pixels all black) • The area is mapped between 4 points (corners of green rectangle) • 15,300 pieces of information can be reduced to 5 pieces of information • That information can then be decoded in the player and rendered exactly as it was
  • 13. Subjective redundancy in imagery • An area is detected where the pixels are similar in colour (all black / dark grey) • The encoder decides that the difference is negligible (won’t be noticed) • The area is mapped similarly to before using 1 colour value • Information has been discarded and the quality of the compresses file is less than the original
  • 14. Compressing  The goal of compression is to get the smallest file size while retaining maximum ‘meaningful’ information (fidelity / clarity)  Compression is always a trade-off between quality and file size  The same principle applies to audio / video as to graphics  Always work from a high quality source  Never compress already compressed media (generation loss)  Always retain (archive) a high quality original for future work