SlideShare une entreprise Scribd logo
1  sur  21
HTML5
Multimedia
Streaming
Niall Munro
EDINA
niall.munro@ed.ac.uk
@DevNiall
H.264 9+ - 3.0+ 2 3.1+ -
Theora - 3.5+ 3.0+ - 10.5+
WebM 9+ 1 4.0+ 6.0+ 3 10.6+
1. WebM support via video element if codec is installed on the system
2. H.264 to be dropped in order to further open standards
3. WebM QuickTime plugin available
File Format Video Codec Audio Codec
H.264 AAC
Theora Vorbis
VP8 Vorbis
• H.264 – Industry standard for video compression,
most widely supported codec of the lot.
Commercial users are required to pay royalties
• Theora – originally put forward as the default
video technology for HTML5 video, predecessor
to WebM
• WebM/VP8 – open sourced by Google after their
acquisition of On2 Technologies
• Advanced Audio Coding (AAC) – industry
standard for audio compression, successor to
MP3? Royalty free for distributors
• Ogg Vorbis – open source audio codec
developed by Xiph.org Foundation
• FFmpeg – cross-platform multimedia framework,
supports many codecs
• ffmpeg2theora – tweaked fork of FFmpeg
• qt-faststart – Tool for optimising MP4 files for
streaming
• flvtool2 – Tool for optimising FLV files for
streaming
Output 640x360 video at ~1024k:
MP4:
ffmpeg –i INPUT.avi –vpre libx264-baseline –s 640x360 –ac 128k –vb 896k TMP.mp4
qt-faststart TMP.mp4 OUTPUT.mp4
WebM:
ffmpeg –i INPUT.avi -vpre libvpx-360p –s 640x360 OUTPUT.webm
Theora:
ffmpeg2theora INPUT.avi –o OUTPUT.ogv –v 9
FLV:
ffmpeg -i INPUT.avi -s 640x360 -vb 896k -acodec libfaac –ab 128k –vb 896k OUTPUT.flv
flvtool2 –U OUTPUT.flv
<video poster=“poster.png“ tabindex="0“ controls=“controls” preload="none">
<source src=“video.mp4“ type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"' />
<source src=“video.webm“ type='video/webm; codecs="vp8.0, vorbis"' />
<source src=“video.ogv“ type='video/ogg; codecs="theora, vorbis"' />
</video>
<video id=“videoplayer” poster=“poster.png“ tabindex="0“ controls=“controls” preload="none">
<!-- INCLUDE SOURCES FROM PREVIOUS SLIDE -->
<object width="640" height=“360" type="application/x-shockwave-flash” data=“flowplayer-3.2.7.swf">
<param name="movie" value="flowplayer-3.2.7.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":[“poster.png",
{"url": “video.mp4","autoPlay":false,"autoBuffering":true}]}' />
</object>
</video>
<audio id="audioplayer" tabindex="0" controls="controls" preload="none">
<source src="audio.m4a" type="audio/mp4" />
<source src="autiod.oga" type="audio/ogg" />
<object width=“30" height=“360" type="application/x-shockwave-flash” data=“flowplayer-3.2.7.swf">
<param name="movie" value="flowplayer-3.2.7.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":[“poster.png",
{"url": “audio.m4a","autoPlay":false,"autoBuffering":true}]}' />
</object>
</audio>
• HTTP based delivery solution, no special control
protocol required e.g. RTSP
• Byte-range requests work out of the box on most
web servers, same functionality is used to resume
downloads
• Seek points are calculated from the file header
metadata where keyframes are mapped to byte
offsets rather than time based offsets
• Flash pseudo-streaming enabled via server
modules, YouTube uses this method to deliver
their videos
• Supporting clients requests playback offset via
a URL parameter
e.g. http://example.com/media/video.mp4?start=120
• Server reads keyframe metadata information from
resource file header to determine the byte-range
request
• Server modules available for Apache HTTP, Lighthttpd
& Nginx, IIS solutions available too
• PHP script implementations are also available, resource
heavy!
• Supporting Flash players include Flowplayer & JW
Player
• H264 Streaming Module – includes support
for virtual video clips & adaptive streaming
http://h264.code-shop.com/trac
• mod_flvx
http://journal.paul.querna.org/articles/2006/07/11/mod_flvx/
LoadModule h264_streaming_module modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions .mp4 .m4a
LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv
<!-- VIDEO MIMETYPES -->
AddType video/mp4 .mp4
AddType video/ogg .ogv
AddType video/webm .webm
<!-- AUDIO MIMETYPES -->
AddType audio/mp4 .m4a
AddType audio/ogg .oga
• Nginx – high performance HTTP server developed
by Igor Sysoev
• Publicly available since 2004
• Event based architecture rather than traditional
thread based architecture
• Solves C10K problem
• Supports MP4 (module) & FLV (native) pseudo-
streaming
Example configuration file:
location /demo {
limit_rate 1500k;
limit_rate_after 500k;
alias /path/to/media;
location ~ .flv$ {
flv;
}
location ~ .mp4$ {
mp4;
}
location ~ .m4a$ {
mp4;
}
}
Securing Media with X-Accel-Redirect:
location /protected/ { #/protected, only available to internal redirects
internal;
root /hidden/path/to/media/;
}
PHP example:
$file = $_GET[‘file’];
if( authenticated )
header("X-Accel-Redirect: /protected/" . $file); //serves /hidden/path/to/media/$file
else
print ‘<p>Cheeky unauthenticated fool!</p>’;
var v = document.getElementsByTagName("video")[0];
v.play();
v.pause();
v.currentTime = 120; //seek to 120 seconds
//Seek attempt before media initialisation
if( v.readyState > = v.HAVE_FUTURE_DATA ) {
v.currentTime = 120;
} else {
v.play();
v.onloadedmetadata = function() { //event
v.currentTime = 120;
}
}
HTML5
Multimedia
Streaming
Niall Munro
EDINA
niall.munro@ed.ac.uk
@DevNiall

Contenu connexe

Tendances

Apache Tutorial
Apache TutorialApache Tutorial
Apache TutorialGuru99
 
Apache web server
Apache web serverApache web server
Apache web serverzrstoppe
 
Apache Presentation
Apache PresentationApache Presentation
Apache PresentationAnkush Jain
 
Integrated server
Integrated serverIntegrated server
Integrated serverfebru
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guideSopon Tumchota
 
Tonyfortunatoiperfquickstart 1212633021928769-8
Tonyfortunatoiperfquickstart 1212633021928769-8Tonyfortunatoiperfquickstart 1212633021928769-8
Tonyfortunatoiperfquickstart 1212633021928769-8Jamil Jamil
 
Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Toni de la Fuente
 
Lamp Introduction 20100419
Lamp Introduction 20100419Lamp Introduction 20100419
Lamp Introduction 20100419Vu Hung Nguyen
 
MQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMarkTaylorIBM
 
Ad, dns, dhcp, file server
Ad, dns, dhcp, file serverAd, dns, dhcp, file server
Ad, dns, dhcp, file serverTola LENG
 
E gov security_tut_session_4_lab
E gov security_tut_session_4_labE gov security_tut_session_4_lab
E gov security_tut_session_4_labMustafa Jarrar
 
How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7Tola LENG
 
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017Netgate
 
Web server installation_configuration_apache
Web server installation_configuration_apacheWeb server installation_configuration_apache
Web server installation_configuration_apacheShaojie Yang
 
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Vlad Lasky
 

Tendances (19)

Apache Tutorial
Apache TutorialApache Tutorial
Apache Tutorial
 
Apache web server
Apache web serverApache web server
Apache web server
 
Apache Presentation
Apache PresentationApache Presentation
Apache Presentation
 
Integrated server
Integrated serverIntegrated server
Integrated server
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guide
 
Tonyfortunatoiperfquickstart 1212633021928769-8
Tonyfortunatoiperfquickstart 1212633021928769-8Tonyfortunatoiperfquickstart 1212633021928769-8
Tonyfortunatoiperfquickstart 1212633021928769-8
 
Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012
 
Lamp Introduction 20100419
Lamp Introduction 20100419Lamp Introduction 20100419
Lamp Introduction 20100419
 
Samba
SambaSamba
Samba
 
MQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 level
 
Ad, dns, dhcp, file server
Ad, dns, dhcp, file serverAd, dns, dhcp, file server
Ad, dns, dhcp, file server
 
E gov security_tut_session_4_lab
E gov security_tut_session_4_labE gov security_tut_session_4_lab
E gov security_tut_session_4_lab
 
Apache Web Server Setup 1
Apache Web Server Setup 1Apache Web Server Setup 1
Apache Web Server Setup 1
 
How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7
 
Apache
ApacheApache
Apache
 
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
 
Web server installation_configuration_apache
Web server installation_configuration_apacheWeb server installation_configuration_apache
Web server installation_configuration_apache
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
 

En vedette

CONCURS ONCE: TOTS TENIM TALENTS!
CONCURS ONCE: TOTS TENIM TALENTS!CONCURS ONCE: TOTS TENIM TALENTS!
CONCURS ONCE: TOTS TENIM TALENTS!insponts
 
2012_Nature_Synthetic Homeostatic Materials
2012_Nature_Synthetic Homeostatic Materials2012_Nature_Synthetic Homeostatic Materials
2012_Nature_Synthetic Homeostatic MaterialsXimin He
 
Delphi - Howto Threads
Delphi - Howto ThreadsDelphi - Howto Threads
Delphi - Howto ThreadsNiall Munro
 
José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...
José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...
José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...José Miguel Gil Coto
 
Terri Frances Kruger Resume
Terri Frances Kruger ResumeTerri Frances Kruger Resume
Terri Frances Kruger ResumeTerri Kruger
 
Manual de Instruções da Escova Facial FCE 60 da Beurer
Manual de Instruções da Escova Facial FCE 60 da BeurerManual de Instruções da Escova Facial FCE 60 da Beurer
Manual de Instruções da Escova Facial FCE 60 da BeurerViver Qualidade
 
Fabiola jacqueline maldonado garcía
Fabiola jacqueline maldonado garcíaFabiola jacqueline maldonado garcía
Fabiola jacqueline maldonado garcíaFabss
 
Utopia Bllock c
Utopia Bllock cUtopia Bllock c
Utopia Bllock cdonamore1
 
UPAD Graphic Portfolio 2016
UPAD Graphic Portfolio 2016UPAD Graphic Portfolio 2016
UPAD Graphic Portfolio 2016Umesh Patel
 

En vedette (14)

CONCURS ONCE: TOTS TENIM TALENTS!
CONCURS ONCE: TOTS TENIM TALENTS!CONCURS ONCE: TOTS TENIM TALENTS!
CONCURS ONCE: TOTS TENIM TALENTS!
 
2012_Nature_Synthetic Homeostatic Materials
2012_Nature_Synthetic Homeostatic Materials2012_Nature_Synthetic Homeostatic Materials
2012_Nature_Synthetic Homeostatic Materials
 
ANIL RESUME
ANIL RESUMEANIL RESUME
ANIL RESUME
 
Delphi - Howto Threads
Delphi - Howto ThreadsDelphi - Howto Threads
Delphi - Howto Threads
 
José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...
José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...
José miguel gil. diputación de málaga.aplicación del coaching en la empresa d...
 
Programacion cuarto
Programacion cuartoProgramacion cuarto
Programacion cuarto
 
Terri Frances Kruger Resume
Terri Frances Kruger ResumeTerri Frances Kruger Resume
Terri Frances Kruger Resume
 
Was wäre wenn2
Was wäre wenn2Was wäre wenn2
Was wäre wenn2
 
Presentacion2
Presentacion2Presentacion2
Presentacion2
 
Manual de Instruções da Escova Facial FCE 60 da Beurer
Manual de Instruções da Escova Facial FCE 60 da BeurerManual de Instruções da Escova Facial FCE 60 da Beurer
Manual de Instruções da Escova Facial FCE 60 da Beurer
 
Fabiola jacqueline maldonado garcía
Fabiola jacqueline maldonado garcíaFabiola jacqueline maldonado garcía
Fabiola jacqueline maldonado garcía
 
Utopia Bllock c
Utopia Bllock cUtopia Bllock c
Utopia Bllock c
 
Camera angles
Camera anglesCamera angles
Camera angles
 
UPAD Graphic Portfolio 2016
UPAD Graphic Portfolio 2016UPAD Graphic Portfolio 2016
UPAD Graphic Portfolio 2016
 

Similaire à HTML5 Multimedia Streaming

Serverless Media Workflow
Serverless Media WorkflowServerless Media Workflow
Serverless Media WorkflowMooYeol Lee
 
Streaming video to html
Streaming video to htmlStreaming video to html
Streaming video to htmljeff tapper
 
Adobe HTTP Streaming
Adobe HTTP StreamingAdobe HTTP Streaming
Adobe HTTP StreamingYoss Cohen
 
BUILD 2014 - Building end-to-end video experience with Azure Media Services
BUILD 2014 - Building end-to-end video experience with Azure Media ServicesBUILD 2014 - Building end-to-end video experience with Azure Media Services
BUILD 2014 - Building end-to-end video experience with Azure Media ServicesMingfei Yan
 
Media Source Extensions
Media Source ExtensionsMedia Source Extensions
Media Source ExtensionsFITC
 
Html5 Open Video Tutorial
Html5 Open Video TutorialHtml5 Open Video Tutorial
Html5 Open Video TutorialSilvia Pfeiffer
 
Silverlight Wireshark Analysis
Silverlight Wireshark AnalysisSilverlight Wireshark Analysis
Silverlight Wireshark AnalysisYoss Cohen
 
Tutorial adaptive-streaming
Tutorial adaptive-streamingTutorial adaptive-streaming
Tutorial adaptive-streamingJohnGregory89
 
SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...
SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...
SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...TelecomValley
 
ReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsPriyanka Aash
 
HTML5 Video Presentation
HTML5 Video PresentationHTML5 Video Presentation
HTML5 Video Presentationsith33
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2Vincent Mercier
 
Nuxeo - Digital Asset Management
Nuxeo - Digital Asset ManagementNuxeo - Digital Asset Management
Nuxeo - Digital Asset ManagementThomas Roger
 

Similaire à HTML5 Multimedia Streaming (20)

HTML5 Multimedia Streaming
HTML5 Multimedia StreamingHTML5 Multimedia Streaming
HTML5 Multimedia Streaming
 
Serverless Media Workflow
Serverless Media WorkflowServerless Media Workflow
Serverless Media Workflow
 
Mm sys 2013-demo
Mm sys 2013-demoMm sys 2013-demo
Mm sys 2013-demo
 
Streaming video to html
Streaming video to htmlStreaming video to html
Streaming video to html
 
Multimedia Streaming Architecture
Multimedia Streaming ArchitectureMultimedia Streaming Architecture
Multimedia Streaming Architecture
 
Adobe HTTP Streaming
Adobe HTTP StreamingAdobe HTTP Streaming
Adobe HTTP Streaming
 
BUILD 2014 - Building end-to-end video experience with Azure Media Services
BUILD 2014 - Building end-to-end video experience with Azure Media ServicesBUILD 2014 - Building end-to-end video experience with Azure Media Services
BUILD 2014 - Building end-to-end video experience with Azure Media Services
 
Multimedia streaming
Multimedia streamingMultimedia streaming
Multimedia streaming
 
Media Source Extensions
Media Source ExtensionsMedia Source Extensions
Media Source Extensions
 
Html5 Open Video Tutorial
Html5 Open Video TutorialHtml5 Open Video Tutorial
Html5 Open Video Tutorial
 
Apan media encoding
Apan media encodingApan media encoding
Apan media encoding
 
Silverlight Wireshark Analysis
Silverlight Wireshark AnalysisSilverlight Wireshark Analysis
Silverlight Wireshark Analysis
 
Tutorial adaptive-streaming
Tutorial adaptive-streamingTutorial adaptive-streaming
Tutorial adaptive-streaming
 
SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...
SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...
SophiaConf2010 Présentation des Retours d'expériences de la Conférence du 08 ...
 
ReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security Bugs
 
HTML5 Video Presentation
HTML5 Video PresentationHTML5 Video Presentation
HTML5 Video Presentation
 
HTML5
HTML5 HTML5
HTML5
 
Html5video
Html5videoHtml5video
Html5video
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2
 
Nuxeo - Digital Asset Management
Nuxeo - Digital Asset ManagementNuxeo - Digital Asset Management
Nuxeo - Digital Asset Management
 

Dernier

Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
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
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
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中 央社
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 

Dernier (20)

Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
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
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
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
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 

HTML5 Multimedia Streaming

  • 2.
  • 3. H.264 9+ - 3.0+ 2 3.1+ - Theora - 3.5+ 3.0+ - 10.5+ WebM 9+ 1 4.0+ 6.0+ 3 10.6+ 1. WebM support via video element if codec is installed on the system 2. H.264 to be dropped in order to further open standards 3. WebM QuickTime plugin available
  • 4. File Format Video Codec Audio Codec H.264 AAC Theora Vorbis VP8 Vorbis
  • 5. • H.264 – Industry standard for video compression, most widely supported codec of the lot. Commercial users are required to pay royalties • Theora – originally put forward as the default video technology for HTML5 video, predecessor to WebM • WebM/VP8 – open sourced by Google after their acquisition of On2 Technologies
  • 6. • Advanced Audio Coding (AAC) – industry standard for audio compression, successor to MP3? Royalty free for distributors • Ogg Vorbis – open source audio codec developed by Xiph.org Foundation
  • 7. • FFmpeg – cross-platform multimedia framework, supports many codecs • ffmpeg2theora – tweaked fork of FFmpeg • qt-faststart – Tool for optimising MP4 files for streaming • flvtool2 – Tool for optimising FLV files for streaming
  • 8. Output 640x360 video at ~1024k: MP4: ffmpeg –i INPUT.avi –vpre libx264-baseline –s 640x360 –ac 128k –vb 896k TMP.mp4 qt-faststart TMP.mp4 OUTPUT.mp4 WebM: ffmpeg –i INPUT.avi -vpre libvpx-360p –s 640x360 OUTPUT.webm Theora: ffmpeg2theora INPUT.avi –o OUTPUT.ogv –v 9 FLV: ffmpeg -i INPUT.avi -s 640x360 -vb 896k -acodec libfaac –ab 128k –vb 896k OUTPUT.flv flvtool2 –U OUTPUT.flv
  • 9. <video poster=“poster.png“ tabindex="0“ controls=“controls” preload="none"> <source src=“video.mp4“ type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"' /> <source src=“video.webm“ type='video/webm; codecs="vp8.0, vorbis"' /> <source src=“video.ogv“ type='video/ogg; codecs="theora, vorbis"' /> </video>
  • 10. <video id=“videoplayer” poster=“poster.png“ tabindex="0“ controls=“controls” preload="none"> <!-- INCLUDE SOURCES FROM PREVIOUS SLIDE --> <object width="640" height=“360" type="application/x-shockwave-flash” data=“flowplayer-3.2.7.swf"> <param name="movie" value="flowplayer-3.2.7.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value='config={"playlist":[“poster.png", {"url": “video.mp4","autoPlay":false,"autoBuffering":true}]}' /> </object> </video>
  • 11. <audio id="audioplayer" tabindex="0" controls="controls" preload="none"> <source src="audio.m4a" type="audio/mp4" /> <source src="autiod.oga" type="audio/ogg" /> <object width=“30" height=“360" type="application/x-shockwave-flash” data=“flowplayer-3.2.7.swf"> <param name="movie" value="flowplayer-3.2.7.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value='config={"playlist":[“poster.png", {"url": “audio.m4a","autoPlay":false,"autoBuffering":true}]}' /> </object> </audio>
  • 12. • HTTP based delivery solution, no special control protocol required e.g. RTSP • Byte-range requests work out of the box on most web servers, same functionality is used to resume downloads • Seek points are calculated from the file header metadata where keyframes are mapped to byte offsets rather than time based offsets
  • 13. • Flash pseudo-streaming enabled via server modules, YouTube uses this method to deliver their videos • Supporting clients requests playback offset via a URL parameter e.g. http://example.com/media/video.mp4?start=120
  • 14. • Server reads keyframe metadata information from resource file header to determine the byte-range request • Server modules available for Apache HTTP, Lighthttpd & Nginx, IIS solutions available too • PHP script implementations are also available, resource heavy! • Supporting Flash players include Flowplayer & JW Player
  • 15. • H264 Streaming Module – includes support for virtual video clips & adaptive streaming http://h264.code-shop.com/trac • mod_flvx http://journal.paul.querna.org/articles/2006/07/11/mod_flvx/
  • 16. LoadModule h264_streaming_module modules/mod_h264_streaming.so AddHandler h264-streaming.extensions .mp4 .m4a LoadModule flvx_module modules/mod_flvx.so AddHandler flv-stream .flv <!-- VIDEO MIMETYPES --> AddType video/mp4 .mp4 AddType video/ogg .ogv AddType video/webm .webm <!-- AUDIO MIMETYPES --> AddType audio/mp4 .m4a AddType audio/ogg .oga
  • 17. • Nginx – high performance HTTP server developed by Igor Sysoev • Publicly available since 2004 • Event based architecture rather than traditional thread based architecture • Solves C10K problem • Supports MP4 (module) & FLV (native) pseudo- streaming
  • 18. Example configuration file: location /demo { limit_rate 1500k; limit_rate_after 500k; alias /path/to/media; location ~ .flv$ { flv; } location ~ .mp4$ { mp4; } location ~ .m4a$ { mp4; } }
  • 19. Securing Media with X-Accel-Redirect: location /protected/ { #/protected, only available to internal redirects internal; root /hidden/path/to/media/; } PHP example: $file = $_GET[‘file’]; if( authenticated ) header("X-Accel-Redirect: /protected/" . $file); //serves /hidden/path/to/media/$file else print ‘<p>Cheeky unauthenticated fool!</p>’;
  • 20. var v = document.getElementsByTagName("video")[0]; v.play(); v.pause(); v.currentTime = 120; //seek to 120 seconds //Seek attempt before media initialisation if( v.readyState > = v.HAVE_FUTURE_DATA ) { v.currentTime = 120; } else { v.play(); v.onloadedmetadata = function() { //event v.currentTime = 120; } }

Notes de l'éditeur

  1. NAME WORK FOR INFO ON JISC MEDIAHUB
  2. Amalgamation of older services: EIG, NFO, FSOL Getty Still Moving/still images Films of Scotland Associated Press (unedited 9/11 footage) ITN Source Gaumont British News
  3. Chrome Theora support buggy
  4. AAC Default audio compression for iPhone, iPod, iPad, iTunes and PlayStation 3 Manufacturers or developers of AAC codecs require a license, FFMPEG & FAAC (Free Advanced...) only distributable in source form only
  5. h.264 H.264 is a patent encumbered video codec that has an almost ubiquitous presence in online video streaming services and has widespread adoption on mobile platforms. The codec was designed to meet a range of criteria such as the delivery of high quality video content at lower bitrates and being accessible across a wide variety of platforms. MPEG-LA, nothing to do with MPEG standardisation organisation, administers the licenses for patents applying to this standard, as well as various other patent pools related to the MPEG standard. Group includes: Apple, Hitachi, Microsoft, Mitsubishi, Panasonic, Samsung, Sharp, Sony, Toshiba etc. Aggressive industry calls to find patent owners who may be infringed upon by Theora and WebM codecs. Theora Cortado, streaming Java apploet for Ogg Vorbis, Theora & Kate (speech?) VP8 Google approached MPEG LA in order to allow royalty free use of H.264, offered to pay huge one off lump sum, they refused In response Google bought On2 Technologies, creators of Theora & Vorbis, attempted to resolve lingering pattent issues before open sourcing the code
  6. AAC Default audio compression for iPhone, iPod, iPad, iTunes and PlayStation 3 Manufacturers or developers of AAC codecs require a license, FFMPEG & FAAC (Free Advanced...) only distributable in source form only
  7. RTSP Real Time Streaming Protocol Pseudo-streaming Client requests offset specified in seconds via URL parameter.
  8. MP4 -g = keyframe every 10 seconds
  9. Poster “Tabindex=0”, allows keyboard control of media element, space & arrows (left, right) Controls, use native browser controls Preload, if none specified 1st frame is loaded Codecs, optional, formats don’t differ enough just now, supposed to prevent browser fetching the info from file header requests
  10. MP4
  11. MP4
  12. RTSP Real Time Streaming Protocol Pseudo-streaming Client requests offset specified in seconds via URL parameter. There are two methods of streaming being implemented in this section, "Byte-range" requests and the "H264 Streaming Module" for Apache. Both methods are known as "pseudo-streaming" as we are not using the time offset to seek the stream, rather the byte offset. Byte-range serving The good news is that "Byte-range" requests work out of the box on most web servers, this functionality is mainly used to provide partial content download support which is used when resuming downloads of files. This technique is a hack on that original functionality to provide pseudo-streaming of video files that have been encoded at a constant bitrate. The stream bitrate is used along with the play position to work the byte offset to serve, essentially providing seek capabilities in your stream. This is all provided without the need to change any of the default Apache HTTP server configuration files.
  13. RTSP Real Time Streaming Protocol Pseudo-streaming Client requests offset specified in seconds via URL parameter. There are two methods of streaming being implemented in this section, "Byte-range" requests and the "H264 Streaming Module" for Apache. Both methods are known as "pseudo-streaming" as we are not using the time offset to seek the stream, rather the byte offset. Byte-range serving The good news is that "Byte-range" requests work out of the box on most web servers, this functionality is mainly used to provide partial content download support which is used when resuming downloads of files. This technique is a hack on that original functionality to provide pseudo-streaming of video files that have been encoded at a constant bitrate. The stream bitrate is used along with the play position to work the byte offset to serve, essentially providing seek capabilities in your stream. This is all provided without the need to change any of the default Apache HTTP server configuration files.
  14. RTSP Real Time Streaming Protocol Pseudo-streaming Client requests offset specified in seconds via URL parameter.
  15. RTSP Real Time Streaming Protocol Pseudo-streaming Client requests offset specified in seconds via URL parameter.
  16. H264 Streaming Module This module is required in order to provide seek support in our video streams that are served to a client using the alternative Flash based player, specifically Flowplayer which supports this module via its own plugin. Versions of Flash earlier than 10.0 do not support byte-range requests so we need this module to serve up a "virtual" stream where the seek point is taken from a query parameter and served to the player as a new stream each time the video is seeked. In order to download and install this module, please follow their instructions for Apache here. After completing the previous instructions you should now be ready to serve up H.264 video streams to your clients.
  17. Nginx High performace, small memory footprint (~2.5Mb per 10k inactive HTTP connections) Serves just over 11% of all domains including: WordPress, Github, SourceForge etc. asynchronous event-driven approach C10K problem Software architecture becomes the bottleneck, spawning a new thread for each connection no longer scales. Nginx
  18. Nginx High performace, small memory footprint (~2.5Mb per 10k inactive HTTP connections) Serves just over 11% of all domains including: WordPress, Github, SourceForge etc. asynchronous event-driven approach C10K problem Software architecture becomes the bottleneck, spawning a new thread for each connection no longer scales. Nginx
  19. As you can see, we have additional “internal” location /files there. This keyword “internal” allow us to have some locations, that will be available for user only in internal redirects and X-Accel-Redirect responses from backend scripts. So, we can use simple PHP script or Rails code on backend server to implement controlled downloads that will support Ranges header and all other features supported by direct static downloads from nginx servers.
  20. MP4