SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Behind the scenes: The Media stack in Firefox
What we support
Out of the box Firefox can handle the following codecs:
• Video: VP8 (ffvp8), VP9 (ffvp9) and Theora (libtheora)
• Audio: Vorbis (libvorbis) and Opus (libopus), FLAC (ffmpeg)
Relying on installed system frameworks for:
• H264, AAC and MP3.
• Windows: Media Foundation Transform (MFT), supports hardware
acceleration in combination with D3D9 and D3D11. Not available on
XP. European editions (N, KN) require installing extra packages.
• Mac: Video Toolbox, supports hardware acceleration; CoreMedia.
• Linux and others: FFmpeg. Software decoding only.
Media Source Extension
Everything is supported as of current draft specifications except:
• MPEG-TS
• raw AAC and MP3 streams
• Anything related to the Track elements
Limitations:
• All multi-channels audio tracks are downmixed to stereo.
• Only one source buffer type (audio or video) at once.
Media Source Extension
Always supported when we have local decoders:
video/mp4: H264, AAC, MP3. Soon Opus and FLAC
video/webm: VP8, VP9, Vorbis and Opus
Note for webm.
VP8 and VP9 codecs are only available by default if one of the
conditions is true:
• No H264 decoder found
• No hardware acceleration (typically blacklisted drivers)
• Machine is deemed fast enough
• media.mediasource.webm.enabled preferences is set to true.
HTML5 Media Element Architecture (Plain)
All operations between the media element and the media stacks
are asynchronous and use a Promise-like communication mechanism.
HTML Media Element
(manage events and
user operations)
Media Stack
(loading, demuxing, decoding)
JS
● currentTime
● readyState
● Load
● Play / Pause
● Seek
Video Compositor Audio Renderer
Media Stack (plain)
Asynchronous
Heavily multi-threaded MediaResource
MediaDecoder
State Machine
MediaDataDemuxer
MediaDataDecoder
Platform Module
MediaFormatReader
MediaDataDecoder
MediaDataDecoder
MediaCache
HTML5 Media Element Architecture (MSE)
All operations between the media element and the media stacks
are asynchronous and use a Promise-like communication mechanism.
HTML Media Element
(manage events and
user operations)
Media Stack
(loading, demuxing, decoding)
JS
● currentTime
● readyState
● Load
● Play / Pause
● Seek
Video Compositor Audio Renderer
MediaSource
SourceBuffer SourceBuffer
Media Stack (MSE)
Asynchronous
Heavily multi-threaded MediaSourceResourc
e
MediaDecoder
State Machine
MediaDataDemuxer
MediaDataDecoder
Platform Module
MediaFormatReader
MediaDataDecoder
MediaDataDecoder
TrackBuffer
Implementation Notes
• Mostly written in C++
• All demuxers are written in house. While we often use external
libraries to provide core features, we control the entire demuxing
chain.
MSE Implementations notes
Eviction strategies:
• In 50 and earlier, 100MB video source buffer, 30MB audio source
buffer (was both 100MB in 48 and earlier).
• In 51 and later, 100MB video, 10MB audio.
First, attempt to evict data located prior currentTime.
Second, attempt to evict future data, found after discontinuity
In the future, we are considering to stop having a set size, and instead
base the eviction on the duration of data buffered (e.g. 30s for both
audio and video).
Combined maximum buffer size shared across all source buffers.
Media Most Common Issues
• Buggy video drivers
Solutions: blacklisting, out of process decoding
• Unsupported media file
Solutions: Decoder: tough luck, Demuxer: fix it.
• Security
Solutions: rewriting some components in Rust language.
MSE Most Common Issues
• Bad muxing. In particular invalid tagging of keyframes.
• Invalid timestamps, gap in data (in 51 and earlier, Firefox will not go
over 125ms gap, 500ms in 52)
• Having to rely on platform decoder limitation or unique behaviour
especially on Windows.
• Chrome centric code, or relying on invalid Chrome behaviour.
• Not listening to appendBuffer events, especially buffer full.
HTML5 Media Element Architecture (EME)
EME is only working in combination with MSE
HTML Media Element
(manage events and
user operations)
Media Stack
(loading, demuxing, decoding)
JS
● currentTime
● readyState
● Load
● Play / Pause
● Seek
Video Compositor Audio Renderer
MediaKeys
MediaKey
session
MediaKey
session
Media Stack (EME)
The CDM runs in its own child process, within a sandbox.
Decrypted and decoded data is fed back into our media stack for
rendering
MediaSourceResourc
e
MediaDecoder
State Machine
MediaDataDemuxer
Platform Module
MediaFormatReader
EMEVideoDataDecoder
TrackBuffer
MediaKey
session MediaKey
session
EMEAudioDataDecoder
EME Support
• Currently only supporting Google’s Widevine and Adobe’s Primetime
and ClearKey CDM
• No access to Microsoft PlayReady or Apple FairPlay. This prevents us
from having access to hardware decoding for encrypted content.
• Netflix only delivering 720p, same for Amazon with some contents.
Gecko Future improvements.
• Out of process GPU decoding. When a driver crashes we can
immediately recover with zero visible consequences
• Suspend decoding for videos when in the background to reduce CPU
usage and increase battery life
• E10S: increasing the number of content processes
How can you help yourselves
• Test using Firefox!
• MSE implementation is very rigorous and 100% per spec.
• If it works in Firefox it will work with other compliant browsers. It’s
also more likely to work with all other browsers.
• You’re better off testing with Firefox
Paris Video Tech #2 - Presentation by Jean-Yves Avenard

Contenu connexe

Tendances

Live Streaming from A-Z
Live Streaming from A-ZLive Streaming from A-Z
Live Streaming from A-ZBrightcove
 
ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) Erica Beavers
 
HTM5/CENC par Romain Bouqueau de Gpac Licensing
HTM5/CENC par Romain Bouqueau de Gpac LicensingHTM5/CENC par Romain Bouqueau de Gpac Licensing
HTM5/CENC par Romain Bouqueau de Gpac LicensingJustindwah
 
Web 2.0 Media
Web 2.0 MediaWeb 2.0 Media
Web 2.0 Mediajrappold
 
DRM Basics With Irdeto and Bitmovin
DRM Basics With Irdeto and BitmovinDRM Basics With Irdeto and Bitmovin
DRM Basics With Irdeto and BitmovinBitmovin Inc
 
Choosing the Segment Length for Adaptive Bitrate Streaming
Choosing the Segment Length for Adaptive Bitrate StreamingChoosing the Segment Length for Adaptive Bitrate Streaming
Choosing the Segment Length for Adaptive Bitrate StreamingBitmovin Inc
 
The Long Road to Video Player Success
The Long Road to Video Player SuccessThe Long Road to Video Player Success
The Long Road to Video Player SuccessBitmovin Inc
 
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougallBitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougallBitmovin Inc
 
An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...
An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...
An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...Tanya Vernitsky
 
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...Yusuke Goto
 
Managing Transition to HEVC/VP9/AV1 with Multi-Codec Streaming
Managing Transition to HEVC/VP9/AV1 with Multi-Codec StreamingManaging Transition to HEVC/VP9/AV1 with Multi-Codec Streaming
Managing Transition to HEVC/VP9/AV1 with Multi-Codec StreamingBitmovin Inc
 
NAB Show 2018 Notes
NAB Show 2018 NotesNAB Show 2018 Notes
NAB Show 2018 NotesYusuke Goto
 
WEBRTC_SEMINAR_FOR_TEAM_by_daebalprime
WEBRTC_SEMINAR_FOR_TEAM_by_daebalprimeWEBRTC_SEMINAR_FOR_TEAM_by_daebalprime
WEBRTC_SEMINAR_FOR_TEAM_by_daebalprimeDaeyeon Kim
 
Converging CAS and DRM, David Bouteruche from Nagra
Converging CAS and DRM, David Bouteruche from NagraConverging CAS and DRM, David Bouteruche from Nagra
Converging CAS and DRM, David Bouteruche from NagraJustindwah
 
Live, Low Delay, High Quality – How?
Live, Low Delay, High Quality – How?Live, Low Delay, High Quality – How?
Live, Low Delay, High Quality – How?Bitmovin Inc
 
Interoperable Master Format (IMF): more constraints or efficient masters’ del...
Interoperable Master Format (IMF): more constraints or efficient masters’ del...Interoperable Master Format (IMF): more constraints or efficient masters’ del...
Interoperable Master Format (IMF): more constraints or efficient masters’ del...Mesclado
 

Tendances (20)

The Road to Ultra Low Latency
The Road to Ultra Low LatencyThe Road to Ultra Low Latency
The Road to Ultra Low Latency
 
Live Streaming from A-Z
Live Streaming from A-ZLive Streaming from A-Z
Live Streaming from A-Z
 
ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016)
 
HTM5/CENC par Romain Bouqueau de Gpac Licensing
HTM5/CENC par Romain Bouqueau de Gpac LicensingHTM5/CENC par Romain Bouqueau de Gpac Licensing
HTM5/CENC par Romain Bouqueau de Gpac Licensing
 
Multimedia Streaming Architecture
Multimedia Streaming ArchitectureMultimedia Streaming Architecture
Multimedia Streaming Architecture
 
Web 2.0 Media
Web 2.0 MediaWeb 2.0 Media
Web 2.0 Media
 
DRM Basics With Irdeto and Bitmovin
DRM Basics With Irdeto and BitmovinDRM Basics With Irdeto and Bitmovin
DRM Basics With Irdeto and Bitmovin
 
Choosing the Segment Length for Adaptive Bitrate Streaming
Choosing the Segment Length for Adaptive Bitrate StreamingChoosing the Segment Length for Adaptive Bitrate Streaming
Choosing the Segment Length for Adaptive Bitrate Streaming
 
The Long Road to Video Player Success
The Long Road to Video Player SuccessThe Long Road to Video Player Success
The Long Road to Video Player Success
 
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougallBitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
Bitmovin Low Latency CMAF Presentation_Streaming Media East by Paul MacDougall
 
Video file format
Video file formatVideo file format
Video file format
 
An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...
An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...
An Introduction to AV1 - The Next-Gen Royalty-Free Codec From the Alliance fo...
 
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
A Japanese Way to Maintain Constant Quality on Streaming Chaotically Supplied...
 
Managing Transition to HEVC/VP9/AV1 with Multi-Codec Streaming
Managing Transition to HEVC/VP9/AV1 with Multi-Codec StreamingManaging Transition to HEVC/VP9/AV1 with Multi-Codec Streaming
Managing Transition to HEVC/VP9/AV1 with Multi-Codec Streaming
 
NAB Show 2018 Notes
NAB Show 2018 NotesNAB Show 2018 Notes
NAB Show 2018 Notes
 
OTT Video DRM
OTT Video DRMOTT Video DRM
OTT Video DRM
 
WEBRTC_SEMINAR_FOR_TEAM_by_daebalprime
WEBRTC_SEMINAR_FOR_TEAM_by_daebalprimeWEBRTC_SEMINAR_FOR_TEAM_by_daebalprime
WEBRTC_SEMINAR_FOR_TEAM_by_daebalprime
 
Converging CAS and DRM, David Bouteruche from Nagra
Converging CAS and DRM, David Bouteruche from NagraConverging CAS and DRM, David Bouteruche from Nagra
Converging CAS and DRM, David Bouteruche from Nagra
 
Live, Low Delay, High Quality – How?
Live, Low Delay, High Quality – How?Live, Low Delay, High Quality – How?
Live, Low Delay, High Quality – How?
 
Interoperable Master Format (IMF): more constraints or efficient masters’ del...
Interoperable Master Format (IMF): more constraints or efficient masters’ del...Interoperable Master Format (IMF): more constraints or efficient masters’ del...
Interoperable Master Format (IMF): more constraints or efficient masters’ del...
 

En vedette

Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...
Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...
Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...Erica Beavers
 
Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...
Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...
Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...Erica Beavers
 
ConférenSquad #4 - Association OVFSquad
ConférenSquad #4 - Association OVFSquadConférenSquad #4 - Association OVFSquad
ConférenSquad #4 - Association OVFSquadJustindwah
 
ConférenSquad #4 - Hulu et DASH par Baptiste Coudurier
ConférenSquad #4 - Hulu et DASH par Baptiste CoudurierConférenSquad #4 - Hulu et DASH par Baptiste Coudurier
ConférenSquad #4 - Hulu et DASH par Baptiste CoudurierJustindwah
 
ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)
ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)
ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)Justindwah
 
Hybrid Delivery Approach for OTT Contents
Hybrid Delivery Approach for OTT ContentsHybrid Delivery Approach for OTT Contents
Hybrid Delivery Approach for OTT ContentsNicolas Weil
 
ConférenSquad #4 - Architectures Vidéo Cloud
ConférenSquad #4 - Architectures Vidéo CloudConférenSquad #4 - Architectures Vidéo Cloud
ConférenSquad #4 - Architectures Vidéo CloudJustindwah
 
HTML5 & WebRTC: New Horizons for P2P streaming
HTML5 & WebRTC: New Horizons for P2P streamingHTML5 & WebRTC: New Horizons for P2P streaming
HTML5 & WebRTC: New Horizons for P2P streamingNicolas Weil
 
ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...
ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...
ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...Justindwah
 
ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...
ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...
ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...Justindwah
 
ConférenSquad #2 : Expway - LTE Broadcast
ConférenSquad #2 : Expway - LTE BroadcastConférenSquad #2 : Expway - LTE Broadcast
ConférenSquad #2 : Expway - LTE BroadcastJustindwah
 
EasyFaces - Framework de Componentes JSF
EasyFaces - Framework de Componentes JSFEasyFaces - Framework de Componentes JSF
EasyFaces - Framework de Componentes JSFRafael da Cunha
 
LTE Broadcast - Revolutionizing Video Delivery in Mobile Networks
LTE Broadcast - Revolutionizing Video Delivery in Mobile NetworksLTE Broadcast - Revolutionizing Video Delivery in Mobile Networks
LTE Broadcast - Revolutionizing Video Delivery in Mobile NetworksNicolas Weil
 
Deployment of the nanoCDN solution with an operator
Deployment of the nanoCDN solution with an operatorDeployment of the nanoCDN solution with an operator
Deployment of the nanoCDN solution with an operatorNicolas Weil
 
Edge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format TodayEdge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format TodayAkamai Technologies
 
Peer-to-Peer and live streaming: 10 years of academic research
Peer-to-Peer and live streaming: 10 years of academic researchPeer-to-Peer and live streaming: 10 years of academic research
Peer-to-Peer and live streaming: 10 years of academic researchNicolas Weil
 
ConférenSquad #2 : Gwendal Simon - P2P & Live Streaming
ConférenSquad #2 : Gwendal Simon - P2P & Live StreamingConférenSquad #2 : Gwendal Simon - P2P & Live Streaming
ConférenSquad #2 : Gwendal Simon - P2P & Live StreamingJustindwah
 

En vedette (17)

Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...
Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...
Paris Video Tech - 1st Edition: Streamroot, Adaptive Bitrate Algorithms: comm...
 
Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...
Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...
Paris Video Tech - 1st Edition: Dailymotion Améliorer l'expérience utilisateu...
 
ConférenSquad #4 - Association OVFSquad
ConférenSquad #4 - Association OVFSquadConférenSquad #4 - Association OVFSquad
ConférenSquad #4 - Association OVFSquad
 
ConférenSquad #4 - Hulu et DASH par Baptiste Coudurier
ConférenSquad #4 - Hulu et DASH par Baptiste CoudurierConférenSquad #4 - Hulu et DASH par Baptiste Coudurier
ConférenSquad #4 - Hulu et DASH par Baptiste Coudurier
 
ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)
ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)
ConférenSquad #4 - UHDTV, Etat de l'art part Thierry Fautier (Harmonic)
 
Hybrid Delivery Approach for OTT Contents
Hybrid Delivery Approach for OTT ContentsHybrid Delivery Approach for OTT Contents
Hybrid Delivery Approach for OTT Contents
 
ConférenSquad #4 - Architectures Vidéo Cloud
ConférenSquad #4 - Architectures Vidéo CloudConférenSquad #4 - Architectures Vidéo Cloud
ConférenSquad #4 - Architectures Vidéo Cloud
 
HTML5 & WebRTC: New Horizons for P2P streaming
HTML5 & WebRTC: New Horizons for P2P streamingHTML5 & WebRTC: New Horizons for P2P streaming
HTML5 & WebRTC: New Horizons for P2P streaming
 
ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...
ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...
ConférenSquad #3 : Qualité et Multiscreen (Jean-Michel Planche et Yoann Hinar...
 
ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...
ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...
ConférenSquad #3 : Subjective Quality and HTTP Adaptive Streaming: a Review o...
 
ConférenSquad #2 : Expway - LTE Broadcast
ConférenSquad #2 : Expway - LTE BroadcastConférenSquad #2 : Expway - LTE Broadcast
ConférenSquad #2 : Expway - LTE Broadcast
 
EasyFaces - Framework de Componentes JSF
EasyFaces - Framework de Componentes JSFEasyFaces - Framework de Componentes JSF
EasyFaces - Framework de Componentes JSF
 
LTE Broadcast - Revolutionizing Video Delivery in Mobile Networks
LTE Broadcast - Revolutionizing Video Delivery in Mobile NetworksLTE Broadcast - Revolutionizing Video Delivery in Mobile Networks
LTE Broadcast - Revolutionizing Video Delivery in Mobile Networks
 
Deployment of the nanoCDN solution with an operator
Deployment of the nanoCDN solution with an operatorDeployment of the nanoCDN solution with an operator
Deployment of the nanoCDN solution with an operator
 
Edge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format TodayEdge 2014: MPEG DASH – Tomorrow's Format Today
Edge 2014: MPEG DASH – Tomorrow's Format Today
 
Peer-to-Peer and live streaming: 10 years of academic research
Peer-to-Peer and live streaming: 10 years of academic researchPeer-to-Peer and live streaming: 10 years of academic research
Peer-to-Peer and live streaming: 10 years of academic research
 
ConférenSquad #2 : Gwendal Simon - P2P & Live Streaming
ConférenSquad #2 : Gwendal Simon - P2P & Live StreamingConférenSquad #2 : Gwendal Simon - P2P & Live Streaming
ConférenSquad #2 : Gwendal Simon - P2P & Live Streaming
 

Similaire à Paris Video Tech #2 - Presentation by Jean-Yves Avenard

Android Multimedia Player Project Presentation
Android Multimedia Player Project PresentationAndroid Multimedia Player Project Presentation
Android Multimedia Player Project PresentationRashmi Gupta
 
Windows7: Video Improvements
Windows7: Video ImprovementsWindows7: Video Improvements
Windows7: Video Improvementswonderu
 
Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streamingRohan Bhatkar
 
Media Content Delivery Systems
Media Content Delivery SystemsMedia Content Delivery Systems
Media Content Delivery Systemsashbyb
 
ExoPlayer for Application developers
ExoPlayer for Application developersExoPlayer for Application developers
ExoPlayer for Application developersHassan Abid
 
Computer Softwares
Computer SoftwaresComputer Softwares
Computer Softwaresganun231
 
Streaming video to html
Streaming video to htmlStreaming video to html
Streaming video to htmljeff tapper
 
WebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differencesWebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differencesAlexandre Gouaillard
 
EditShare overview Jan2011
EditShare overview Jan2011EditShare overview Jan2011
EditShare overview Jan2011EditShare
 
Craft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologiesCraft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologiesMáté Nádasdi
 
Ott Streaming Protocols and DRM
Ott Streaming Protocols and DRMOtt Streaming Protocols and DRM
Ott Streaming Protocols and DRMASIMYILDIZ
 
Audio and Video streaming.ppt
Audio and Video streaming.pptAudio and Video streaming.ppt
Audio and Video streaming.pptVideoguy
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.pptVideoguy
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.pptVideoguy
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.pptVideoguy
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.pptVideoguy
 

Similaire à Paris Video Tech #2 - Presentation by Jean-Yves Avenard (20)

Gtug
GtugGtug
Gtug
 
BDPA Open Source 2012
BDPA  Open Source  2012BDPA  Open Source  2012
BDPA Open Source 2012
 
Android Multimedia Player Project Presentation
Android Multimedia Player Project PresentationAndroid Multimedia Player Project Presentation
Android Multimedia Player Project Presentation
 
Windows7: Video Improvements
Windows7: Video ImprovementsWindows7: Video Improvements
Windows7: Video Improvements
 
Slide
SlideSlide
Slide
 
Apan media encoding
Apan media encodingApan media encoding
Apan media encoding
 
Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streaming
 
Media Content Delivery Systems
Media Content Delivery SystemsMedia Content Delivery Systems
Media Content Delivery Systems
 
ExoPlayer for Application developers
ExoPlayer for Application developersExoPlayer for Application developers
ExoPlayer for Application developers
 
Computer Softwares
Computer SoftwaresComputer Softwares
Computer Softwares
 
Streaming video to html
Streaming video to htmlStreaming video to html
Streaming video to html
 
WebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differencesWebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differences
 
EditShare overview Jan2011
EditShare overview Jan2011EditShare overview Jan2011
EditShare overview Jan2011
 
Craft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologiesCraft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologies
 
Ott Streaming Protocols and DRM
Ott Streaming Protocols and DRMOtt Streaming Protocols and DRM
Ott Streaming Protocols and DRM
 
Audio and Video streaming.ppt
Audio and Video streaming.pptAudio and Video streaming.ppt
Audio and Video streaming.ppt
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.ppt
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.ppt
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.ppt
 
Streaming Overview Final.ppt
Streaming Overview Final.pptStreaming Overview Final.ppt
Streaming Overview Final.ppt
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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, ...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 WoodJuan lago vázquez
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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 Scriptwesley chun
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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, ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Paris Video Tech #2 - Presentation by Jean-Yves Avenard

  • 1. Behind the scenes: The Media stack in Firefox
  • 2.
  • 3. What we support Out of the box Firefox can handle the following codecs: • Video: VP8 (ffvp8), VP9 (ffvp9) and Theora (libtheora) • Audio: Vorbis (libvorbis) and Opus (libopus), FLAC (ffmpeg) Relying on installed system frameworks for: • H264, AAC and MP3. • Windows: Media Foundation Transform (MFT), supports hardware acceleration in combination with D3D9 and D3D11. Not available on XP. European editions (N, KN) require installing extra packages. • Mac: Video Toolbox, supports hardware acceleration; CoreMedia. • Linux and others: FFmpeg. Software decoding only.
  • 4. Media Source Extension Everything is supported as of current draft specifications except: • MPEG-TS • raw AAC and MP3 streams • Anything related to the Track elements Limitations: • All multi-channels audio tracks are downmixed to stereo. • Only one source buffer type (audio or video) at once.
  • 5. Media Source Extension Always supported when we have local decoders: video/mp4: H264, AAC, MP3. Soon Opus and FLAC video/webm: VP8, VP9, Vorbis and Opus Note for webm. VP8 and VP9 codecs are only available by default if one of the conditions is true: • No H264 decoder found • No hardware acceleration (typically blacklisted drivers) • Machine is deemed fast enough • media.mediasource.webm.enabled preferences is set to true.
  • 6. HTML5 Media Element Architecture (Plain) All operations between the media element and the media stacks are asynchronous and use a Promise-like communication mechanism. HTML Media Element (manage events and user operations) Media Stack (loading, demuxing, decoding) JS ● currentTime ● readyState ● Load ● Play / Pause ● Seek Video Compositor Audio Renderer
  • 7. Media Stack (plain) Asynchronous Heavily multi-threaded MediaResource MediaDecoder State Machine MediaDataDemuxer MediaDataDecoder Platform Module MediaFormatReader MediaDataDecoder MediaDataDecoder MediaCache
  • 8. HTML5 Media Element Architecture (MSE) All operations between the media element and the media stacks are asynchronous and use a Promise-like communication mechanism. HTML Media Element (manage events and user operations) Media Stack (loading, demuxing, decoding) JS ● currentTime ● readyState ● Load ● Play / Pause ● Seek Video Compositor Audio Renderer MediaSource SourceBuffer SourceBuffer
  • 9. Media Stack (MSE) Asynchronous Heavily multi-threaded MediaSourceResourc e MediaDecoder State Machine MediaDataDemuxer MediaDataDecoder Platform Module MediaFormatReader MediaDataDecoder MediaDataDecoder TrackBuffer
  • 10. Implementation Notes • Mostly written in C++ • All demuxers are written in house. While we often use external libraries to provide core features, we control the entire demuxing chain.
  • 11. MSE Implementations notes Eviction strategies: • In 50 and earlier, 100MB video source buffer, 30MB audio source buffer (was both 100MB in 48 and earlier). • In 51 and later, 100MB video, 10MB audio. First, attempt to evict data located prior currentTime. Second, attempt to evict future data, found after discontinuity In the future, we are considering to stop having a set size, and instead base the eviction on the duration of data buffered (e.g. 30s for both audio and video). Combined maximum buffer size shared across all source buffers.
  • 12. Media Most Common Issues • Buggy video drivers Solutions: blacklisting, out of process decoding • Unsupported media file Solutions: Decoder: tough luck, Demuxer: fix it. • Security Solutions: rewriting some components in Rust language.
  • 13. MSE Most Common Issues • Bad muxing. In particular invalid tagging of keyframes. • Invalid timestamps, gap in data (in 51 and earlier, Firefox will not go over 125ms gap, 500ms in 52) • Having to rely on platform decoder limitation or unique behaviour especially on Windows. • Chrome centric code, or relying on invalid Chrome behaviour. • Not listening to appendBuffer events, especially buffer full.
  • 14. HTML5 Media Element Architecture (EME) EME is only working in combination with MSE HTML Media Element (manage events and user operations) Media Stack (loading, demuxing, decoding) JS ● currentTime ● readyState ● Load ● Play / Pause ● Seek Video Compositor Audio Renderer MediaKeys MediaKey session MediaKey session
  • 15. Media Stack (EME) The CDM runs in its own child process, within a sandbox. Decrypted and decoded data is fed back into our media stack for rendering MediaSourceResourc e MediaDecoder State Machine MediaDataDemuxer Platform Module MediaFormatReader EMEVideoDataDecoder TrackBuffer MediaKey session MediaKey session EMEAudioDataDecoder
  • 16. EME Support • Currently only supporting Google’s Widevine and Adobe’s Primetime and ClearKey CDM • No access to Microsoft PlayReady or Apple FairPlay. This prevents us from having access to hardware decoding for encrypted content. • Netflix only delivering 720p, same for Amazon with some contents.
  • 17. Gecko Future improvements. • Out of process GPU decoding. When a driver crashes we can immediately recover with zero visible consequences • Suspend decoding for videos when in the background to reduce CPU usage and increase battery life • E10S: increasing the number of content processes
  • 18. How can you help yourselves • Test using Firefox! • MSE implementation is very rigorous and 100% per spec. • If it works in Firefox it will work with other compliant browsers. It’s also more likely to work with all other browsers. • You’re better off testing with Firefox