SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information Technology
Videoguy
 

Tendances (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
 

En vedette (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
 

Similaire à Media Encoding

4 multimedia elements - video
4   multimedia elements - video4   multimedia elements - video
4 multimedia elements - video
Kelly Bauer
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
PUSHKAR ARYA
 
Multimedia applications
Multimedia applicationsMultimedia applications
Multimedia applications
smoky_stu
 

Similaire à 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
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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