(responsive) video

18
http://www.flickr.com/photos/derpunk/4644835025/ (Responsive) Video

Upload: walter-ebert

Post on 08-May-2015

708 views

Category:

Technology


0 download

DESCRIPTION

Presented at WebPerfDays Amsterdam, the Netherlands, May 2013

TRANSCRIPT

Page 1: (Responsive) Video

http://www.flickr.com/photos/derpunk/4644835025/

(Responsive) Video

Page 2: (Responsive) Video

http://www.flickr.com/photos/derpunk/4644835025/

No painNo gain

Page 3: (Responsive) Video

Walter Ebert

independent web developer

@walterebertwalterebert.com

slideshare.net/walterebert

Page 4: (Responsive) Video

http://quirksmode.org/html5/tests/video.html

Page 5: (Responsive) Video

Formats

MP4WebM

Ogg Theora

Page 6: (Responsive) Video

Codecs

H.264 / AACVP8 / Ogg Vorbis

Page 7: (Responsive) Video

Media queries

<video controls>

<source src="small.mp4" type="video/mp4" media="all and (max-width:480px)">

<source src="small.webm" type="video/webm" media="all and (max-width:480px)">

<source src="big.mp4" type="video/mp4">

<source src="big.webm" type="video/webm">

</video>

Candidate for removal from the HTML5 specification

Page 8: (Responsive) Video

function supports_mp4() {

return !!document.createElement('video').canPlayType('video/mp4;

codecs="avc1.42E01E"').replace(/^no$/,'');

}

function supports_flash() {

var hasFlash = false;

try {

var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');

if(fo) hasFlash = true;

}catch(e){

var fm = navigator.mimeTypes["application/x-shockwave-flash"];

if( fm && fm.enabledPlugin ) hasFlash = true;

}

return hasFlash;

}

Page 9: (Responsive) Video

MP4 moov atom

ffmpeg -i input.mp4 -c:v copy -c:a copy -movflags faststart output.mp4

http://ffmpeg.org/http://www.adobe.com/devnet/video/articles/mp4_movie_atom.html

Page 10: (Responsive) Video

Apple HTTP Live Streaming (HLS)

https://developer.apple.com/streaming/

Page 11: (Responsive) Video

http://walterebert.com/playground/video/hls/

Page 12: (Responsive) Video

MPEG-DASH

http://dashif.org/

Page 13: (Responsive) Video

ORBX.js

• downloadable HD codec written in JS and WebGL• 25% better compression than H.264

• adaptive bit-rate while streaming

http://brendaneich.com/2013/05/today-i-saw-the-future/

Page 14: (Responsive) Video

http://caniuse.com/#feat=webgl

Page 15: (Responsive) Video

High Efficiency Video Coding (HEVC)a.k.a. H.265

http://hevc.hhi.fraunhofer.de/

Page 16: (Responsive) Video

VP9

https://en.wikipedia.org/wiki/VP9

Page 17: (Responsive) Video

WebRTC???

http://www.webrtc.org/

Page 18: (Responsive) Video

Walter Ebert

@walterebertwalterebert.com

slideshare.net/walterebert